Class AttributeMetaData.MetaDataElement
- java.lang.Object
-
- de.aristaflow.adept2.core.orgmodelmanager.AttributeMetaData.MetaDataElement
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- AttributeMetaData
public static class AttributeMetaData.MetaDataElement extends Object implements Serializable
Used to hold information about a single attribute.equals(Object)
andhashCode()
are implemented to only considergetEntityType()
andgetName()
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetaDataElement(EntityType entityType, String name, DataType dataType, int sizeHint, String omExt, String mappedTo, boolean imported, boolean isReadOnly)
Constructs a newMetaDataElement
for the given entity type, attribute name and data type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
DataType
getDataType()
Returns the date type of the attribute.EntityType
getEntityType()
Returns the entity type this attribute belongs to.SerialisablePair<String,String>
getMappedTo()
Gets the name of the org model extension and the name of the attribute to which this attribute is mapped to.String
getName()
Returns the the name of the attribute.int
getSizeHint()
Returns the desired size (only for STRING attributes).int
hashCode()
boolean
isImported()
Returns whether the value of a mapped attribute is imported into the OM.boolean
isMandatory()
Returns whether the attribute is mandatory within the entity type.boolean
isReadOnly()
Returns whether the attribute is read-only within the entity type.
-
-
-
Constructor Detail
-
MetaDataElement
public MetaDataElement(EntityType entityType, String name, DataType dataType, int sizeHint, String omExt, String mappedTo, boolean imported, boolean isReadOnly)
Constructs a newMetaDataElement
for the given entity type, attribute name and data type.- Parameters:
entityType
- the entity type this attribute belongs toname
- the name of the attributedataType
- the data type of the attributesizeHint
- the desired size (only for STRING attributes)omExt
- The name of the org model extension if this OM attribute is mapped to an atrtibute of an org model extension,null
otherwise.mappedTo
- The name of the attribute of an org model extension if this OM attribute is mapped to one,null
otherwise.imported
-isReadOnly
- whether
-
-
Method Detail
-
getEntityType
public EntityType getEntityType()
Returns the entity type this attribute belongs to.- Returns:
- the entity type this attribute belongs to
-
getName
public String getName()
Returns the the name of the attribute.- Returns:
- the name of the attribute
-
getDataType
public DataType getDataType()
Returns the date type of the attribute.- Returns:
- the date type of the attribute
-
getSizeHint
public int getSizeHint()
Returns the desired size (only for STRING attributes).- Returns:
- the desired size
-
getMappedTo
public SerialisablePair<String,String> getMappedTo()
Gets the name of the org model extension and the name of the attribute to which this attribute is mapped to. If this attribute is not mapped to an org model extension,null
will be returned.- Returns:
- The name of the org model extension and the name of the attribute
to which this attribute is mapped to. If this attribute is not
mapped to an org model extension,
null
will be returned.
-
isImported
public boolean isImported()
Returns whether the value of a mapped attribute is imported into the OM.- Returns:
- whether the value of a mapped attribute is imported into the OM
-
isMandatory
public boolean isMandatory()
Returns whether the attribute is mandatory within the entity type.- Returns:
- whether the attribute is mandatory within the entity type
-
isReadOnly
public boolean isReadOnly()
Returns whether the attribute is read-only within the entity type.- Returns:
- whether the attribute is read-only within the entity type
-
-