org.alfresco.repo.domain.patch
Class AbstractPatchDAOImpl

java.lang.Object
  extended by org.alfresco.repo.domain.patch.AbstractPatchDAOImpl
All Implemented Interfaces:
org.alfresco.ibatis.BatchingDAO, PatchDAO
Direct Known Subclasses:
PatchDAOImpl

public abstract class AbstractPatchDAOImpl
extends java.lang.Object
implements PatchDAO, org.alfresco.ibatis.BatchingDAO

Abstract implementation for Patch DAO.

This provides additional queries used by patches.

Since:
3.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.domain.patch.PatchDAO
PatchDAO.StringHandler
 
Constructor Summary
protected AbstractPatchDAOImpl()
           
 
Method Summary
protected abstract  int deleteAclEntities(java.util.List aclIds)
           
protected abstract  int deleteAclMemberEntitiesForAcls(java.util.List aclIds)
           
 int deleteAclMembersForAcls(java.util.List aclIds)
           
 int deleteAcls(java.util.List aclIds)
           
protected abstract  int deleteDanglingAceEntities()
           
 int deleteDanglingAces()
           
protected abstract  java.util.List getAdmOldContentProperties(java.lang.Long minNodeId, java.lang.Long maxNodeId)
          Results are of the form:
protected abstract  long getAVMNodeEntitiesCountWhereNewInStore()
           
protected abstract  java.util.List getAVMNodeEntitiesWithEmptyGUID(int maxResults)
           
 long getAVMNodesCountWhereNewInStore()
          
 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)
protected abstract  long getDmNodeEntitiesCount()
           
protected abstract  long getDmNodeEntitiesCountWithNewACLs(java.lang.Long above)
           
 java.util.List getEmptyGUIDS(int count)
           
protected abstract  long getMaxAclEntityId()
           
 long getMaxAclId()
          Get the max acl id
 java.util.List getNullVersionLayeredDirectories(int count)
           
protected abstract  java.util.List getNullVersionLayeredDirectoryNodeEntities(int maxResults)
           
protected abstract  java.util.List getNullVersionLayeredFileNodeEntities(int maxResults)
           
 java.util.List getNullVersionLayeredFiles(int count)
           
protected abstract  void getOldAttrAVMLocksImpl(org.apache.ibatis.session.ResultHandler resultHandler)
           
protected abstract  void getOldAttrChainingURSImpl(org.apache.ibatis.session.ResultHandler resultHandler)
           
 java.util.List getOldAttrCustomNames()
          Get custom global attribute names (if any)
protected abstract  java.util.List getOldAttrCustomNamesImpl()
           
protected abstract  void getOldAttrPropertyBackedBeansImpl(org.apache.ibatis.session.ResultHandler resultHandler)
           
protected abstract  void getOldAttrTenantsImpl(org.apache.ibatis.session.ResultHandler resultHandler)
           
 void migrateOldAttrAVMLocks(org.apache.ibatis.session.ResultHandler resultHandler)
          Migrate old AVM Lock attributes (if any)
 void migrateOldAttrChainingURS(org.apache.ibatis.session.ResultHandler resultHandler)
          Migrate old Chaining User Registry Synchronizer attributes (if any)
 void migrateOldAttrPropertyBackedBeans(org.apache.ibatis.session.ResultHandler resultHandler)
          Migrate old Property-Backed Bean attributes (if any)
 void migrateOldAttrTenants(org.apache.ibatis.session.ResultHandler resultHandler)
          Migrate old Tenant attributes (if any)
protected abstract  java.util.List selectAllAclEntityIds()
           
 java.util.List selectAllAclIds()
           
protected abstract  java.util.List selectNonDanglingAclEntityIds()
           
 java.util.List selectNonDanglingAclIds()
           
 void setContentDataDAO(ContentDataDAO contentDataDAO)
          Set the DAO that supplies ContentData IDs
protected abstract  void updateAdmOldContentProperty(java.lang.Long nodeId, java.lang.Long qnameId, java.lang.Integer listIndex, java.lang.Long localeId, java.lang.Long longValue)
           
 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).
protected abstract  int updateAVMNodeEntitiesNullifyAcl(java.util.List nodeIds)
           
