org.alfresco.repo.domain.avm
Class AbstractAVMVersionRootDAOImpl

java.lang.Object
  extended by org.alfresco.repo.domain.avm.AbstractAVMVersionRootDAOImpl
All Implemented Interfaces:
AVMVersionRootDAO
Direct Known Subclasses:
AVMVersionRootDAOImpl

public abstract class AbstractAVMVersionRootDAOImpl
extends java.lang.Object
implements AVMVersionRootDAO

Abstract implementation for AVMVersionRoot DAO.

This provides basic services such as caching but defers to the underlying implementation for CRUD operations.

Since:
3.2

Constructor Summary
AbstractAVMVersionRootDAOImpl()
           
 
Method Summary
 AVMVersionLayeredNodeEntryEntity createVersionLayeredNodeEntry(long versionRootId, java.lang.String md5sum, java.lang.String path)
          
protected abstract  AVMVersionLayeredNodeEntryEntity createVersionLayeredNodeEntryEntity(long versionRootId, java.lang.String md5sum, java.lang.String path)
           
 AVMVersionRootEntity createVersionRoot(long storeId, long rootNodeId, int version, java.lang.String creator, java.lang.String tag, java.lang.String description)
          Create a new AVM version root
protected abstract  AVMVersionRootEntity createVersionRootEntity(AVMVersionRootEntity vrEntity)
           
 void deleteVersionLayeredNodeEntries(long versionRootId)
          
protected abstract  int deleteVersionLayeredNodeEntryEntities(long versionRootId)
           
 void deleteVersionRoot(long vrEntityId)
          Delete an existing AVM version root
protected abstract  int deleteVersionRootEntity(long vrEntityId)
           
 java.util.List getAllInStore(long storeId)
          Get all the version roots in a given store
protected abstract  java.util.List getAllVersionRootEntitiesByStoreId(long storeId)
           
 java.util.List getByDates(long storeId, java.util.Date from, java.util.Date to)
          Get the version of a store by dates.
protected  AVMVersionRootEntity getByID(long vrEntityId)
          
 AVMVersionRootEntity getByRoot(long rootNodeId)
          Get one from its root.
 AVMVersionRootEntity getByVersionID(long storeId, int version)
          Get the VersionRoot corresponding to the given id.
 java.util.List getByVersionsBetween(long id, int startVersion, int endVersion)
           
 java.util.List getByVersionsFrom(long id, int version)
           
 java.util.List getByVersionsTo(long id, int version)
           
 AVMVersionRootEntity getMaxVersion(long storeId)
          Get the highest numbered version in a store.
 java.lang.Long getMaxVersionID(long storeId)
          Get the highest numbered id from all the versions in a store.
 java.util.List getVersionLayeredNodeEntries(long versionRootId)
          
protected abstract  java.util.List getVersionLayeredNodeEntryEntities(long storeId)
           
protected abstract  java.util.List getVersionRootEntitiesByBetween(long storeId, long from, long to)
           
protected abstract  java.util.List getVersionRootEntitiesByFrom(long storeId, long from)
           
protected abstract  java.util.List getVersionRootEntitiesByTo(long storeId, long to)
           
protected abstract  java.util.List getVersionRootEntitiesByVersionsBetween(long storeId, long from, long to)
           
protected abstract  java.util.List getVersionRootEntitiesByVersionsFrom(long storeId, long from)
           
protected abstract  java.util.List getVersionRootEntitiesByVersionsTo(long storeId, long to)
           
protected abstract  AVMVersionRootEntity getVersionRootEntityById(long vrEntityId)
           
protected abstract  AVMVersionRootEntity getVersionRootEntityByRootNodeId(long rootNodeId)
           
protected abstract  AVMVersionRootEntity getVersionRootEntityByStoreVersion(long storeId, int version)
           
protected abstract  AVMVersionRootEntity getVersionRootEntityMaxVersion(long storeId)
           
protected abstract  java.lang.Long getVersionRootEntityMaxVersionId(long storeId)
           
 void setVersionRootEntityCache(org.alfresco.repo.cache.SimpleCache vrEntityCache)
          Set the cache to use for avm_version_roots lookups (optional).
 void updateVersionRoot(AVMVersionRootEntity vrEntity)
          Update an AVM version root (tag and description only)
