|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gvsig.tools.dynobject.impl.DefaultDynField
public class DefaultDynField
Nested Class Summary | |
---|---|
static class |
DefaultDynField.CheckDynFieldListException
|
Field Summary |
---|
Fields inherited from interface org.gvsig.tools.dynobject.DynField |
---|
ANY, CHOICE, RANGE |
Constructor Summary | |
---|---|
DefaultDynField(String name)
|
|
DefaultDynField(String name,
int dataType,
Object defaultValue,
boolean persistent,
boolean mandatory)
|
Method Summary | |
---|---|
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. |
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 |
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultDynField(String name)
public DefaultDynField(String name, int dataType, Object defaultValue, boolean persistent, boolean mandatory)
Method Detail |
---|
public void check() throws ListBaseException
ListBaseException
public String toString()
toString
in class Object
public String getName()
DynField
getName
in interface DynField
public DynField setDescription(String description)
DynField
setDescription
in interface DynField
DynField
objectpublic String getDescription()
DynField
getDescription
in interface DynField
public DynField setType(int dataType)
DynField
DataTypes
.
This method assign the default values of the type for
"ClassOfValue" and "subType".
setType
in interface DynField
DynField
objectpublic DynField setType(DataType dataType)
setType
in interface DynField
public int getType()
DynField
DataTypes
getType
in interface DynField
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 not
DynField
objectDynField.isPersistent()
public DynField setTheTypeOfAvailableValues(int type)
setTheTypeOfAvailableValues
in interface DynField
public int getTheTypeOfAvailableValues()
getTheTypeOfAvailableValues
in interface DynField
public boolean equals(Object obj)
equals
in class Object
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
object
DynFieldIsNotAContainerException
public DynField setElementsType(int type) throws DynFieldIsNotAContainerException
DynField
setElementsType
in interface DynField
DynField
object
DynFieldIsNotAContainerException
public DynField setElementsType(DynStruct type) throws DynFieldIsNotAContainerException
DynField
setElementsType
in interface DynField
DynField
object
DynFieldIsNotAContainerException
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
getGroup
in interface DynField
public DynField setGroup(String groupName)
setGroup
in interface DynField
public int getOder()
DynField
DynObject
.
getOder
in interface DynField
DynObject
public DynField setOrder(int order)
setOrder
in interface DynField
public boolean isHidden()
DynField
isHidden
in interface DynField
public DynField setHidden(boolean hidden)
setHidden
in interface 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 not
public 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
object
DynFieldIsNotAContainerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |