|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DynField
A field of a DynObject
.
A field will be persisted only if it is set as persistent (@see
isPersistent()
, which is the default value.
Field Summary | |
---|---|
static int |
ANY
Deprecated. now autodetect the mode of use |
static int |
CHOICE
Deprecated. usado automaticamente al asignar AvailableValues |
static int |
RANGE
Deprecated. usado automaticamente al asignar minValue/maxValue |
Method Summary | |
---|---|
Object |
coerce(Object value)
Force the type of value to the type of the field. |
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()
Deprecated. don't use, check minValue/maxValue and getAvailableValues instead |
int |
getType()
Return the type used in this field. |
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[] 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)
Deprecated. use instead setDefaultFieldValue(Object) |
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)
Deprecated. don't use, set minValue/maxValue and availableValues instead |
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. |
Field Detail |
---|
static final int ANY
static final int CHOICE
static final int RANGE
Method Detail |
---|
String getName()
int getType()
DataTypes
DataType getDataType()
String getSubtype()
DataTypes.DYNOBJECT
,
the subtype are the fullname of the DynClass.
String getDescription()
Object getDefaultValue()
String getGroup()
int getOder()
DynObject
.
DynObject
boolean isMandatory()
boolean isPersistent()
boolean isHidden()
boolean isReadOnly()
boolean isContainer()
DataType
DynObjectValueItem[] getAvailableValues()
Object getMinValue()
Object getMaxValue()
Class getClassOfValue()
Class getClassOfItems()
DynField setDescription(String description)
description
-
DynField
objectDynField setType(int type)
DataTypes
.
This method assign the default values of the type for
"ClassOfValue" and "subType".
type
-
DynField
objectDynField setType(DataType type)
DynField setSubtype(String subtype)
DataTypes.DYNOBJECT
,
the subtype is the fullname of the DynStruct.
subtype
-
DynField
objectDynField setDefaultFieldValue(Object defaultValue)
defaultValue
-
DynField
objectDynField setGroup(String groupName)
DynField setOrder(int order)
DynField setMandatory(boolean mandatory)
DynField setHidden(boolean hidden)
DynField setPersistent(boolean persistent)
persistent
- if the field must be persisted or not
DynField
objectisPersistent()
DynField setAvailableValues(DynObjectValueItem[] values)
DynField setAvailableValues(List values)
DynField setMinValue(Object minValue)
DynField setMaxValue(Object maxValue)
DynField setClassOfValue(Class theClass) throws DynFieldIsNotAContainerException
theClass
-
DynField
object
DynFieldIsNotAContainerException
DynField setClassOfItems(Class theClass) throws DynFieldIsNotAContainerException
theClass
-
DynField
object
DynFieldIsNotAContainerException
DynField setReadOnly(boolean isReadOnly)
isReadOnly
- if the graphic component associated to this field should be readOnly or not
DynField getElementsType()
DynField setElementsType(int type) throws DynFieldIsNotAContainerException
tipo
- de los elementos
DynField
object
DynFieldIsNotAContainerException
DynField setElementsType(DynStruct type) throws DynFieldIsNotAContainerException
tipo
- de los elementos
DynField
object
DynFieldIsNotAContainerException
void validate(Object value) throws DynFieldValidateException
value
-
DynFieldValidateException
Object coerce(Object value) throws CoercionException
value
-
CoercionException
int getTheTypeOfAvailableValues()
DynField setDefaultDynValue(Object defaultValue)
setDefaultFieldValue(Object)
DynField setTheTypeOfAvailableValues(int type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |