Package de.espirit.or.schema
Interface ComposedAttribute<T>
- All Superinterfaces:
Attribute<T>
,Serializable
Definition of a foreign key based attribute.
- Since:
- 4.0.17
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Enum represanting the relation between tables. -
Method Summary
Modifier and TypeMethodDescription@Nullable ComposedAttribute<?>
Return the opposed attribute defined in the target entity type.Return the entity type of the value that can be assigned to this composed attribute.boolean
Indicates the relation to be of aggregating nature.boolean
Return true if the value of this attribute is loaded on demand else false.boolean
In an 1:n or 1:1 relation there is a main attribute in the parent entity type which defines or owns the foreign key.boolean
isToMany()
Indicates to allow for referring to multiple foreign entries.boolean
isToOne()
Indicates to allow for referring to exactly one foreign entry.void
setAggregateByValue
(boolean flag) Defines whether the relation is of aggregating nature.void
setLazyLoad
(boolean lazyLoad) Defines whether to load values on demand.Methods inherited from interface de.espirit.or.schema.Attribute
getDisplayText, getName, getOwner, getType, getValidator, isKey, isReadOnly, isRequired, isValid, isVisible, setName, setReadOnly, setRequired, setValidator
-
Method Details
-
getTargetType
EntityType getTargetType()Return the entity type of the value that can be assigned to this composed attribute.- Since:
- 4.0.17
-
getOpposedAttribute
Return the opposed attribute defined in the target entity type.- Since:
- 4.0.17
-
isLazyLoad
boolean isLazyLoad()Return true if the value of this attribute is loaded on demand else false.- Since:
- 4.0.17
-
setLazyLoad
void setLazyLoad(boolean lazyLoad) Defines whether to load values on demand.- Parameters:
lazyLoad
-true
, for on demand value loading.- Since:
- 4.0.17
-
setAggregateByValue
void setAggregateByValue(boolean flag) Defines whether the relation is of aggregating nature.- Parameters:
flag
-true
, to have it aggregating.- Since:
- 4.0.17
-
isAggregateByValue
boolean isAggregateByValue()Indicates the relation to be of aggregating nature.- Returns:
true
, if aggregating.- Since:
- 4.0.17
-
isMainAttribute
boolean isMainAttribute()In an 1:n or 1:1 relation there is a main attribute in the parent entity type which defines or owns the foreign key. The opposed attribute of this attribute is an optional attribute and is defined if the navigation from a child entity to its parent is allowed. If a main attribute is deleted then its opposed attribute and the assigned foreign key is deleted too. Return true if this attribute is the main attribute in the relation.- Since:
- 4.0.17
-
isToOne
boolean isToOne()Indicates to allow for referring to exactly one foreign entry.- Returns:
true
, if only one foreign entry can be referred to.- Since:
- 4.0.17
-
isToMany
boolean isToMany()Indicates to allow for referring to multiple foreign entries.- Returns:
true
, if multiple entries may be referenced.- Since:
- 4.0.17
-