de.espirit.or.schema
Interface Attribute<T>

All Superinterfaces:
Serializable
All Known Subinterfaces:
ComposedAttribute<T>

public interface Attribute<T>
extends Serializable

This is the interface for all implementations of attributes which can defined by an entity type.

Since:
4.0.17

Method Summary
 String getDisplayText()
          Return the display text of this attribute.
 String getName()
          Return the name of this attribute.
 EntityType getOwner()
          Return the entity type which defines this attribute.
 Class<T> getType()
          Return the type of this attribute.
 de.espirit.or.schema.Validator<T> getValidator()
          Return the validator of this attribute.
 boolean isKey()
          Return true if this attribute is a key attribute else false.
 boolean isReadOnly()
          A read only attribute can not be set by the client.
 boolean isRequired()
          Return true if this attribute is a required attribute.
 boolean isValid(T value)
          Check if value can be assigned to this attribute by using the assigned validator Attribute.setValidator(de.espirit.or.schema.Validator).
 boolean isVisible()
          Return true if this attribute is visible in the schema editor.
 void setName(String name)
          Set the name of this attribute to name.
 void setReadOnly(boolean readOnly)
          Set the read only property of this attribute to readOnly.
 void setRequired(boolean flag)
          Set the required property of this attribute to flag.
 void setValidator(de.espirit.or.schema.Validator<T> validator)
          Set the validator of this attribute to validator.
 

Method Detail

getName

String getName()
Return the name of this attribute.

Since:
4.0.17

setName

void setName(String name)
Set the name of this attribute to name.

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

Class<T> getType()
Return the type of this attribute.

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 to flag.

Since:
4.0.17

getValidator

de.espirit.or.schema.Validator<T> getValidator()
Return the validator of this attribute.

Since:
4.0.17

setValidator

void setValidator(de.espirit.or.schema.Validator<T> validator)
Set the validator of this attribute to validator.

Parameters:
validator -
Since:
4.0.17

isValid

boolean isValid(T value)
Check if value can be assigned to this attribute by using the assigned validator Attribute.setValidator(de.espirit.or.schema.Validator).

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 to readOnly. Default value for this property is false.

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


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480