protected abstract  int updateVersionRootEntity(AVMVersionRootEntity updateVersionRootEntity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAVMVersionRootDAOImpl

public AbstractAVMVersionRootDAOImpl()
Method Detail

setVersionRootEntityCache

public void setVersionRootEntityCache(org.alfresco.repo.cache.SimpleCache vrEntityCache)
Set the cache to use for avm_version_roots lookups (optional).

Parameters:
vrEntityCache -

createVersionRoot

public AVMVersionRootEntity createVersionRoot(long storeId,
                                              long rootNodeId,
                                              int version,
                                              java.lang.String creator,
                                              java.lang.String tag,
                                              java.lang.String description)
Create a new AVM version root

Specified by:
createVersionRoot in interface AVMVersionRootDAO

updateVersionRoot

public void updateVersionRoot(AVMVersionRootEntity vrEntity)
Update an AVM version root (tag and description only)

Specified by:
updateVersionRoot in interface AVMVersionRootDAO

getAllInStore

public java.util.List getAllInStore(long storeId)
Get all the version roots in a given store

Specified by:
getAllInStore in interface AVMVersionRootDAO
Returns:
A List of VersionRoots. In id order.

getByID

protected AVMVersionRootEntity getByID(long vrEntityId)


getByVersionID

public AVMVersionRootEntity getByVersionID(long storeId,
                                           int version)
Get the VersionRoot corresponding to the given id.

Specified by:
getByVersionID in interface AVMVersionRootDAO
Returns:
The VersionRoot or null if not found.

getByRoot

public AVMVersionRootEntity getByRoot(long rootNodeId)
Get one from its root.

Specified by:
getByRoot in interface AVMVersionRootDAO
Returns:
The version root or null.

getByDates

public java.util.List getByDates(long storeId,
                                 java.util.Date from,
                                 java.util.Date to)
Get the version of a store by dates.

Specified by:
getByDates in interface AVMVersionRootDAO
from - The starting date. May be null but not with to null also.
to - The ending date. May be null but not with from null also.
Returns:
A List of VersionRoots.

getMaxVersion

public AVMVersionRootEntity getMaxVersion(long storeId)
Get the highest numbered version in a store.

Specified by:
getMaxVersion in interface AVMVersionRootDAO
Returns:
The highest numbered version.

getMaxVersionID

public java.lang.Long getMaxVersionID(long storeId)
Get the highest numbered id from all the versions in a store.

Specified by:
getMaxVersionID in interface AVMVersionRootDAO
Returns:
The highest numbered id.

deleteVersionRoot

public void deleteVersionRoot(long vrEntityId)
Delete an existing AVM version root

Specified by:
deleteVersionRoot in interface AVMVersionRootDAO

createVersionRootEntity

protected abstract AVMVersionRootEntity createVersionRootEntity(AVMVersionRootEntity vrEntity)

updateVersionRootEntity

protected abstract int updateVersionRootEntity(AVMVersionRootEntity updateVersionRootEntity)

deleteVersionRootEntity

protected abstract int deleteVersionRootEntity(long vrEntityId)

getVersionRootEntityMaxVersion

protected abstract AVMVersionRootEntity getVersionRootEntityMaxVersion(long storeId)

getVersionRootEntityMaxVersionId

protected abstract java.lang.Long getVersionRootEntityMaxVersionId(long storeId)

getVersionRootEntityById

protected abstract AVMVersionRootEntity getVersionRootEntityById(long vrEntityId)

getVersionRootEntityByStoreVersion

protected abstract AVMVersionRootEntity getVersionRootEntityByStoreVersion(long storeId,
                                                                           int version)

getVersionRootEntityByRootNodeId

protected abstract AVMVersionRootEntity getVersionRootEntityByRootNodeId(long rootNodeId)

getAllVersionRootEntitiesByStoreId

protected abstract java.util.List getAllVersionRootEntitiesByStoreId(long storeId)

getVersionRootEntitiesByTo

protected abstract java.util.List getVersionRootEntitiesByTo(long storeId,
                                                             long to)

getVersionRootEntitiesByFrom

protected abstract java.util.List getVersionRootEntitiesByFrom(long storeId,
                                                               long from)

getVersionRootEntitiesByBetween

protected abstract java.util.List getVersionRootEntitiesByBetween(long storeId,
                                                                  long from,
                                                                  long to)

createVersionLayeredNodeEntry

public AVMVersionLayeredNodeEntryEntity createVersionLayeredNodeEntry(long versionRootId,
                                                                      java.lang.String md5sum,
                                                                      java.lang.String path)

Specified by:
createVersionLayeredNodeEntry in interface AVMVersionRootDAO

deleteVersionLayeredNodeEntries

public void deleteVersionLayeredNodeEntries(long versionRootId)

Specified by:
deleteVersionLayeredNodeEntries in interface AVMVersionRootDAO

getVersionLayeredNodeEntries

public java.util.List getVersionLayeredNodeEntries(long versionRootId)

Specified by:
getVersionLayeredNodeEntries in interface AVMVersionRootDAO

createVersionLayeredNodeEntryEntity

protected abstract AVMVersionLayeredNodeEntryEntity createVersionLayeredNodeEntryEntity(long versionRootId,
                                                                                        java.lang.String md5sum,
                                                                                        java.lang.String path)

deleteVersionLayeredNodeEntryEntities

protected abstract int deleteVersionLayeredNodeEntryEntities(long versionRootId)

getVersionLayeredNodeEntryEntities

protected abstract java.util.List getVersionLayeredNodeEntryEntities(long storeId)

getVersionRootEntitiesByVersionsTo

protected abstract java.util.List getVersionRootEntitiesByVersionsTo(long storeId,
                                                                     long to)

getVersionRootEntitiesByVersionsFrom

protected abstract java.util.List getVersionRootEntitiesByVersionsFrom(long storeId,
                                                                       long from)

getVersionRootEntitiesByVersionsBetween

protected abstract java.util.List getVersionRootEntitiesByVersionsBetween(long storeId,
                                                                          long from,
                                                                          long to)

getByVersionsTo

public java.util.List getByVersionsTo(long id,
                                      int version)
Specified by:
getByVersionsTo in interface AVMVersionRootDAO
Returns:

getByVersionsFrom

public java.util.List getByVersionsFrom(long id,
                                        int version)
Specified by:
getByVersionsFrom in interface AVMVersionRootDAO
Returns:

getByVersionsBetween

public java.util.List getByVersionsBetween(long id,
                                           int startVersion,
                                           int endVersion)
Specified by:
getByVersionsBetween in interface AVMVersionRootDAO
Returns:


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