Vordel SDK

com.vordel.es
Class EntityBranch

java.lang.Object
  extended by com.vordel.es.EntityBranch
Direct Known Subclasses:
TransactionalEntityBranch

public class EntityBranch
extends java.lang.Object


Nested Class Summary
 class EntityBranch.EntityNode
           
 
Constructor Summary
EntityBranch(EntityStore es, ESPK branchRootPK)
           
EntityBranch(EntityStore es, ESPK branchRootPK, java.util.Set<ESPK> pks)
          Create a branch of the entity hierarchy from a given store and starting point.
 
Method Summary
protected  ESPK addNodes(EntityStore es, ESPK parentPK, EntityBranch.EntityNode n, java.util.Set<ESPK> newPKs)
           
protected  EntityBranch.EntityNode createNode(Entity e)
           
protected  ESPK doGraft(EntityStore store, ESPK espk, java.util.Set<PortableESPK> unresolved, java.util.Set<ESPK> newPKs)
           
protected  Entity getRootEntity()
           
 EntityStore getSourceEntityStore()
           
 ESPK graftTo(EntityStore store, ESPK espk, java.util.Set<PortableESPK> unresolved, java.util.Set<ESPK> newPKs)
           
 boolean isCompatibleGraftPoint(Entity e)
           
protected  void moveType(EntityStore destES, EntityBranch.EntityNode n, EntityType currType)
           
 void resetRoot()
          If you've been modifying the root entity for a key conflict, but want to discard changes, reset the root before leaving this branch lying around for someone else to paste.
protected  void setType(EntityBranch.EntityNode n, EntityType t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityBranch

public EntityBranch(EntityStore es,
                    ESPK branchRootPK)
             throws EntityStoreException
Throws:
EntityStoreException

EntityBranch

public EntityBranch(EntityStore es,
                    ESPK branchRootPK,
                    java.util.Set<ESPK> pks)
             throws EntityStoreException
Create a branch of the entity hierarchy from a given store and starting point.

Parameters:
es - The entity store from which to take the branch image
branchRootPK - The ESPK of the root Entity of the branch
pks - The original ESPKs of each of the Entities which were traversed to generate this branch
Throws:
EntityStoreException
Method Detail

createNode

protected EntityBranch.EntityNode createNode(Entity e)

isCompatibleGraftPoint

public boolean isCompatibleGraftPoint(Entity e)

graftTo

public ESPK graftTo(EntityStore store,
                    ESPK espk,
                    java.util.Set<PortableESPK> unresolved,
                    java.util.Set<ESPK> newPKs)
             throws EntityStoreException
Parameters:
store - The EntityStore on which to operate.
espk - The Entity under which the branch will be grafted.
unresolved - A holder for normalized references to links which could not be resolved following a graft.
newPKs - A holder for the new Entities' PKs. May be null if caller is not interested.
Returns:
The ESPK of the new root Entity for this branch graft.
Throws:
EntityStoreException

doGraft

protected ESPK doGraft(EntityStore store,
                       ESPK espk,
                       java.util.Set<PortableESPK> unresolved,
                       java.util.Set<ESPK> newPKs)
                throws EntityStoreException
Throws:
EntityStoreException

resetRoot

public void resetRoot()
If you've been modifying the root entity for a key conflict, but want to discard changes, reset the root before leaving this branch lying around for someone else to paste.


moveType

protected void moveType(EntityStore destES,
                        EntityBranch.EntityNode n,
                        EntityType currType)
                 throws EntityStoreException
Throws:
EntityStoreException

addNodes

protected ESPK addNodes(EntityStore es,
                        ESPK parentPK,
                        EntityBranch.EntityNode n,
                        java.util.Set<ESPK> newPKs)
                 throws EntityStoreException
Throws:
EntityStoreException

getSourceEntityStore

public EntityStore getSourceEntityStore()

setType

protected void setType(EntityBranch.EntityNode n,
                       EntityType t)

getRootEntity

protected Entity getRootEntity()

Vordel SDK


This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel