Class CreateRelationshipCommand
- java.lang.Object
-
- com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommandWrapper
-
- com.sodius.mdw.metamodel.integrity.io.command.CreateRelationshipCommand
-
- All Implemented Interfaces:
ExecutableCommand
public class CreateRelationshipCommand extends ExecutableCommandWrapper implements ExecutableCommand
Creates new relationships betweenItemsin the Integrity database.Constraints:
- The
FieldValuemust be owned by its sourceItem. - The
FieldValuemust reference aField. - All
Items(either source or targets of the relation) must already exist in the database.
Notes:
- You might want to group the execution of multiple updates using a
CompoundCommand.
Usage:
new CreateRelationshipCommand(myValue, myTargetItem).execute();
- See Also:
CompoundCommand
-
-
Constructor Summary
Constructors Constructor Description CreateRelationshipCommand(FieldValue fieldValue, Element targetElement)Instantiates a command to add a relationship in the database.CreateRelationshipCommand(FieldValue fieldValue, Collection<? extends Element> targetElements)Instantiates a command to add a relationship in the database.
-
Method Summary
-
Methods inherited from class com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommandWrapper
execute
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sodius.mdw.metamodel.integrity.io.command.ExecutableCommand
execute
-
-
-
-
Constructor Detail
-
CreateRelationshipCommand
public CreateRelationshipCommand(FieldValue fieldValue, Element targetElement)
Instantiates a command to add a relationship in the database.- Parameters:
fieldValue- the field value which references a relation to create.targetElement- the target element of the relationship.
-
CreateRelationshipCommand
public CreateRelationshipCommand(FieldValue fieldValue, Collection<? extends Element> targetElements)
Instantiates a command to add a relationship in the database.- Parameters:
fieldValue- the field value which references a relation to create.targetElements- the target elements of the relationship.
-
-