Module is.codion.framework.domain
Interface EntityDefinition.Attributes
- Enclosing interface:
- EntityDefinition
public static interface EntityDefinition.Attributes
Holds the attribute definitions for an entity type
-
Method Summary
Modifier and TypeMethodDescriptionboolean
<T> AttributeDefinition<T>
definition
(Attribute<T> attribute) <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 existCollection<Attribute<?>>
get()
<T> Attribute<T>
Returns the attribute with the given name, null if none is found.Collection<Attribute<?>>
selected()
Returns the attributes selected by default for this entity type.
-
Method Details
-
get
Collection<Attribute<?>> get()- Returns:
- all attributes for this entity type
-
definitions
List<AttributeDefinition<?>> definitions()- Returns:
- an unmodifiable list view of the attribute definitions
-
derivedFrom
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
- Parameters:
attribute
- the attribute- Returns:
- true if this entity definition contains the given attribute
-
get
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 blob columns.- Returns:
- the default select attributes
-
definition
- Type Parameters:
T
- the attribute type- Parameters:
attribute
- the attribute- Returns:
- the attribute definition associated with
attribute
. - Throws:
IllegalArgumentException
- in case no such attribute existsNullPointerException
- in caseattribute
is null
-
updatable
Collection<AttributeDefinition<?>> updatable()- Returns:
- a Collection containing all updatable attributes associated with the given entityType
-