Package mc.core.model.base
Class EntityToEntity
java.lang.Object
mc.core.model.base.EntityToEntity
- All Implemented Interfaces:
Serializable,IBaseEntity,ICoreEntity,IObjectAssignment,ISortableEntity,IVersionDependent
@Entity
public class EntityToEntity
extends Object
implements IBaseEntity, IVersionDependent, IObjectAssignment
Class to represent the association of a ComplexEntity with a ComplexEntity of the same type, also called Relation.
Although EntityToEntity works with ComplexEntity, since RelationType works with NodeTypes currently only Nodes can
take part in Relations. The relationType is mandatory and configures the relation. The first Node (in a
MASTER_SLAVE-relation the master) must be of type given by entity1 in RelationType, the related Node of one of the
types given by entities2 of RelationType.
If the Node has snapshot functionality its EntityToEntity are copied with the snapshot. The snapshotFlag is set accordingly.
Filters can be assigned to EntityToEntitys in order to group and structure them for publication or display, currently not used.
If the Node has snapshot functionality its EntityToEntity are copied with the snapshot. The snapshotFlag is set accordingly.
Filters can be assigned to EntityToEntitys in order to group and structure them for publication or display, currently not used.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classcomparator for EntityToAttribute, compare by prio.static classNested classes/interfaces inherited from interface mc.core.model.base.IObjectAssignment
IObjectAssignment.ObjectAssignmentBase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlonggetId()intgetPrio()inthashCode()voidsetEntity1(ComplexEntity entity1) voidsetEntity2(ComplexEntity entity2) voidsetEntityProfile(EntityProfile entityProfile) voidsetId(long id) voidsetPrio(int prio) voidsetRelationType(RelationType relationType) voidsetSlaveCount(Integer count) toString()
-
Constructor Details
-
EntityToEntity
public EntityToEntity()
-
-
Method Details
-
getId
public long getId()- Specified by:
getIdin interfaceIBaseEntity
-
setId
public void setId(long id) - Specified by:
setIdin interfaceIBaseEntity
-
getEntity1
-
setEntity1
-
getEntity2
-
setEntity2
-
getPrio
public int getPrio()- Specified by:
getPrioin interfaceISortableEntity
-
setPrio
public void setPrio(int prio) - Specified by:
setPrioin interfaceISortableEntity
-
getRelationType
-
setRelationType
-
getEntityProfile
-
setEntityProfile
-
getSlaveCount
-
setSlaveCount
-
getAssignedObject
- Specified by:
getAssignedObjectin interfaceIObjectAssignment- Returns:
- the object that holds the list of assigned entities
-
equals
-
hashCode
public int hashCode() -
toString
-