org.alfresco.repo.domain.patch
Interface PatchDAO

All Known Implementing Classes:
AbstractPatchDAOImpl, PatchDAOImpl

public interface PatchDAO

Additional DAO services for patches

Since:
3.2

Nested Class Summary
static interface PatchDAO.StringHandler
          A callback handler for iterating over the string results
 
Method Summary
 int deleteAclMembersForAcls(java.util.List aclIds)
           
 int deleteAcls(java.util.List aclIds)
           
 void deleteAllOldAttrs()
          Delete all old attributes (from alf_*attribute* tables)
 int deleteDanglingAces()
           
 java.util.List getAuthoritiesWithNonUtf8Crcs()
           
 long getAVMNodesCountWhereNewInStore()
           
 java.util.List getAvmNodesWithOldContentProperties(java.lang.Long minNodeId, java.lang.Long maxNodeId)
           
 int getChildAssocCount()
           
 java.util.List getChildAssocsForCrcFix(java.lang.Long minAssocId, java.lang.Long stopAtAssocId, long rangeMultiplier, long maxIdRange, int maxResults)
          The results map contains:
 long getDmNodeCount()
          How many DM nodes are there?
 long getDmNodeCountWithNewACLs(java.lang.Long above)
          How many DM nodes are three with new ACls (to track patch progress)
 java.util.List getEmptyGUIDS(int count)
           
 long getMaxAclId()
          Get the max acl id
 long getMaxAdmNodeID()
           
 long getMaxAvmNodeID()
           
 java.lang.Long getMaxChildAssocId()
           
 java.util.List getNodesOfTypeWithNamePattern(org.alfresco.service.namespace.QName typeQName, java.lang.String namePattern)
          Query for a list of nodes that have a given type and share the same name pattern (SQL LIKE syntax)
 java.util.List getNullVersionLayeredDirectories(int count)
           
 java.util.List getNullVersionLayeredFiles(int count)
           
 java.util.List getOldAttrCustomNames()
          Get custom global attribute names (if any)
 void getUsersWithoutUsageProp(org.alfresco.service.cmr.repository.StoreRef storeRef, PatchDAO.StringHandler handler)
          Iterate over all person nodes with missing usage property (for one-off patch)
 void migrateOldAttrAVMLocks(com.ibatis.sqlmap.client.event.RowHandler rowHandler)
          Migrate old AVM Lock attributes (if any)
 void migrateOldAttrChainingURS(com.ibatis.sqlmap.client.event.RowHandler rowHandler)
          Migrate old Chaining User Registry Synchronizer attributes (if any)
 void migrateOldAttrPropertyBackedBeans(com.ibatis.sqlmap.client.event.RowHandler rowHandler)
          Migrate old Property-Backed Bean attributes (if any)
 void migrateOldAttrTenants(com.ibatis.sqlmap.client.event.RowHandler rowHandler)
          Migrate old Tenant attributes (if any)
 java.util.List selectAllAclIds()
           
 java.util.List selectNonDanglingAclIds()
           
 void updateAdmV31ContentProperties(java.lang.Long minNodeId, java.lang.Long maxNodeId)
          Migrates DM content properties from the old V3.1 format (String-based ContentData.toString()) to the new V3.2 format (ID based storage using ContentDataDAO).
 int updateAVMNodesNullifyAcl(java.util.List nodeIds)
           
 int updateAVMNodesSetAcl(long aclId, java.util.List nodeIds)
           
 int updateChildAssocCrc(java.lang.Long assocId, java.lang.Long childNodeNameCrc, java.lang.Long qnameCrc)
           
 int updateContentMimetypeIds(java.lang.Long oldMimetypeId, java.lang.Long newMimetypeId)
          Update all alf_content_data mimetype references.
 

Method Detail

getAVMNodesCountWhereNewInStore

long getAVMNodesCountWhereNewInStore()

getEmptyGUIDS

java.util.List getEmptyGUIDS(int count)

getNullVersionLayeredDirectories

java.util.List getNullVersionLayeredDirectories(int count)

getNullVersionLayeredFiles

java.util.List getNullVersionLayeredFiles(int count)

getMaxAvmNodeID

long getMaxAvmNodeID()

getAvmNodesWithOldContentProperties

java.util.List getAvmNodesWithOldContentProperties(java.lang.Long minNodeId,
                                                   java.lang.Long maxNodeId)

updateAVMNodesNullifyAcl

int updateAVMNodesNullifyAcl(java.util.List nodeIds)

updateAVMNodesSetAcl

int updateAVMNodesSetAcl(long aclId,
                         java.util.List nodeIds)

getMaxAdmNodeID

long getMaxAdmNodeID()

updateAdmV31ContentProperties

