Class 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 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()
      • 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
         
        Specified by:
        value in class GlobalId
      • getParentValueObjectIds

        public java.util.Set<ValueObjectId> getParentValueObjectIds()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class GlobalId