Package de.espirit.or.schema
Interface Attribute<T>
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
ComposedAttribute<T>
,SimpleAttribute<T>
This is the interface for all implementations of attributes which can defined
by an entity type.
- Since:
- 4.0.17
-
Method Summary
Modifier and TypeMethodDescriptionReturn the display text of this attribute.getName()
Return the name of this attribute.getOwner()
Return the entity type which defines this attribute.getType()
Return the type of this attribute.Return the validator of this attribute.boolean
isKey()
Return true if this attribute is a key attribute else false.boolean
A read only attribute can not be set by the client.boolean
Return true if this attribute is a required attribute.boolean
Check ifvalue
can be assigned to this attribute by using the assigned validatorsetValidator(de.espirit.or.schema.Validator<T>)
.boolean
Return true if this attribute is visible in the schema editor.void
Set the name of this attribute toname
.void
setReadOnly
(boolean readOnly) Set the read only property of this attribute toreadOnly
.void
setRequired
(boolean flag) Set the required property of this attribute toflag
.void
setValidator
(Validator<T> validator) Set the validator of this attribute tovalidator
.
-
Method Details
-
getName
String getName()Return the name of this attribute.- Since:
- 4.0.17
-
setName
Set the name of this attribute toname
.- Since:
- 4.0.17
-
getDisplayText
String getDisplayText()Return the display text of this attribute. This method is used by the UI.- Since:
- 4.0.17
-
getType
Return the type of this attribute.- If the attribute is a simple attribute then the type is the java class of the value which can be assigned to this attribute.
- by a composed attribute then type is the
EntityType
- Since:
- 4.0.17
-
isRequired
boolean isRequired()Return true if this attribute is a required attribute.- Since:
- 4.0.17
-
setRequired
void setRequired(boolean flag) Set the required property of this attribute toflag
.- Since:
- 4.0.17
-
getValidator
Return the validator of this attribute.- Since:
- 4.0.17
-
setValidator
Set the validator of this attribute tovalidator
.- Parameters:
validator
-- Since:
- 4.0.17
-
isValid
Check ifvalue
can be assigned to this attribute by using the assigned validatorsetValidator(de.espirit.or.schema.Validator<T>)
.- Since:
- 4.0.17
-
isReadOnly
boolean isReadOnly()A read only attribute can not be set by the client. Its value is generated by the ORMapper.- Since:
- 4.0.17
-
setReadOnly
void setReadOnly(boolean readOnly) Set the read only property of this attribute toreadOnly
. Default value for this property isfalse
.- Since:
- 4.0.17
-
getOwner
EntityType getOwner()Return the entity type which defines this attribute.- Since:
- 4.0.17
-
isKey
boolean isKey()Return true if this attribute is a key attribute else false.- Since:
- 4.0.17
-
isVisible
boolean isVisible()Return true if this attribute is visible in the schema editor.- Since:
- 4.0.17
-