org.alfresco.repo.domain.avm
Class AbstractAVMNodeLinksDAOImpl

java.lang.Object
  extended by org.alfresco.repo.domain.avm.AbstractAVMNodeLinksDAOImpl
All Implemented Interfaces:
AVMNodeLinksDAO
Direct Known Subclasses:
AVMNodeLinksDAOImpl

public abstract class AbstractAVMNodeLinksDAOImpl
extends java.lang.Object
implements AVMNodeLinksDAO

Abstract implementation for AVMNodeLinks DAO.

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

Since:
3.2

Constructor Summary
AbstractAVMNodeLinksDAOImpl()
          Default constructor.
 
Method Summary
 void createChildEntry(long parentNodeId, java.lang.String name, long childNodeId)
          Get an entry by name and parent
protected abstract  void createChildEntryEntity(AVMChildEntryEntity childEntryEntity)
           
 void createHistoryLink(long ancestorNodeId, long descendentNodeId)
          
protected abstract  void createHistoryLinkEntity(long ancestorNodeId, long descendentNodeId)
           
 void createMergeLink(long mergeFromNodeId, long mergeToNodeId)
          
protected abstract  void createMergeLinkEntity(long mergeFromNodeId, long mergeToNodeId)
           
 void deleteChildEntriesByParent(long parentNodeId)
          Delete all children of the given parent
 void deleteChildEntry(AVMChildEntryEntity childEntryEntity)
          Delete one
protected abstract  int deleteChildEntryEntities(long parentNodeId)
           
protected abstract  int deleteChildEntryEntity(long parentNodeId, long childNodeId)
           
protected abstract  int deleteChildEntryEntity(long parentNodeId, java.lang.String name)
           
 void deleteHistoryLink(long ancestorNodeId, long descendentNodeId)
          
protected abstract  int deleteHistoryLinkEntity(long ancestorNodeId, long descendentNodeId)
           
 void deleteMergeLink(long mergeFromNodeId, long mergeToNodeId)
          
protected abstract  int deleteMergeLinkEntity(long mergeFromNodeId, long mergeToNodeId)
           
 java.util.List getChildEntriesByChild(long childNodeId)
          Get all the ChildEntries corresponding to the given child
 java.util.List getChildEntriesByParent(long parentNodeId, java.lang.String childNamePattern)
          Get all the children of a given parent (with optional child name pattern)
 AVMChildEntryEntity getChildEntry(long parentNodeId, long childNodeId)
          Get the entry for a given child in a given parent
 AVMChildEntryEntity getChildEntry(long parentNodeId, java.lang.String name)
          Get an entry by name and parent
protected abstract  java.util.List getChildEntryEntitiesByChild(long childNodeId)
           
protected abstract  java.util.List getChildEntryEntitiesByParent(long parentNodeId)
           
protected abstract  java.util.List getChildEntryEntitiesByParent(long parentNodeId, java.lang.String childNamePattern)
           
protected abstract  AVMChildEntryEntity getChildEntryEntity(AVMChildEntryEntity childEntryEntity)
           
protected abstract  AVMChildEntryEntity getChildEntryEntity(long parentNodeId, long childNodeId)
           
protected abstract  AVMChildEntryEntity getChildEntryEntity(long parentNodeId, java.lang.String name)
           
 AVMHistoryLinkEntity getHistoryLinkByDescendent(long descendentNodeId)
          
protected abstract  java.util.List getHistoryLinkEntitiesByAncestor(long ancestorNodeId)
           
protected abstract  AVMHistoryLinkEntity getHistoryLinkEntity(long ancestorNodeId, long descendentNodeId)
           
protected abstract  AVMHistoryLinkEntity getHistoryLinkEntityByDescendent(long descendentNodeId)
           
 java.util.List getHistoryLinksByAncestor(long ancestorNodeId)
          
 AVMMergeLinkEntity getMergeLinkByTo(long mergeToNodeId)
          
protected abstract  java.util.List getMergeLinkEntitiesByFrom(long mergeFromNodeId)
           
protected abstract  AVMMergeLinkEntity getMergeLinkEntityByTo(long mergeToNodeId)
           
 java.util.List getMergeLinksByFrom(long mergeFromNodeId)
          
 void setAvmChildEntryCache(org.alfresco.repo.cache.SimpleCache avmChildEntryCache)
          Set the cache to use for avm_child_entry lookups (optional).
 void setAvmHistoryLinkCache(org.alfresco.repo.cache.SimpleCache avmHistoryLinkCache)
          Set the cache to use for avm_history_link lookups (optional).
 void updateChildEntry(AVMChildEntryEntity childEntryEntity)
          Specific rename 'case' only
protected abstract  int updateChildEntryEntity(AVMChildEntryEntity childEntryEntity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAVMNodeLinksDAOImpl

public AbstractAVMNodeLinksDAOImpl()
Default constructor.

This sets up the DAO accessors to bypass any caching to handle the case where the caches are not supplied in the setters.

Method Detail

setAvmChildEntryCache

public void setAvmChildEntryCache(org.alfresco.repo.cache.SimpleCache avmChildEntryCache)
Set the cache to use for avm_child_entry lookups (optional).

Parameters:
avmChildEntryCache - the cache of IDs to AVMChildEntryEntities

setAvmHistoryLinkCache

public void setAvmHistoryLinkCache(org.alfresco.repo.cache.SimpleCache avmHistoryLinkCache)
Set the cache to use for avm_history_link lookups (optional).

Parameters:
avmHistoryLinkCache - the cache of ID to ID (from descendent to ancestor)

createChildEntry

public void createChildEntry(long parentNodeId,
                             java.lang.String name,
                             long childNodeId)
Get an entry by name and parent

Specified by:
createChildEntry in interface AVMNodeLinksDAO

getChildEntry

public AVMChildEntryEntity getChildEntry(long parentNodeId,
                                         java.lang.String name)
Get an entry by name and parent

Specified by:
getChildEntry in interface AVMNodeLinksDAO

getChildEntriesByParent

public java.util.List getChildEntriesByParent(long parentNodeId,
                                              java.lang.String childNamePattern)
Get all the children of a given parent (with optional child name pattern)

Specified by:
getChildEntriesByParent in interface AVMNodeLinksDAO

getChildEntry

public AVMChildEntryEntity getChildEntry(long parentNodeId,
                                         long childNodeId)
Get the entry for a given child in a given parent

Specified by:
getChildEntry in interface AVMNodeLinksDAO

getChildEntriesByChild

public java.util.List getChildEntriesByChild(long childNodeId)
Get all the ChildEntries corresponding to the given child

Specified by:
getChildEntriesByChild in interface AVMNodeLinksDAO

updateChildEntry

public void updateChildEntry(AVMChildEntryEntity childEntryEntity)
Specific rename 'case' only

Specified by:
updateChildEntry in interface AVMNodeLinksDAO

deleteChildEntry

public void deleteChildEntry(AVMChildEntryEntity childEntryEntity)
Delete one

Specified by:
deleteChildEntry in interface AVMNodeLinksDAO

deleteChildEntriesByParent

public void deleteChildEntriesByParent(long parentNodeId)
Delete all children of the given parent

Specified by:
deleteChildEntriesByParent in interface AVMNodeLinksDAO

getChildEntryEntitiesByParent

protected abstract java.util.List getChildEntryEntitiesByParent(long parentNodeId)

getChildEntryEntitiesByParent

protected abstract java.util.List getChildEntryEntitiesByParent(long parentNodeId,
                                                                java.lang.String childNamePattern)

getChildEntryEntitiesByChild

protected abstract java.util.List getChildEntryEntitiesByChild(long childNodeId)

getChildEntryEntity

protected abstract AVMChildEntryEntity getChildEntryEntity(long parentNodeId,
                                                           java.lang.String name)

getChildEntryEntity

protected abstract AVMChildEntryEntity getChildEntryEntity(long parentNodeId,
                                                           long childNodeId)

getChildEntryEntity

protected abstract AVMChildEntryEntity getChildEntryEntity(AVMChildEntryEntity childEntryEntity)

createChildEntryEntity

protected abstract void createChildEntryEntity(AVMChildEntryEntity childEntryEntity)

updateChildEntryEntity

protected abstract int updateChildEntryEntity(AVMChildEntryEntity childEntryEntity)

deleteChildEntryEntity

protected abstract int deleteChildEntryEntity(long parentNodeId,
                                              java.lang.String name)

deleteChildEntryEntity

protected abstract int deleteChildEntryEntity(long parentNodeId,
                                              long childNodeId)

deleteChildEntryEntities

protected abstract int deleteChildEntryEntities(long parentNodeId)

createMergeLink

public void createMergeLink(long mergeFromNodeId,
                            long mergeToNodeId)

Specified by:
createMergeLink in interface AVMNodeLinksDAO

deleteMergeLink

public void deleteMergeLink(long mergeFromNodeId,
                            long mergeToNodeId)

Specified by:
deleteMergeLink in interface AVMNodeLinksDAO

getMergeLinkByTo

public AVMMergeLinkEntity getMergeLinkByTo(long mergeToNodeId)

Specified by:
getMergeLinkByTo in interface AVMNodeLinksDAO

getMergeLinksByFrom

public java.util.List getMergeLinksByFrom(long mergeFromNodeId)

Specified by:
getMergeLinksByFrom in interface AVMNodeLinksDAO

createMergeLinkEntity

protected abstract void createMergeLinkEntity(long mergeFromNodeId,
                                              long mergeToNodeId)

deleteMergeLinkEntity

protected abstract int deleteMergeLinkEntity(long mergeFromNodeId,
                                             long mergeToNodeId)

getMergeLinkEntityByTo

protected abstract AVMMergeLinkEntity getMergeLinkEntityByTo(long mergeToNodeId)

getMergeLinkEntitiesByFrom

protected abstract java.util.List getMergeLinkEntitiesByFrom(long mergeFromNodeId)

createHistoryLink

public void createHistoryLink(long ancestorNodeId,
                              long descendentNodeId)

Specified by:
createHistoryLink in interface AVMNodeLinksDAO

deleteHistoryLink

public void deleteHistoryLink(long ancestorNodeId,
                              long descendentNodeId)

Specified by:
deleteHistoryLink in interface AVMNodeLinksDAO

getHistoryLinkByDescendent

public AVMHistoryLinkEntity getHistoryLinkByDescendent(long descendentNodeId)

Specified by:
getHistoryLinkByDescendent in interface AVMNodeLinksDAO

getHistoryLinksByAncestor

public java.util.List getHistoryLinksByAncestor(long ancestorNodeId)

Specified by:
getHistoryLinksByAncestor in interface AVMNodeLinksDAO

createHistoryLinkEntity

protected abstract void createHistoryLinkEntity(long ancestorNodeId,
                                                long descendentNodeId)

deleteHistoryLinkEntity

protected abstract int deleteHistoryLinkEntity(long ancestorNodeId,
                                               long descendentNodeId)

getHistoryLinkEntity

protected abstract AVMHistoryLinkEntity getHistoryLinkEntity(long ancestorNodeId,
                                                             long descendentNodeId)

getHistoryLinkEntityByDescendent

protected abstract AVMHistoryLinkEntity getHistoryLinkEntityByDescendent(long descendentNodeId)

getHistoryLinkEntitiesByAncestor

protected abstract java.util.List getHistoryLinkEntitiesByAncestor(long ancestorNodeId)


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