Class ExpandedReference<T>

  • All Implemented Interfaces:

    public final class ExpandedReference<T>
    extends Reference<T>
    An expanded reference has a value, call get() will return that referent value.
    • Method Detail

      • get

        public T get()
        Specified by:
        get in class Reference<T>
        the reference object or null if the object does not exist. It is Illegal to call get() on a reference that has not been expanded
      • asOptional

        public Optional<T> asOptional()
      • exists

        public boolean exists()
        Specified by:
        exists in class Reference<T>
        true if the object is expanded and exists, or is collapsed and has enough information to identify itself, false if the object does not exist (is empty)
      • isExpanded

        public boolean isExpanded()
        Description copied from class: Reference
        indicates a reference is expanded and can be resolved to an object by calling get, or whether the reference is collapsed and calling get will throw an exception.
        Specified by:
        isExpanded in class Reference<T>
      • getIdProperties

        public Map<Object,​Object> getIdProperties()
        Description copied from class: Reference
        A map of properties key by the idProperty enum in the model class for the referent object. The map contains properties sufficient to identify the referent object.
        Specified by:
        getIdProperties in class Reference<T>
        a map of id properties keyed by idProperty enum
      • referentClass

        public Class referentClass()
        Specified by:
        referentClass in class Reference<T>
        the class of the referent object.