protected abstract  int updateAVMNodeEntitiesSetAcl(long aclId, java.util.List nodeIds)
           
 int updateAVMNodesNullifyAcl(java.util.List nodeIds)
           
 int updateAVMNodesSetAcl(long aclId, java.util.List nodeIds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.repo.domain.patch.PatchDAO
addSizeCurrentProp, getAclsThatInheritFromNonPrimaryParent, getAclsThatInheritWithInheritanceUnset, getAuthoritiesWithNonUtf8Crcs, getAvmNodesWithOldContentProperties, getChildAssocCount, getChildAssocsForCrcFix, getCountNodesWithAspects, getDefiningAclsThatDoNotInheritCorrectlyFromThePrimaryParent, getMaxAdmNodeID, getMaxAvmNodeID, getMaxChildAssocId, getNodesOfTypeWithNamePattern, getSharedAclsThatDoNotInheritCorrectlyFromTheirDefiningAcl, getSharedAclsThatDoNotInheritCorrectlyFromThePrimaryParent, migrateOldAttrDropTables, updateChildAssocCrc, updateContentMimetypeIds
 
Methods inherited from interface org.alfresco.ibatis.BatchingDAO
executeBatch, startBatch
 

Constructor Detail

AbstractPatchDAOImpl

protected AbstractPatchDAOImpl()
Method Detail

setContentDataDAO

public void setContentDataDAO(ContentDataDAO contentDataDAO)
Set the DAO that supplies ContentData IDs


getAVMNodesCountWhereNewInStore

public long getAVMNodesCountWhereNewInStore()

Specified by:
getAVMNodesCountWhereNewInStore in interface PatchDAO

getEmptyGUIDS

public java.util.List getEmptyGUIDS(int count)
Specified by:
getEmptyGUIDS in interface PatchDAO

getNullVersionLayeredDirectories

public java.util.List getNullVersionLayeredDirectories(int count)
Specified by:
getNullVersionLayeredDirectories in interface PatchDAO

getNullVersionLayeredFiles

public java.util.List getNullVersionLayeredFiles(int count)
Specified by:
getNullVersionLayeredFiles in interface PatchDAO

updateAVMNodesNullifyAcl

public int updateAVMNodesNullifyAcl(java.util.List nodeIds)
Specified by:
updateAVMNodesNullifyAcl in interface PatchDAO

updateAVMNodesSetAcl

public int updateAVMNodesSetAcl(long aclId,
                                java.util.List nodeIds)
Specified by:
updateAVMNodesSetAcl in interface PatchDAO

getAVMNodeEntitiesCountWhereNewInStore

protected abstract long getAVMNodeEntitiesCountWhereNewInStore()

getAVMNodeEntitiesWithEmptyGUID

protected abstract java.util.List getAVMNodeEntitiesWithEmptyGUID(int maxResults)

getNullVersionLayeredDirectoryNodeEntities

protected abstract java.util.List getNullVersionLayeredDirectoryNodeEntities(int maxResults)

getNullVersionLayeredFileNodeEntities

protected abstract java.util.List getNullVersionLayeredFileNodeEntities(int maxResults)

updateAVMNodeEntitiesNullifyAcl

protected abstract int updateAVMNodeEntitiesNullifyAcl(java.util.List nodeIds)

updateAVMNodeEntitiesSetAcl

protected abstract int updateAVMNodeEntitiesSetAcl(long aclId,
                                                   java.util.List nodeIds)

getMaxAclId

public long getMaxAclId()
Description copied from interface: PatchDAO
Get the max acl id

Specified by:
getMaxAclId in interface PatchDAO
Returns:
- max acl id

getDmNodeCount

public long getDmNodeCount()
Description copied from interface: PatchDAO
How many DM nodes are there?

Specified by:
getDmNodeCount in interface PatchDAO
Returns:
- the count

getDmNodeCountWithNewACLs

public long getDmNodeCountWithNewACLs(java.lang.Long above)
Description copied from interface: PatchDAO
How many DM nodes are three with new ACls (to track patch progress)

Specified by:
getDmNodeCountWithNewACLs in interface PatchDAO
Returns:
- the count

selectAllAclIds

public java.util.List selectAllAclIds()
Specified by:
selectAllAclIds in interface PatchDAO

selectNonDanglingAclIds

public java.util.List selectNonDanglingAclIds()
Specified by:
selectNonDanglingAclIds in interface PatchDAO

deleteDanglingAces

public int deleteDanglingAces()
Specified by:
deleteDanglingAces in interface PatchDAO

deleteAcls

public int deleteAcls(java.util.List aclIds)
Specified by:
deleteAcls in interface PatchDAO

deleteAclMembersForAcls

public int deleteAclMembersForAcls(java.util.List aclIds)
Specified by:
deleteAclMembersForAcls in interface PatchDAO

updateAdmV31ContentProperties

public 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).

Specified by:
updateAdmV31ContentProperties in interface PatchDAO
Parameters:
minNodeId - the inclusive node ID to limit the updates to
maxNodeId - the exclusive node ID to limit the updates to
See Also:
AbstractPatchDAOImpl.getAdmOldContentProperties(Long, Long)

getAdmOldContentProperties

protected abstract java.util.List getAdmOldContentProperties(java.lang.Long minNodeId,
                                                             java.lang.Long maxNodeId)
Results are of the form:
      nodeId: java.lang.Long
      qnameId: java.lang.Long
      listIndex: java.lang.Integer
      localeId: java.lang.Long
      stringValue: java.lang.String
 

Parameters:
minNodeId - inclusive lower bound for Node ID
maxNodeId - exclusive upper bound for Node ID
Returns:
Returns a map of query results

updateAdmOldContentProperty

protected abstract void updateAdmOldContentProperty(java.lang.Long nodeId,
                                                    java.lang.Long qnameId,
                                                    java.lang.Integer listIndex,
                                                    java.lang.Long localeId,
                                                    java.lang.Long longValue)
Parameters:
nodeId - part of the unique key
qnameId - part of the unique key
listIndex - part of the unique key
localeId - part of the unique key
longValue - the new ContentData ID

getMaxAclEntityId

protected abstract long getMaxAclEntityId()

getDmNodeEntitiesCount

protected abstract long getDmNodeEntitiesCount()

getDmNodeEntitiesCountWithNewACLs

protected abstract long getDmNodeEntitiesCountWithNewACLs(java.lang.Long above)

selectAllAclEntityIds

protected abstract java.util.List selectAllAclEntityIds()

selectNonDanglingAclEntityIds

protected abstract java.util.List selectNonDanglingAclEntityIds()

deleteDanglingAceEntities

protected abstract int deleteDanglingAceEntities()

deleteAclEntities

protected abstract int deleteAclEntities(java.util.List aclIds)

deleteAclMemberEntitiesForAcls

protected abstract int deleteAclMemberEntitiesForAcls(java.util.List aclIds)

migrateOldAttrTenants

public void migrateOldAttrTenants(org.apache.ibatis.session.ResultHandler resultHandler)
Description copied from interface: PatchDAO
Migrate old Tenant attributes (if any)

Specified by:
migrateOldAttrTenants in interface PatchDAO

getOldAttrTenantsImpl

protected abstract void getOldAttrTenantsImpl(org.apache.ibatis.session.ResultHandler resultHandler)

migrateOldAttrAVMLocks

public void migrateOldAttrAVMLocks(org.apache.ibatis.session.ResultHandler resultHandler)
Description copied from interface: PatchDAO
Migrate old AVM Lock attributes (if any)

Specified by:
migrateOldAttrAVMLocks in interface PatchDAO

getOldAttrAVMLocksImpl

protected abstract void getOldAttrAVMLocksImpl(org.apache.ibatis.session.ResultHandler resultHandler)

migrateOldAttrPropertyBackedBeans

public void migrateOldAttrPropertyBackedBeans(org.apache.ibatis.session.ResultHandler resultHandler)
Description copied from interface: PatchDAO
Migrate old Property-Backed Bean attributes (if any)

Specified by:
migrateOldAttrPropertyBackedBeans in interface PatchDAO

getOldAttrPropertyBackedBeansImpl

protected abstract void getOldAttrPropertyBackedBeansImpl(org.apache.ibatis.session.ResultHandler resultHandler)

migrateOldAttrChainingURS

public void migrateOldAttrChainingURS(org.apache.ibatis.session.ResultHandler resultHandler)
Description copied from interface: PatchDAO
Migrate old Chaining User Registry Synchronizer attributes (if any)

Specified by:
migrateOldAttrChainingURS in interface PatchDAO

getOldAttrChainingURSImpl

protected abstract void getOldAttrChainingURSImpl(org.apache.ibatis.session.ResultHandler resultHandler)

getOldAttrCustomNames

public java.util.List getOldAttrCustomNames()
Description copied from interface: PatchDAO
Get custom global attribute names (if any)

Specified by:
getOldAttrCustomNames in interface PatchDAO

getOldAttrCustomNamesImpl

protected abstract java.util.List getOldAttrCustomNamesImpl()


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