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

Constructor Summary
protected AbstractPatchDAOImpl()
           
 
Method Summary
protected abstract  java.util.List getAdmOldContentProperties(java.lang.Long minNodeId, java.lang.Long maxNodeId)
          Results are of the form:
protected abstract  java.lang.Long getAVMNodeEntitiesCountWhereNewInStore()
           
protected abstract  java.util.List getAVMNodeEntitiesWithEmptyGUID()
           
 java.lang.Long getAVMNodesCountWhereNewInStore()
          
 java.util.List getEmptyGUIDS(int count)
           
 java.util.List getNullVersionLayeredDirectories(int count)
           
protected abstract  java.util.List getNullVersionLayeredDirectoryNodeEntities()
           
protected abstract  java.util.List getNullVersionLayeredFileNodeEntities()
           
 java.util.List getNullVersionLayeredFiles(int count)
           
 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).
 
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
getAvmNodesWithOldContentProperties, getMaxAdmNodeID, getMaxAvmNodeID
 
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 java.lang.Long getAVMNodesCountWhereNewInStore()

Specified by:
getAVMNodesCountWhereNewInStore in interface PatchDAO

getAVMNodeEntitiesCountWhereNewInStore

protected abstract java.lang.Long getAVMNodeEntitiesCountWhereNewInStore()

getEmptyGUIDS

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

getAVMNodeEntitiesWithEmptyGUID

protected abstract java.util.List getAVMNodeEntitiesWithEmptyGUID()

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

getNullVersionLayeredDirectoryNodeEntities

protected abstract java.util.List getNullVersionLayeredDirectoryNodeEntities()

getNullVersionLayeredFileNodeEntities

protected abstract java.util.List getNullVersionLayeredFileNodeEntities()

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


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