public class EntityBranch
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
EntityBranch.EntityNode |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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) |
public EntityBranch(EntityStore es, ESPK branchRootPK) throws EntityStoreException
EntityStoreException
public EntityBranch(EntityStore es, ESPK branchRootPK, java.util.Set<ESPK> pks) throws EntityStoreException
es
- The entity store from which to take the branch imagebranchRootPK
- The ESPK of the root Entity of the branchpks
- The original ESPKs of each of the Entities which were
traversed to generate this branchEntityStoreException
- If there are any problems traversing the branch.protected EntityBranch.EntityNode createNode(Entity e)
public boolean isCompatibleGraftPoint(Entity e)
public ESPK graftTo(EntityStore store, ESPK espk, java.util.Set<PortableESPK> unresolved, java.util.Set<ESPK> newPKs) throws EntityStoreException
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.EntityStoreException
- If an equivalent root node already exists at the graft point.protected ESPK doGraft(EntityStore store, ESPK espk, java.util.Set<PortableESPK> unresolved, java.util.Set<ESPK> newPKs) throws EntityStoreException
EntityStoreException
public void resetRoot()
protected void moveType(EntityStore destES, EntityBranch.EntityNode n, EntityType currType) throws EntityStoreException
EntityStoreException
protected ESPK addNodes(EntityStore es, ESPK parentPK, EntityBranch.EntityNode n, java.util.Set<ESPK> newPKs) throws EntityStoreException
EntityStoreException
public EntityStore getSourceEntityStore()
protected void setType(EntityBranch.EntityNode n, EntityType t)
protected Entity getRootEntity()
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel