Class ContentDataDAOImpl

  • All Implemented Interfaces:
    ContentDataDAO

    public class ContentDataDAOImpl
    extends AbstractContentDataDAOImpl
    iBatis-specific implementation of the ContentData DAO.
    Since:
    3.2
    Author:
    Derek Hulley, sglover
    • Field Detail

      • template

        protected org.mybatis.spring.SqlSessionTemplate template
    • Constructor Detail

      • ContentDataDAOImpl

        public ContentDataDAOImpl()
    • Method Detail

      • setSqlSessionTemplate

        public final void setSqlSessionTemplate​(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
      • createContentUrlOrphaned

        public org.alfresco.util.Pair<java.lang.Long,​java.lang.String> createContentUrlOrphaned​(java.lang.String contentUrl,
                                                                                                      java.util.Date orphanTime)
        Description copied from interface: ContentDataDAO
        Creates an immediately-orphaned content URL, if possible
        Parameters:
        contentUrl - the URL to create if it doesn't exist
        orphanTime - the recorded orphan time or null to apply the current time
        Returns:
        Returns the ID-URL pair
      • getContentUrlsOrphaned

        public void getContentUrlsOrphaned​(ContentDataDAO.ContentUrlHandler contentUrlHandler,
                                           java.lang.Long maxOrphanTimeExclusive,
                                           int maxResults)
        Description copied from interface: ContentDataDAO
        Enumerate all available content URLs that were orphaned on or before the given time
        Parameters:
        contentUrlHandler - the callback object to process the rows
        maxOrphanTimeExclusive - the maximum orphan time (exclusive)
        maxResults - the maximum number of results (1 or greater)
      • getContentUrlsKeepOrphaned

        public void getContentUrlsKeepOrphaned​(ContentDataDAO.ContentUrlHandler contentUrlHandler,
                                               int maxResults)
        Description copied from interface: ContentDataDAO
        Enumerate all available content URLs that were orphaned and cleanup for these urls failed
        Parameters:
        contentUrlHandler - the callback object to process the rows
        maxResults - the maximum number of results (1 or greater)
      • updateContentUrlOrphanTime

        public int updateContentUrlOrphanTime​(java.lang.Long id,
                                              java.lang.Long orphanTime,
                                              java.lang.Long oldOrphanTime)
        Description copied from class: AbstractContentDataDAOImpl
        Update a content URL with the given orphan time
        Specified by:
        updateContentUrlOrphanTime in class AbstractContentDataDAOImpl
        Parameters:
        id - the unique ID of the entity
        orphanTime - the time (ms since epoch) that the entity was orphaned
        oldOrphanTime - the orphan time we expect to update for optimistic locking (may be null)
        Returns:
        Returns the number of rows updated
      • deleteContentUrls

        public int deleteContentUrls​(java.util.List<java.lang.Long> ids)
        Delete a batch of content URL entities.
      • getContentUrlEntityUnreferenced

        protected ContentUrlEntity getContentUrlEntityUnreferenced​(java.lang.String contentUrl)
        Specified by:
        getContentUrlEntityUnreferenced in class AbstractContentDataDAOImpl
        Parameters:
        contentUrl - the URL of the content url entity
        Returns:
        Return the entity or null if it doesn't exist or is still referenced by a content_data entity
      • deleteContentDataForNode

        public void deleteContentDataForNode​(java.lang.Long nodeId,
                                             java.util.Set<java.lang.Long> qnameIds)
        Description copied from interface: ContentDataDAO
        Deletes all alf_content_data rows that are referenced by the given node
        Parameters:
        nodeId - the node ID
        qnameIds - the content properties to target
      • getSymmetricKeysByMasterKeyAlias

        public java.util.List<ContentUrlKeyEntity> getSymmetricKeysByMasterKeyAlias​(java.lang.String masterKeyAlias,
                                                                                    long fromId,
                                                                                    int maxResults)
        Description copied from interface: ContentDataDAO
        Get symmetric keys entities for symmetric keys that have been encrypted using the given master key, starting from 'fromId' and returning at most 'maxResults' entities.
        Parameters:
        masterKeyAlias - master key alias
        fromId - id
        maxResults - max results
        Returns:
      • countSymmetricKeysForMasterKeys

        public java.util.Map<java.lang.String,​java.lang.Integer> countSymmetricKeysForMasterKeys()
        Description copied from interface: ContentDataDAO
        Count symmetric keys entities for symmetric keys for all master keys
        Returns:
      • countSymmetricKeysForMasterKeyAlias

        public int countSymmetricKeysForMasterKeyAlias​(java.lang.String masterKeyAlias)
        Description copied from interface: ContentDataDAO
        Count symmetric keys entities for symmetric keys that have been encrypted using the given master key
        Returns: