Modifier and Type | Class and Description |
---|---|
static class |
DefaultDynField.CheckDynFieldListException |
Constructor and Description |
---|
DefaultDynField(String name) |
DefaultDynField(String name,
int dataType,
Object defaultValue,
boolean persistent,
boolean mandatory) |
Modifier and Type | Method and Description |
---|---|
void |
check() |
Object |
coerce(Object value)
Force the type of value to the type of the field.
|
boolean |
equals(Object obj) |
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.
|
DataType |
getDataType() |
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.
|
String |
getGroup()
Return a string that identify a group for this field.
|
String |
getLabel() |
Object |
getMaxValue() |
Object |
getMinValue() |
String |
getName()
Return the name of the field.
|
int |
getOder()
Return the ordinal that identify the order of this field
in the
DynObject . |
String |
getSubtype()
Return the subtype associated to this field.
|
int |
getTheTypeOfAvailableValues() |
int |
getType()
Return the type used in this field.
|
boolean |
getValidateElements() |
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 |
isMandatory()
Return true if this field is mandatory.
|
boolean |
isPersistent()
Returns if the field is persistent or volatile.
|
boolean |
isReadOnly()
Returns if the field is readOnly or not.
|
DynField |
setAvailableValues(DynObjectValueItem[] availableValues) |
DynField |
setAvailableValues(List availableValues) |
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.
|
DynField |
setGroup(String groupName) |
DynField |
setHidden(boolean hidden) |
DynField |
setLabel(String label) |
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 dataType) |
DynField |
setType(int dataType)
Sets the type of the field.
|
DynField |
setValidateElements(boolean validate) |
String |
toString() |
void |
validate(Object value)
Validate that the value match the properties of the field.
|
public DefaultDynField(String name)
public void check() throws ListBaseException
ListBaseException
public String getName()
DynField
public DynField setDescription(String description)
DynField
setDescription
in interface DynField
DynField
objectpublic String getDescription()
DynField
getDescription
in interface DynField
public String getLabel()
public DynField setType(int dataType)
DynField
DataTypes
.
This method assign the default values of the type for
"ClassOfValue" and "subType".public int getType()
DynField
DataTypes
public DataType getDataType()
getDataType
in interface DynField
public DynField setSubtype(String subtype)
DynField
DataTypes.DYNOBJECT
,
the subtype is the fullname of the DynStruct.setSubtype
in interface DynField
DynField
objectpublic String getSubtype()
DynField
DataTypes.DYNOBJECT
,
the subtype are the fullname of the DynClass.getSubtype
in interface DynField
public DynField setDefaultDynValue(Object defaultValue)
setDefaultDynValue
in interface DynField
public Object getDefaultValue()
DynField
getDefaultValue
in interface DynField
public DynField setAvailableValues(DynObjectValueItem[] availableValues)
setAvailableValues
in interface DynField
public DynField setAvailableValues(List availableValues)
setAvailableValues
in interface DynField
public DynObjectValueItem[] getAvailableValues()
DynField
getAvailableValues
in interface DynField
public DynField setMinValue(Object minValue)
setMinValue
in interface DynField
public Object getMinValue()
getMinValue
in interface DynField
public DynField setMaxValue(Object maxValue)
setMaxValue
in interface DynField
public Object getMaxValue()
getMaxValue
in interface DynField
public boolean isMandatory()
DynField
isMandatory
in interface DynField
public boolean isPersistent()
DynField
isPersistent
in interface DynField
public 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 setTheTypeOfAvailableValues(int type)
setTheTypeOfAvailableValues
in interface DynField
public int getTheTypeOfAvailableValues()
getTheTypeOfAvailableValues
in interface DynField
public Class getClassOfValue()
DynField
getClassOfValue
in interface DynField
public DynField setValidateElements(boolean validate)
public boolean getValidateElements()
public DynField setClassOfValue(Class theClass) throws DynFieldIsNotAContainerException
DynField
setClassOfValue
in interface DynField
DynField
objectDynFieldIsNotAContainerException
public DynField setElementsType(int type) throws DynFieldIsNotAContainerException
DynField
setElementsType
in interface DynField
DynField
objectDynFieldIsNotAContainerException
public DynField setElementsType(DynStruct type) throws DynFieldIsNotAContainerException
DynField
setElementsType
in interface DynField
DynField
objectDynFieldIsNotAContainerException
public boolean isContainer()
DynField
DataType
isContainer
in interface DynField
public DynField getElementsType()
DynField
getElementsType
in interface DynField
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 String getGroup()
DynField
public int getOder()
DynField
DynObject
.public boolean isHidden()
DynField
public boolean isReadOnly()
DynField
isReadOnly
in interface DynField
public DynField setReadOnly(boolean isReadOnly)
DynField
setReadOnly
in interface DynField
isReadOnly
- if the graphic component associated to this field should be readOnly or notpublic Class getClassOfItems()
DynField
getClassOfItems
in interface DynField
public DynField setDefaultFieldValue(Object defaultValue)
DynField
setDefaultFieldValue
in interface DynField
DynField
objectpublic DynField setClassOfItems(Class theClass) throws DynFieldIsNotAContainerException
DynField
setClassOfItems
in interface DynField
DynField
objectDynFieldIsNotAContainerException
Copyright © 2013 gvSIG Association. All Rights Reserved.