Class ListVAccessor<E extends Entity>

  • Type Parameters:
    E - the type of the targetedEntity
    All Implemented Interfaces:
    Serializable

    public class ListVAccessor<E extends Entity>
    extends Object
    implements Serializable
    This class is a way to access to a list of entities managed by a relationship. It's a kind of box (aka optional) that offers a small list of methods.
    Author:
    mlaroche
    See Also:
    Serialized Form
    • Constructor Detail

      • ListVAccessor

        public ListVAccessor​(Entity entity,
                             String associationDefinitionName,
                             String roleName)
        Constructor.
        Parameters:
        entity - the entity
        roleName - the role of the association (case of multiple associations with the same entity)
    • Method Detail

      • get

        public final DtList<E> get()
        Loads the value if needed.
      • set

        public void set​(DtList<E> dtList)
      • reset

        public final void reset()
        Loads the value if needed.
      • isLoaded

        public final boolean isLoaded()
        Returns:
        if entity is already loaded
      • getRole

        public final String getRole()
        Returns:
        Role of this relation
      • getSourceUID

        protected UID<E> getSourceUID()
      • getTargetDefinitionReference

        protected io.vertigo.core.node.definition.DefinitionReference<DtDefinition> getTargetDefinitionReference()