Package org.javers.core.metamodel.object
Class ValueObjectId
- java.lang.Object
-
- org.javers.core.metamodel.object.GlobalId
-
- org.javers.core.metamodel.object.ValueObjectId
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GlobalId>
- Direct Known Subclasses:
ValueObjectIdWithHash
public class ValueObjectId extends GlobalId
ValueObject global unique identifier.
Since ValueObjects doesn't have public Id, they are identified by fragment path in the context of owning Entity instance.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValueObjectId(java.lang.String typeName, GlobalId ownerId, java.lang.String fragment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFragment()
Path to ValueObject, should be unique in the Entity instance scope.GlobalId
getOwnerId()
java.util.Set<ValueObjectId>
getParentValueObjectIds()
boolean
hasOwnerOfType(EntityType entityType)
GlobalId
masterObjectId()
java.lang.String
toString()
java.lang.String
value()
For ex.: org.javers.core.model.SnapshotEntity/1 org.javers.core.model.SnapshotEntity/2#setOfValueObjects
-
-
-
Constructor Detail
-
ValueObjectId
public ValueObjectId(java.lang.String typeName, GlobalId ownerId, java.lang.String fragment)
-
-
Method Detail
-
getFragment
public java.lang.String getFragment()
Path to ValueObject, should be unique in the Entity instance scope. Usually, property name. It works like fragment identifier in URL
-
hasOwnerOfType
public boolean hasOwnerOfType(EntityType entityType)
-
getOwnerId
public GlobalId getOwnerId()
-
masterObjectId
public GlobalId masterObjectId()
- Overrides:
masterObjectId
in classGlobalId
-
value
public java.lang.String value()
Description copied from class:GlobalId
For ex.: org.javers.core.model.SnapshotEntity/1 org.javers.core.model.SnapshotEntity/2#setOfValueObjects
-
getParentValueObjectIds
public java.util.Set<ValueObjectId> getParentValueObjectIds()
-
-