Class ReplicationNode
java.lang.Object
org.nuiton.topia.replication.model.ReplicationNode
public class ReplicationNode
extends java.lang.Object
Model of a replication's node.
The invariant of a replication's node is his
contract, means the
type of entity to replicate.- Since:
- 2.2.0
- Author:
- tchemit <chemit@codelutin.com>
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,ReplicationNode>associationsdictionnary of associations defined on the node (keys are association name, and values are target node).protected java.util.Set<java.lang.String>associationsToDettachnames of association to dettach while replication.protected TopiaEntityEnumcontractcontract of entity of the node.protected java.util.Map<java.lang.String,ReplicationNode>dependenciescompositions defined on the node (keys are association name, and values are target node).protected java.util.Set<java.lang.String>dependenciesToDettachnames of dependency to dettach while replication.protected java.util.List<ReplicationOperationDef>operationsoperations to fire when replication pass on this node.protected EntityOperator<? super TopiaEntity>operatorentity operator.protected java.util.Set<ReplicationNode>shellshell of the node. -
Constructor Summary
Constructors Constructor Description ReplicationNode(TopiaEntityEnum contract) -
Method Summary
Modifier and Type Method Description voidaddAssociation(java.lang.String name, ReplicationNode node)voidaddAssociationToDettach(java.lang.String key)voidaddDependency(java.lang.String name, ReplicationNode node)voidaddDependencyToDettach(java.lang.String key)voidaddOperation(int index, ReplicationOperationDef op)voidaddOperation(ReplicationOperationDef op)voidclearOperations()Remove all operation of the node (for example when no data is associated with the type of the node, then no needed operations).booleanequals(java.lang.Object obj)java.util.Map<java.lang.String,ReplicationNode>getAssociations()java.lang.String[]getAssociationsDettached(ReplicationNode node)java.util.Set<java.lang.String>getAssociationsToDettach()TopiaEntityEnumgetContract()java.util.Map<java.lang.String,ReplicationNode>getDependencies()java.lang.String[]getDependenciesDettached(ReplicationNode node)java.util.Set<java.lang.String>getDependenciesToDettach()java.lang.Class<? extends TopiaEntity>getEntityType()ReplicationOperationDef[]getOperations()EntityOperator<? super TopiaEntity>getOperator()java.util.Set<ReplicationNode>getShell()ReplicationOperationDef[]getUndoableOperations()booleanhasAssociation()booleanhasAssociationsToDettach()booleanhasDependenciesToDettach()booleanhasDependency()inthashCode()voidsetOperations(java.util.List<ReplicationOperationDef> operations)voidsetShell(java.util.Set<ReplicationNode> shell)voidsortOperations()sort operation by their phase.java.lang.StringtoString()
-
Field Details
-
contract
contract of entity of the node. -
operator
entity operator. -
shell
shell of the node. -
associations
dictionnary of associations defined on the node (keys are association name, and values are target node). -
associationsToDettach
protected final java.util.Set<java.lang.String> associationsToDettachnames of association to dettach while replication. -
dependencies
compositions defined on the node (keys are association name, and values are target node). -
dependenciesToDettach
protected final java.util.Set<java.lang.String> dependenciesToDettachnames of dependency to dettach while replication. -
operations
operations to fire when replication pass on this node.
-
-
Constructor Details
-
Method Details
-
addAssociation
-
addOperation
-
addOperation
-
setOperations
-
getOperations
-
getUndoableOperations
-
hasAssociation
public boolean hasAssociation() -
hasAssociationsToDettach
public boolean hasAssociationsToDettach() -
getAssociationsDettached
-
getDependenciesDettached
-
hasDependenciesToDettach
public boolean hasDependenciesToDettach() -
hasDependency
public boolean hasDependency() -
addDependency
-
addAssociationToDettach
public void addAssociationToDettach(java.lang.String key) -
addDependencyToDettach
public void addDependencyToDettach(java.lang.String key) -
getAssociations
-
getAssociationsToDettach
public java.util.Set<java.lang.String> getAssociationsToDettach() -
getDependenciesToDettach
public java.util.Set<java.lang.String> getDependenciesToDettach() -
getContract
-
getEntityType
-
getOperator
-
getDependencies
-
getShell
-
setShell
-
sortOperations
public void sortOperations()sort operation by their phase.- See Also:
ReplicationOperationPhase
-
clearOperations
public void clearOperations()Remove all operation of the node (for example when no data is associated with the type of the node, then no needed operations). -
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-