public class PatchDAOImpl extends AbstractPatchDAOImpl
| Modifier and Type | Class and Description |
|---|---|
static class |
PatchDAOImpl.Oracle
Oracle-specific DAO
|
static class |
PatchDAOImpl.PostgreSQL
PostgreSQL-specific DAO
|
PatchDAO.StringHandler| Modifier and Type | Field and Description |
|---|---|
protected org.mybatis.spring.SqlSessionTemplate |
template |
| Constructor and Description |
|---|
PatchDAOImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
addSizeCurrentProp()
Add a cm:sizeCurrent property to person nodes that don't have it.
|
protected int |
deleteAclEntities(List<Long> aclIds) |
protected int |
deleteAclMemberEntitiesForAcls(List<Long> aclIds) |
protected int |
deleteDanglingAceEntities() |
void |
executeBatch() |
List<Map<String,Object>> |
getAclsThatInheritFromNonPrimaryParent()
Get acls that do not inherit from the primary parent.
|
List<Map<String,Object>> |
getAclsThatInheritWithInheritanceUnset()
Get acls that inherit with inheritance unset
|
protected List<Map<String,Object>> |
getAdmOldContentProperties(Long minNodeId,
Long maxNodeId)
Results are of the form:
|
List<String> |
getAuthoritiesWithNonUtf8Crcs() |
protected long |
getAVMNodeEntitiesCountWhereNewInStore() |
protected List<AVMNodeEntity> |
getAVMNodeEntitiesWithEmptyGUID(int maxResults) |
List<Long> |
getAvmNodesWithOldContentProperties(Long minNodeId,
Long maxNodeId) |
int |
getChildAssocCount() |
List<Map<String,Object>> |
getChildAssocsForCrcFix(Long minAssocId,
Long stopAtAssocId,
long rangeMultiplier,
long maxIdRange,
int maxResults)
The results map contains:
|
List<org.alfresco.service.cmr.repository.NodeRef> |
getChildrenOfTheSharedSurfConfigFolder(Long minNodeId,
Long maxNodeId)
Finds folders of the shared surf-config (for all tenants):
company_home/sites/surf-config/components
company_home/sites/surf-config/pages
company_home/sites/surf-config/pages/user
company_home/sites/surf-config/pages/user{userId}
|
long |
getCountNodesWithAspects(Set<org.alfresco.service.namespace.QName> qnames) |
long |
getCountNodesWithTypId(org.alfresco.service.namespace.QName typeQName)
Gets the total number of nodes which match the given Type QName.
|
List<Map<String,Object>> |
getDefiningAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
Get defining acls with inheritance issues
|
protected long |
getDmNodeEntitiesCount() |
protected long |
getDmNodeEntitiesCountWithNewACLs(Long above) |
protected long |
getMaxAclEntityId() |
long |
getMaxAdmNodeID() |
long |
getMaxAvmNodeID() |
Long |
getMaxChildAssocId() |
List<Long> |
getNodesByAspectQNameId(Long aspectQNameId,
Long minNodeId,
Long maxNodeId)
Find all the nodes ids with the given aspect
|
List<Long> |
getNodesByContentPropertyMimetypeId(Long mimetypeId,
Long minNodeId,
Long maxNodeId)
Find all the nodes ids with the given content property set with the given mimetype
|
List<Long> |
getNodesByTypeQNameId(Long typeQNameId,
Long minNodeId,
Long maxNodeId)
Find all the nodes ids with the given type
|
List<Long> |
getNodesByTypeUriId(Long nsId,
Long minNodeId,
Long maxNodeId)
Find all the nodes ids with the given type uri
|
List<org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,String>> |
getNodesOfTypeWithNamePattern(org.alfresco.service.namespace.QName typeQName,
String namePattern)
Query for a list of nodes that have a given type and share the same name pattern (SQL LIKE syntax)
|
protected List<AVMNodeEntity> |
getNullVersionLayeredDirectoryNodeEntities(int maxResults) |
protected List<AVMNodeEntity> |
getNullVersionLayeredFileNodeEntities(int maxResults) |
protected void |
getOldAttrAVMLocksImpl(org.apache.ibatis.session.ResultHandler resultHandler) |
protected void |
getOldAttrChainingURSImpl(org.apache.ibatis.session.ResultHandler resultHandler) |
protected List<String> |
getOldAttrCustomNamesImpl() |
protected void |
getOldAttrPropertyBackedBeansImpl(org.apache.ibatis.session.ResultHandler resultHandler) |
protected void |
getOldAttrTenantsImpl(org.apache.ibatis.session.ResultHandler resultHandler) |
List<Map<String,Object>> |
getSharedAclsThatDoNotInheritCorrectlyFromTheirDefiningAcl()
Get shared acls that do not inherit correctly from the defining acl
|
List<Map<String,Object>> |
getSharedAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
Get shared acls with inheritance issues
|
void |
migrateOldAttrDropTables()
Drop old attribute alf_*attribute* tables
|
protected List<Long> |
selectAllAclEntityIds() |
protected List<Long> |
selectNonDanglingAclEntityIds() |
void |
setLocaleDAO(LocaleDAO localeDAO) |
void |
setQnameDAO(QNameDAO qnameDAO) |
void |
setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate) |
void |
startBatch() |
protected void |
updateAdmOldContentProperty(Long nodeId,
Long qnameId,
Integer listIndex,
Long localeId,
Long longValue) |
protected int |
updateAVMNodeEntitiesNullifyAcl(List<Long> nodeIds) |
protected int |
updateAVMNodeEntitiesSetAcl(long aclId,
List<Long> nodeIds) |
int |
updateChildAssocCrc(Long assocId,
Long childNodeNameCrc,
Long qnameCrc) |
int |
updateContentMimetypeIds(Long oldMimetypeId,
Long newMimetypeId)
Update all alf_content_data mimetype references.
|
deleteAclMembersForAcls, deleteAcls, deleteDanglingAces, getAVMNodesCountWhereNewInStore, getDmNodeCount, getDmNodeCountWithNewACLs, getEmptyGUIDS, getMaxAclId, getNullVersionLayeredDirectories, getNullVersionLayeredFiles, getOldAttrCustomNames, migrateOldAttrAVMLocks, migrateOldAttrChainingURS, migrateOldAttrPropertyBackedBeans, migrateOldAttrTenants, selectAllAclIds, selectNonDanglingAclIds, setContentDataDAO, updateAdmV31ContentProperties, updateAVMNodesNullifyAcl, updateAVMNodesSetAclpublic final void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
public void setQnameDAO(QNameDAO qnameDAO)
public void setLocaleDAO(LocaleDAO localeDAO)
public void startBatch()
public void executeBatch()
protected long getAVMNodeEntitiesCountWhereNewInStore()
getAVMNodeEntitiesCountWhereNewInStore in class AbstractPatchDAOImplprotected List<AVMNodeEntity> getAVMNodeEntitiesWithEmptyGUID(int maxResults)
getAVMNodeEntitiesWithEmptyGUID in class AbstractPatchDAOImplprotected List<AVMNodeEntity> getNullVersionLayeredDirectoryNodeEntities(int maxResults)
getNullVersionLayeredDirectoryNodeEntities in class AbstractPatchDAOImplprotected List<AVMNodeEntity> getNullVersionLayeredFileNodeEntities(int maxResults)
getNullVersionLayeredFileNodeEntities in class AbstractPatchDAOImplpublic long getMaxAvmNodeID()
public List<Long> getAvmNodesWithOldContentProperties(Long minNodeId, Long maxNodeId)
public long getMaxAdmNodeID()
protected List<Map<String,Object>> getAdmOldContentProperties(Long minNodeId, Long maxNodeId)
AbstractPatchDAOImpl
nodeId: java.lang.Long
qnameId: java.lang.Long
listIndex: java.lang.Integer
localeId: java.lang.Long
stringValue: java.lang.String
getAdmOldContentProperties in class AbstractPatchDAOImplminNodeId - inclusive lower bound for Node IDmaxNodeId - exclusive upper bound for Node IDprotected void updateAdmOldContentProperty(Long nodeId, Long qnameId, Integer listIndex, Long localeId, Long longValue)
updateAdmOldContentProperty in class AbstractPatchDAOImplnodeId - part of the unique keyqnameId - part of the unique keylistIndex - part of the unique keylocaleId - part of the unique keylongValue - the new ContentData IDpublic int updateContentMimetypeIds(Long oldMimetypeId, Long newMimetypeId)
PatchDAOoldMimetypeId - the ID to search fornewMimetypeId - the ID to change topublic int addSizeCurrentProp()
PatchDAOprotected int updateAVMNodeEntitiesNullifyAcl(List<Long> nodeIds)
updateAVMNodeEntitiesNullifyAcl in class AbstractPatchDAOImplprotected int updateAVMNodeEntitiesSetAcl(long aclId,
List<Long> nodeIds)
updateAVMNodeEntitiesSetAcl in class AbstractPatchDAOImplprotected long getMaxAclEntityId()
getMaxAclEntityId in class AbstractPatchDAOImplprotected long getDmNodeEntitiesCount()
getDmNodeEntitiesCount in class AbstractPatchDAOImplprotected long getDmNodeEntitiesCountWithNewACLs(Long above)
getDmNodeEntitiesCountWithNewACLs in class AbstractPatchDAOImplprotected List<Long> selectAllAclEntityIds()
selectAllAclEntityIds in class AbstractPatchDAOImplprotected List<Long> selectNonDanglingAclEntityIds()
selectNonDanglingAclEntityIds in class AbstractPatchDAOImplprotected int deleteDanglingAceEntities()
deleteDanglingAceEntities in class AbstractPatchDAOImplprotected int deleteAclEntities(List<Long> aclIds)
deleteAclEntities in class AbstractPatchDAOImplprotected int deleteAclMemberEntitiesForAcls(List<Long> aclIds)
deleteAclMemberEntitiesForAcls in class AbstractPatchDAOImplpublic List<String> getAuthoritiesWithNonUtf8Crcs()
public int getChildAssocCount()
public Long getMaxChildAssocId()
public List<Map<String,Object>> getChildAssocsForCrcFix(Long minAssocId, Long stopAtAssocId, long rangeMultiplier, long maxIdRange, int maxResults)
PatchDAO
]]>
minAssocId - the minimum child assoc IDstopAtAssocId - the child assoc ID to stop at i.e. once this ID has been reached,
pull back no resultsrangeMultiplier - 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 fetchpublic int updateChildAssocCrc(Long assocId, Long childNodeNameCrc, Long qnameCrc)
public List<org.alfresco.util.Pair<org.alfresco.service.cmr.repository.NodeRef,String>> getNodesOfTypeWithNamePattern(org.alfresco.service.namespace.QName typeQName, String namePattern)
PatchDAOtypeQName - the node typenamePattern - the SQL LIKE patternprotected void getOldAttrTenantsImpl(org.apache.ibatis.session.ResultHandler resultHandler)
getOldAttrTenantsImpl in class AbstractPatchDAOImplprotected void getOldAttrAVMLocksImpl(org.apache.ibatis.session.ResultHandler resultHandler)
getOldAttrAVMLocksImpl in class AbstractPatchDAOImplprotected void getOldAttrPropertyBackedBeansImpl(org.apache.ibatis.session.ResultHandler resultHandler)
getOldAttrPropertyBackedBeansImpl in class AbstractPatchDAOImplprotected void getOldAttrChainingURSImpl(org.apache.ibatis.session.ResultHandler resultHandler)
getOldAttrChainingURSImpl in class AbstractPatchDAOImplprotected List<String> getOldAttrCustomNamesImpl()
getOldAttrCustomNamesImpl in class AbstractPatchDAOImplpublic void migrateOldAttrDropTables()
PatchDAOpublic List<Map<String,Object>> getAclsThatInheritFromNonPrimaryParent()
PatchDAOpublic List<Map<String,Object>> getAclsThatInheritWithInheritanceUnset()
PatchDAOpublic List<Map<String,Object>> getDefiningAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
PatchDAOpublic List<Map<String,Object>> getSharedAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
PatchDAOpublic List<Map<String,Object>> getSharedAclsThatDoNotInheritCorrectlyFromTheirDefiningAcl()
PatchDAOpublic long getCountNodesWithAspects(Set<org.alfresco.service.namespace.QName> qnames)
qnames - the qnames to search forpublic List<Long> getNodesByTypeQNameId(Long typeQNameId, Long minNodeId, Long maxNodeId)
PatchDAOtypeQNameId - - the id of the type qnameminNodeId - - min node id in the result set - inclusivemaxNodeId - - max node id in the result set - exclusivepublic List<Long> getNodesByTypeUriId(Long nsId, Long minNodeId, Long maxNodeId)
PatchDAOnsId - - the id of the type qname uriminNodeId - - min node id in the result set - inclusivemaxNodeId - - max node id in the result set - exclusivepublic List<Long> getNodesByAspectQNameId(Long aspectQNameId, Long minNodeId, Long maxNodeId)
PatchDAOaspectQNameId - - the id of the aspect qnameminNodeId - - min node id in the result set - inclusivemaxNodeId - - max node id in the result set - exclusivepublic List<Long> getNodesByContentPropertyMimetypeId(Long mimetypeId, Long minNodeId, Long maxNodeId)
PatchDAOmimetypeId - - the id of the content data mimetypeminNodeId - - min node id in the result set - inclusivemaxNodeId - - max node id in the result set - exclusivepublic long getCountNodesWithTypId(org.alfresco.service.namespace.QName typeQName)
PatchDAOtypeQName - the qname to search forpublic List<org.alfresco.service.cmr.repository.NodeRef> getChildrenOfTheSharedSurfConfigFolder(Long minNodeId, Long maxNodeId)
PatchDAOminNodeId - - min node id in the result set - inclusivemaxNodeId - - max node id in the result set - exclusiveCopyright © 2005–2014 Alfresco Software. All rights reserved.