public class DynFieldFacadeOfAFeatureAttributeDescriptor extends Object implements FeatureAttributeDescriptor
ANY, CHOICE, RANGE, RELATION_TYPE_AGGREGATE, RELATION_TYPE_COLLABORATION, RELATION_TYPE_COMPOSITION, RELATION_TYPE_IDENTITY, RELATION_TYPE_NONE
Constructor and Description |
---|
DynFieldFacadeOfAFeatureAttributeDescriptor(DynField field) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowIndexDuplicateds() |
boolean |
allowNull()
Indicates whether this attribute accepts null values.
|
Object |
clone()
Creates a copy of the object.
|
Object |
coerce(Object value)
Force the type of value to the type of the field.
|
Object |
getAdditionalInfo(String infoName)
Returns additional information of the attribute
|
DynObjectValueItem[] |
getAvailableValues()
Return the available values for this field.
|
Class |
getClassOfItems()
If the field is a container (List, Map or Set) return the java class of
its items.
|
Class |
getClassOfValue()
Return the java class of the value of the field.
|
FeatureAttributeDescriptor |
getCopy()
Returns a clone of this attribute descriptor
|
DataType |
getDataType() |
String |
getDataTypeName()
Returns the name of this attribute's data type.
|
DateFormat |
getDateFormat()
If this attribute is of type Date, then this method returns
the date format set by the data store.
|
Object |
getDefaultValue()
Return the default value used in creation of new objects with this field.
|
String |
getDescription()
Return the descripcion associated to this field.
|
DynField |
getElementsType()
When a field is of type container, this method return a DynClass that
define the type of elements.
|
Evaluator |
getEvaluator()
Returns an evaluator that will be used to calculate
the value of this attribute
|
FeatureAttributeEmulator |
getFeatureAttributeEmulator()
Gets the attribute emulator associatted
FeatureAttributeEmulator to this attribute. |
FeatureAttributeGetter |
getFeatureAttributeGetter()
Gets if the attribute has a
FeatureAttributeGetter . |
int |
getGeometrySubType()
If this attribute is a
Geometry , this method returns the specific
geometry subtype,
as defined in Geometry.SUBTYPES . |
int |
getGeometryType()
If this attribute is a
Geometry , this method returns the specific
geometry type,
as defined in Geometry.TYPES . |
GeometryType |
getGeomType()
Returns the
GeometryType of the attribute if it is a geometry. |
String |
getGroup()
Return a string that identify a group for this field.
|
int |
getIndex()
Returns this attribute relative position within the
Feature . |
int |
getMaximumOccurrences()
Returns the maximum number of occurrences of this attribute on a given
feature.
|
Object |
getMaxValue() |
int |
getMinimumOccurrences()
Returns the minimum number of occurrences of this attribute on a given
feature.
|
Object |
getMinValue() |
String |
getName()
Return the name of the field.
|
Class |
getObjectClass()
For attributes of type
DataTypes.OBJECT ,
this returns the Java Class object that class or interface that
all values of this attribute can be cast to. |
int |
getOder()
Return the ordinal that identify the order of this field in the
DynObject . |
int |
getPrecision()
For attributes of type
DataTypes.DOUBLE and DataTypes.FLOAT
, this returns the maximum number of places after the decimal point. |
int |
getSize()
Returns a number that indicates the size of this attribute.
|
IProjection |
getSRS()
If this attribute is a
Geometry , this method returns its
Spatial Reference System. |
String |
getSubtype()
Return the subtype associated to this field.
|
int |
getTheTypeOfAvailableValues() |
int |
getType()
Return the type used in this field.
|
boolean |
isAutomatic()
Returns if value is created automatically by the source
|
boolean |
isComputed()
Return true if the attribute has an evaluator o an emulator.
|
boolean |
isContainer()
Return true if the value of this field is a container.
|
boolean |
isHidden()
Inform if this field can be visible or not for the user.
|
boolean |
isIndexAscending() |
boolean |
isIndexed()
Return true if the attribute has and index in the table.
|
boolean |
isMandatory()
Return true if this field is mandatory.
|
boolean |
isPersistent()
Returns if the field is persistent or volatile.
|
boolean |
isPrimaryKey()
Returns
true if this attribute forms all or part of the unique identifying
value for the feature it is contained by. |
boolean |
isReadOnly()
Returns if the field is readOnly or not.
|
boolean |
isTime()
Gets if the attribute is a temporal attribute.
|
DynField |
setAvailableValues(DynObjectValueItem[] values) |
DynField |
setAvailableValues(List values) |
DynField |
setClassOfItems(Class theClass)
If field type is List, Set or Map, this class is the class of items.
|
DynField |
setClassOfValue(Class theClass)
Sets the class used for the values of the field.
|
DynField |
setDefaultDynValue(Object defaultValue) |
DynField |
setDefaultFieldValue(Object defaultValue)
Set the default value used for this field when a new object with this
field is created.
|
DynField |
setDescription(String description)
Sets the description asociated to this field.
|
DynField |
setElementsType(DynStruct type)
Set the type of items when the field is a container.
|
DynField |
setElementsType(int type)
Set the type of items when the field is a container.
|
void |
setFeatureAttributeGetter(FeatureAttributeGetter featureAttributeGetter)
Sets the
FeatureAttributeGetter that is used to update the
presentation of a field. |
DynField |
setGroup(String groupName) |
DynField |
setHidden(boolean hidden) |
DynField |
setMandatory(boolean mandatory) |
DynField |
setMaxValue(Object maxValue) |
DynField |
setMinValue(Object minValue) |
DynField |
setOrder(int order) |
DynField |
setPersistent(boolean persistent)
Sets if the field must be persisted or not.
|
DynField |
setReadOnly(boolean isReadOnly)
Sets if the field is readOnly or not.
|
DynField |
setSubtype(String subtype)
Strings used as subtype for this field.
|
DynField |
setTheTypeOfAvailableValues(int type) |
DynField |
setType(DataType type) |
DynField |
setType(int type)
Sets the type of the field.
|
void |
validate(Object value)
Validate that the value match the properties of the field.
|
public DynFieldFacadeOfAFeatureAttributeDescriptor(DynField field)
public FeatureAttributeDescriptor getCopy()
FeatureAttributeDescriptor
getCopy
in interface FeatureAttributeDescriptor
public String getDataTypeName()
FeatureAttributeDescriptor
getDataTypeName
in interface FeatureAttributeDescriptor
public int getSize()
FeatureAttributeDescriptor
DataTypes
for how to interpret this value. As an example, when the data type is
DataTypes.STRING
, this value indicates the maximum length of the string.getSize
in interface FeatureAttributeDescriptor
int
indicating the size of the attribute.public int getPrecision()
FeatureAttributeDescriptor
DataTypes.DOUBLE
and DataTypes.FLOAT
, this returns the maximum number of places after the decimal point. For
other types, this must always return zero.getPrecision
in interface FeatureAttributeDescriptor
public Class getObjectClass()
FeatureAttributeDescriptor
DataTypes.OBJECT
,
this returns the Java Class
object that class or interface that
all values of this attribute can be cast to.getObjectClass
in interface FeatureAttributeDescriptor
public int getMinimumOccurrences()
FeatureAttributeDescriptor
getMinimumOccurrences
in interface FeatureAttributeDescriptor
public int getMaximumOccurrences()
FeatureAttributeDescriptor
Integer.MAX_VALUE
indicates that the maximum number of occurrences is unbounded.getMaximumOccurrences
in interface FeatureAttributeDescriptor
public boolean isPrimaryKey()
FeatureAttributeDescriptor
true
if this attribute forms all or part of the unique identifying
value for the feature it is contained by. The primary key attributes uniquely
identify this feature from other features of the same type. This is different
from the Feature.getReference(), which must uniquely identify
the Feature
among all feature types.isPrimaryKey
in interface FeatureAttributeDescriptor
public boolean allowNull()
FeatureAttributeDescriptor
allowNull
in interface FeatureAttributeDescriptor
public Evaluator getEvaluator()
FeatureAttributeDescriptor
getEvaluator
in interface FeatureAttributeDescriptor
public IProjection getSRS()
FeatureAttributeDescriptor
Geometry
, this method returns its
Spatial Reference System.getSRS
in interface FeatureAttributeDescriptor
Geometry
, otherwise this method returns null.public int getGeometryType()
FeatureAttributeDescriptor
Geometry
, this method returns the specific
geometry type,
as defined in Geometry.TYPES
.getGeometryType
in interface FeatureAttributeDescriptor
Geometry.TYPES
public int getGeometrySubType()
FeatureAttributeDescriptor
Geometry
, this method returns the specific
geometry subtype,
as defined in Geometry.SUBTYPES
.getGeometrySubType
in interface FeatureAttributeDescriptor
Geometry.SUBTYPES
public GeometryType getGeomType()
FeatureAttributeDescriptor
GeometryType
of the attribute if it is a geometry.getGeomType
in interface FeatureAttributeDescriptor
public DateFormat getDateFormat()
FeatureAttributeDescriptor
getDateFormat
in interface FeatureAttributeDescriptor
public int getIndex()
FeatureAttributeDescriptor
Feature
.getIndex
in interface FeatureAttributeDescriptor
public Object getAdditionalInfo(String infoName)
FeatureAttributeDescriptor
getAdditionalInfo
in interface FeatureAttributeDescriptor
public boolean isAutomatic()
FeatureAttributeDescriptor
isAutomatic
in interface FeatureAttributeDescriptor
public boolean isTime()
FeatureAttributeDescriptor
isTime
in interface FeatureAttributeDescriptor
true
if is a temporal attributepublic boolean isIndexed()
FeatureAttributeDescriptor
isIndexed
in interface FeatureAttributeDescriptor
public boolean allowIndexDuplicateds()
allowIndexDuplicateds
in interface FeatureAttributeDescriptor
public boolean isIndexAscending()
isIndexAscending
in interface FeatureAttributeDescriptor
public FeatureAttributeGetter getFeatureAttributeGetter()
FeatureAttributeDescriptor
FeatureAttributeGetter
.getFeatureAttributeGetter
in interface FeatureAttributeDescriptor
public void setFeatureAttributeGetter(FeatureAttributeGetter featureAttributeGetter)
FeatureAttributeDescriptor
FeatureAttributeGetter
that is used to update the
presentation of a field.setFeatureAttributeGetter
in interface FeatureAttributeDescriptor
featureAttributeGetter
- the FeatureAttributeGetter
to set.public FeatureAttributeEmulator getFeatureAttributeEmulator()
FeatureAttributeDescriptor
FeatureAttributeEmulator
to this attribute.getFeatureAttributeEmulator
in interface FeatureAttributeDescriptor
public String getName()
DynField
public int getType()
DynField
DataTypes
public DataType getDataType()
getDataType
in interface DynField
public String getSubtype()
DynField
DataTypes.DYNOBJECT
, the subtype are
the fullname of the DynClass.getSubtype
in interface DynField
public String getDescription()
DynField
getDescription
in interface DynField
public Object getDefaultValue()
DynField
getDefaultValue
in interface DynField
public String getGroup()
DynField
public int getOder()
DynField
DynObject
.public boolean isMandatory()
DynField
isMandatory
in interface DynField
public boolean isPersistent()
DynField
isPersistent
in interface DynField
public boolean isHidden()
DynField
public boolean isReadOnly()
DynField
isReadOnly
in interface DynField
public boolean isContainer()
DynField
DataType
isContainer
in interface DynField
public DynObjectValueItem[] getAvailableValues()
DynField
getAvailableValues
in interface DynField
public Object getMinValue()
getMinValue
in interface DynField
public Object getMaxValue()
getMaxValue
in interface DynField
public Class getClassOfValue()
DynField
getClassOfValue
in interface DynField
public Class getClassOfItems()
DynField
getClassOfItems
in interface DynField
public DynField setDescription(String description)
DynField
setDescription
in interface DynField
DynField
objectpublic DynField setType(int type)
DynField
DataTypes
.
This method assign the default values of the type for "ClassOfValue" and
"subType".public DynField setSubtype(String subtype)
DynField
DataTypes.DYNOBJECT
, the subtype is the
fullname of the DynStruct.setSubtype
in interface DynField
DynField
objectpublic DynField setDefaultFieldValue(Object defaultValue)
DynField
setDefaultFieldValue
in interface DynField
DynField
objectpublic DynField setMandatory(boolean mandatory)
setMandatory
in interface DynField
public DynField setPersistent(boolean persistent)
DynField
setPersistent
in interface DynField
persistent
- if the field must be persisted or notDynField
objectDynField.isPersistent()
public DynField setAvailableValues(DynObjectValueItem[] values)
setAvailableValues
in interface DynField
public DynField setAvailableValues(List values)
setAvailableValues
in interface DynField
public DynField setMinValue(Object minValue)
setMinValue
in interface DynField
public DynField setMaxValue(Object maxValue)
setMaxValue
in interface DynField
public DynField setClassOfValue(Class theClass) throws DynFieldIsNotAContainerException
DynField
setClassOfValue
in interface DynField
DynField
objectDynFieldIsNotAContainerException
public DynField setClassOfItems(Class theClass) throws DynFieldIsNotAContainerException
DynField
setClassOfItems
in interface DynField
DynField
objectDynFieldIsNotAContainerException
public DynField setReadOnly(boolean isReadOnly)
DynField
setReadOnly
in interface DynField
isReadOnly
- if the graphic component associated to this field
should be readOnly or notpublic DynField getElementsType()
DynField
getElementsType
in interface DynField
public DynField setElementsType(int type) throws DynFieldIsNotAContainerException
DynField
setElementsType
in interface DynField
type
- de los elementosDynField
objectDynFieldIsNotAContainerException
public DynField setElementsType(DynStruct type) throws DynFieldIsNotAContainerException
DynField
setElementsType
in interface DynField
type
- de los elementosDynField
objectDynFieldIsNotAContainerException
public void validate(Object value) throws DynFieldValidateException
DynField
validate
in interface DynField
DynFieldValidateException
public Object coerce(Object value) throws CoercionException
DynField
coerce
in interface DynField
CoercionException
public int getTheTypeOfAvailableValues()
getTheTypeOfAvailableValues
in interface DynField
public DynField setDefaultDynValue(Object defaultValue)
setDefaultDynValue
in interface DynField
public DynField setTheTypeOfAvailableValues(int type)
setTheTypeOfAvailableValues
in interface DynField
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
public boolean isComputed()
FeatureAttributeDescriptor
isComputed
in interface FeatureAttributeDescriptor