Interface EntityDefinition.Attributes

Enclosing interface:
EntityDefinition

public static interface EntityDefinition.Attributes
Holds the attribute definitions for an entity type
  • Method Details

    • get

      Returns:
      all attributes for this entity type
    • definitions

      Collection<AttributeDefinition<?>> definitions()
      Returns:
      an unmodifiable view of the attribute definitions
    • derivedFrom

      <T> Collection<Attribute<?>> derivedFrom(Attribute<T> attribute)
      Returns the attributes which values are derived from the value of the given attribute, an empty collection if no such derived attributes exist
      Type Parameters:
      T - the attribute type
      Parameters:
      attribute - the attribute
      Returns:
      a collection containing the attributes which are derived from the given attribute
    • contains

      boolean contains(Attribute<?> attribute)
      Parameters:
      attribute - the attribute
      Returns:
      true if this entity definition contains the given attribute
    • get

      <T> Attribute<T> get(String attributeName)
      Returns the attribute with the given name, null if none is found.
      Type Parameters:
      T - the attribute type
      Parameters:
      attributeName - the name of the attribute to fetch
      Returns:
      the attribute with the given name, null if none is found
    • selected

      Collection<Attribute<?>> selected()
      Returns the attributes selected by default for this entity type. Contains the selectable columns and foreign keys, excluding lazy loaded columns and foreign key values based on lazy loaded columns.
      Returns:
      the default select attributes
    • definition

      <T> AttributeDefinition<T> definition(Attribute<T> attribute)
      Type Parameters:
      T - the attribute type
      Parameters:
      attribute - the attribute
      Returns:
      the attribute definition associated with attribute.
      Throws:
      IllegalArgumentException - in case no such attribute exists
      NullPointerException - in case attribute is null
    • updatable

      Returns:
      a Collection containing all updatable attributes associated with the given entityType