Class ListVAccessor<E extends Entity>

java.lang.Object
io.vertigo.datamodel.data.model.ListVAccessor<E>
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:
  • Constructor Details

    • 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 Details

    • getDtListURI

      public final <A extends DtListURIForAssociation> A getDtListURI()
      Returns:
      the entity uri
    • 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.DefinitionId<DataDefinition> getTargetDefinitionReference()