Interface ContentDao

    • Method Detail

      • getById

        ContentEntityObject getById​(long id)
        Description copied from interface: ContentEntityObjectDao
        Retrieve the object with a particular id from the database. The object must be of the same class as the DAO's getPersistentClass() method returns.
        Specified by:
        getById in interface ContentEntityObjectDao<ContentEntityObject>
        Parameters:
        id - the id of the object to look up
        Returns:
        the corresponding object, or null if the object does not exist with the appropriate class and id.
      • getLatestContentCount

        int getLatestContentCount()
      • getLatestOrderedWikiContentFromContentId

        List<ContentEntityObject> getLatestOrderedWikiContentFromContentId​(long startContentId,
                                                                           int maxRows)
        Parameters:
        startContentId - start content id
        maxRows - max rows
        Returns:
        the latest versions of wiki content within the specified bounds
      • getOrderedXhtmlContentFromContentId

        List<ContentEntityObject> getOrderedXhtmlContentFromContentId​(long startContentId,
                                                                      int maxRows)

        This is for internal use only, Do not rely on it as a public API. This is used to retrieve batches of data during migration or upgrades.

        Warning: You will want to keep maxRows as small as possible because a list of CEO can be a very memory hungry structure. A good example is the default used in content migration which is 500.

        Parameters:
        startContentId -
        maxRows -
        Returns:
        a list ordered by id of all the ContentEntityObjects with XHTML formatted bodies.
      • getLatestOrderedXhtmlContentFromContentIds

        List<ContentEntityObject> getLatestOrderedXhtmlContentFromContentIds​(long startContentId,
                                                                             long endContentId)

        This is for internal use only, Do not rely on it as a public API. This is used to retrieve batches of data during migration or upgrades.

        Warning: You will want to keep maxRows as small as possible because a list of CEO can be a very memory hungry structure. A good example is the default used in content migration which is 500.

        Returns:
        a list ordered by id of all the latest ContentEntityObjects with XHTML formatted bodies.
      • getLatestOrderedXhtmlContentIds

        List<Long> getLatestOrderedXhtmlContentIds​(long startContentId,
                                                   int maxRows)

        This is for internal use only, Do not rely on it as a public API. This is used to retrieve batches of data during migration or upgrades.

        Parameters:
        startContentId -
        maxRows -
        Returns:
        a ordered list of IDs of all the latest ContentEntityObjects with XHTML formatted bodies.
      • getXhtmlSpaceDescriptionsFromContentId

        List<ContentEntityObject> getXhtmlSpaceDescriptionsFromContentId​(long startContentId,
                                                                         int maxRows)

        This is for internal use only, Do not rely on it as a public API. This is used to retrieve batches of data during migration or upgrades.

        Warning: You will want to keep maxRows as small as possible because a list of CEO can be a very memory hungry structure. A good example is the default used in content migration which is 500.

        Parameters:
        startContentId -
        maxRows -
        Returns:
        a list ordered by id of all the SpaceDescriptions with BodyContent of type BodyType.XHTML
      • getCountOfXhtmlContent

        int getCountOfXhtmlContent()

        This is for internal use only, Do not rely on it as a public API.

        This is used to calculate the amount of work required when migrating or upgrading content.

        Returns:
        the number of CEO's with XHTML content.
      • getCountOfLatestXhtmlContent

        int getCountOfLatestXhtmlContent()

        This is for internal use only, Do not rely on it as a public API.

        This is used to calculate the amount of work required when migrating or upgrading content.

        Returns:
        the number of latest CEO's with XHTML content.
      • getCountOfXhtmlSpaceDescriptions

        int getCountOfXhtmlSpaceDescriptions()

        This is for internal use only, Do not rely on it as a public API.

        This is used to calculate the amount of work required when migrating or upgrading content.

        Returns:
        the number of SpaceDescriptions with BodyContent of type BodyType.XHTML
      • saveRawWithoutReindex

        void saveRawWithoutReindex​(com.atlassian.core.bean.EntityObject objectToSave)

        This is for internal use only, Do not rely on it as a public API.

        Perform a saveRaw but without performing the re-index; it is unnecessary in the context of a migration or upgrade.