void updateAdmV31ContentProperties(java.lang.Long minNodeId,
                                   java.lang.Long maxNodeId)
Migrates DM content properties from the old V3.1 format (String-based ContentData.toString()) to the new V3.2 format (ID based storage using ContentDataDAO).

Parameters:
minNodeId - the inclusive node ID to limit the updates to
maxNodeId - the exclusive node ID to limit the updates to

updateContentMimetypeIds

int updateContentMimetypeIds(java.lang.Long oldMimetypeId,
                             java.lang.Long newMimetypeId)
Update all alf_content_data mimetype references.

Parameters:
oldMimetypeId - the ID to search for
newMimetypeId - the ID to change to
Returns:
the number of rows affected

getUsersWithoutUsageProp

void getUsersWithoutUsageProp(org.alfresco.service.cmr.repository.StoreRef storeRef,
                              PatchDAO.StringHandler handler)
Iterate over all person nodes with missing usage property (for one-off patch)

Parameters:
storeRef - the store to search in
handler - the callback to use while iterating over the people

getMaxAclId

long getMaxAclId()
Get the max acl id

Returns:
- max acl id

getDmNodeCount

long getDmNodeCount()
How many DM nodes are there?

Returns:
- the count

getDmNodeCountWithNewACLs

long getDmNodeCountWithNewACLs(java.lang.Long above)
How many DM nodes are three with new ACls (to track patch progress)

Parameters:
above -
Returns:
- the count

selectAllAclIds

java.util.List selectAllAclIds()

selectNonDanglingAclIds

java.util.List selectNonDanglingAclIds()

deleteDanglingAces

int deleteDanglingAces()

deleteAcls

int deleteAcls(java.util.List aclIds)

deleteAclMembersForAcls

int deleteAclMembersForAcls(java.util.List aclIds)

getAuthoritiesWithNonUtf8Crcs

java.util.List getAuthoritiesWithNonUtf8Crcs()
Returns:
Returns the names of authorities with incorrect CRC values

getChildAssocCount

int getChildAssocCount()
Returns:
Returns the number child association rows

getMaxChildAssocId

java.lang.Long getMaxChildAssocId()
Returns:
Returns the maximum child assoc ID or 0 if there are none

getChildAssocsForCrcFix

java.util.List getChildAssocsForCrcFix(java.lang.Long minAssocId,
                                       java.lang.Long stopAtAssocId,
                                       long rangeMultiplier,
                                       long maxIdRange,
                                       int maxResults)
The results map contains:
 
        
        
        
        
        
        
        
       ]]>
 

Parameters:
minAssocId - the minimum child assoc ID
stopAtAssocId - the child assoc ID to stop at i.e. once this ID has been reached, pull back no results
rangeMultiplier - the ration of IDs to actual rows (how many IDs to select to get a row)
maxIdRange - the largest ID range to use for selects. Normally, the ID range should be allowed to grow in accordance with the general distribution of rows, but if memory problems are encountered, then the range will need to be set down.
maxResults - the number of child associations to fetch
Returns:
Returns child associations that need fixing

updateChildAssocCrc

int updateChildAssocCrc(java.lang.Long assocId,
                        java.lang.Long childNodeNameCrc,
                        java.lang.Long qnameCrc)

getNodesOfTypeWithNamePattern

java.util.List getNodesOfTypeWithNamePattern(org.alfresco.service.namespace.QName typeQName,
                                             java.lang.String namePattern)
Query for a list of nodes that have a given type and share the same name pattern (SQL LIKE syntax)

Parameters:
typeQName - the node type
namePattern - the SQL LIKE pattern
Returns:
Returns the node ID and node name

migrateOldAttrTenants

void migrateOldAttrTenants(com.ibatis.sqlmap.client.event.RowHandler rowHandler)
Migrate old Tenant attributes (if any)


migrateOldAttrAVMLocks

void migrateOldAttrAVMLocks(com.ibatis.sqlmap.client.event.RowHandler rowHandler)
Migrate old AVM Lock attributes (if any)


migrateOldAttrPropertyBackedBeans

void migrateOldAttrPropertyBackedBeans(com.ibatis.sqlmap.client.event.RowHandler rowHandler)
Migrate old Property-Backed Bean attributes (if any)


migrateOldAttrChainingURS

void migrateOldAttrChainingURS(com.ibatis.sqlmap.client.event.RowHandler rowHandler)
Migrate old Chaining User Registry Synchronizer attributes (if any)


getOldAttrCustomNames

java.util.List getOldAttrCustomNames()
Get custom global attribute names (if any)


deleteAllOldAttrs

void deleteAllOldAttrs()
Delete all old attributes (from alf_*attribute* tables)



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.