public class DefaultDynField extends Object implements DynField_v2
DynField_v2.AvailableValuesProvider
Modifier and Type | Field and Description |
---|---|
static Logger |
log |
ANY, CHOICE, RANGE, RELATION_TYPE_AGGREGATE, RELATION_TYPE_COLLABORATION, RELATION_TYPE_COMPOSITION, RELATION_TYPE_IDENTITY, RELATION_TYPE_NONE
Modifier | Constructor and Description |
---|---|
|
DefaultDynField(String name,
int dataType) |
protected |
DefaultDynField(String name,
int dataType,
Object defaultValue,
boolean persistent,
boolean mandatory) |
Modifier and Type | Method and Description |
---|---|
void |
check() |
Object |
clone()
Creates a copy of the object.
|
Object |
coerce(Object value)
Force the type of value to the type of the field.
|
void |
copyFrom(DynField other) |
boolean |
equals(Object obj) |
DynObjectValueItem[] |
getAvailableValues()
Return the available values for this field.
|
DynObjectValueItem[] |
getAvailableValues(DynObject self) |
DynMethod |
getAvailableValuesMethod() |
Object |
getCalculatedValue(DynObject self) |
DynMethod |
getCalculateMethod() |
String |
getClassNameOfItems()
When is a Container of objects field returns the name of class of the
elements, otherwise returns null
|
String |
getClassNameOfValue()
When is a Object field returns the name of object's class, otherwise
returns null
|
Class |
getClassOfItems()
When is a Container of objects field returns the class of the elements,
otherwise returns null
|
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.
|
DynStruct |
getDynClassOfItems()
When is a Container of DynObjects field returns the DynStruct of the
elements, otherwise returns null
|
DynStruct |
getDynClassOfValue()
When is a DynObject field returns the DynStruct of the DynObject,
otherwise returns null
|
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 . |
int |
getRelationType() |
String |
getSubtype()
Return the subtype associated to this field.
|
Tags |
getTags() |
int |
getTheTypeOfAvailableValues() |
int |
getType()
Return the type used in this field.
|
int |
getTypeOfItems()
When is a Container field returns the type of the elements, otherwise
returns INVALID
|
boolean |
getValidateElements() |
protected ValueType |
getValueType() |
boolean |
isAvailableValuesCalculated() |
boolean |
isCalculated() |
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(DynMethod computeAvailableValues) |
DynField |
setAvailableValues(DynObjectValueItem[] availableValues) |
DynField |
setAvailableValues(List availableValues) |
DynField |
setCalculateMethod(DynMethod method) |
DynField |
setClassOfItems(Class theClass)
If field type is List, Set or Map, this class is the class of items.
|
DynField |
setClassOfItems(DynStruct dynStrct) |
DynField |
setClassOfItems(String theClassNameOfValue) |
DynField |
setClassOfValue(Class theClass)
Sets the class used for the values of the field.
|
DynField |
setClassOfValue(DynStruct dynStruct) |
DynField |
setClassOfValue(String theClassName) |
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 |
setName(String name) |
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 |
setRelationType(int relationType) |
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 |
setTypeOfItems(int type) |
DynField |
setValidateElements(boolean validate) |
String |
toString() |
void |
validate(Object value)
Validate that the value match the properties of the field.
|
public DefaultDynField(String name, int dataType)
public void copyFrom(DynField other)
copyFrom
in interface DynField_v2
protected ValueType getValueType()
public DynField setCalculateMethod(DynMethod method)
setCalculateMethod
in interface DynField_v2
public DynMethod getCalculateMethod()
getCalculateMethod
in interface DynField_v2
public boolean isCalculated()
isCalculated
in interface DynField_v2
public Object getCalculatedValue(DynObject self)
getCalculatedValue
in interface DynField_v2
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 DynField setLabel(String label)
setLabel
in interface DynField_LabelAttribute
public String getLabel()
getLabel
in interface DynField_LabelAttribute
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 boolean isAvailableValuesCalculated()
isAvailableValuesCalculated
in interface DynField_v2
public DynField setAvailableValues(DynObjectValueItem[] availableValues)
setAvailableValues
in interface DynField
public DynField setAvailableValues(List availableValues)
setAvailableValues
in interface DynField
public DynField setAvailableValues(DynMethod computeAvailableValues)
setAvailableValues
in interface DynField_v2
public DynMethod getAvailableValuesMethod()
getAvailableValuesMethod
in interface DynField_v2
public DynObjectValueItem[] getAvailableValues()
DynField
getAvailableValues
in interface DynField
public DynObjectValueItem[] getAvailableValues(DynObject self)
getAvailableValues
in interface DynField_v2
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 boolean equals(Object obj)
public Class getClassOfValue()
DynField
getClassOfValue
in interface DynField
public DynField setClassOfValue(Class theClass)
DynField
setClassOfValue
in interface DynField
DynField
objectpublic DynField setClassOfValue(String theClassName)
setClassOfValue
in interface DynField_v2
public boolean isContainer()
DynField
DataType
isContainer
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 DynField setDefaultFieldValue(Object defaultValue)
DynField
setDefaultFieldValue
in interface DynField
DynField
objectpublic Tags getTags()
getTags
in interface DynField_v2
public String getClassNameOfValue()
DynField_v2
getClassNameOfValue
in interface DynField_v2
public DynField setClassOfValue(DynStruct dynStruct)
setClassOfValue
in interface DynField_v2
public DynStruct getDynClassOfValue()
DynField_v2
getDynClassOfValue
in interface DynField_v2
public int getRelationType()
getRelationType
in interface DynField_v2
public DynField setRelationType(int relationType)
setRelationType
in interface DynField_v2
public DynField setElementsType(int type)
DynField
setElementsType
in interface DynField
type
- de los elementosDynField
objectpublic DynField setElementsType(DynStruct type)
DynField
setElementsType
in interface DynField
type
- de los elementosDynField
objectpublic DynField getElementsType()
DynField
getElementsType
in interface DynField
public DynField setClassOfItems(DynStruct dynStrct)
setClassOfItems
in interface DynField_v2
public DynField setClassOfItems(String theClassNameOfValue)
setClassOfItems
in interface DynField_v2
public String getClassNameOfItems()
DynField_v2
getClassNameOfItems
in interface DynField_v2
public DynStruct getDynClassOfItems()
DynField_v2
getDynClassOfItems
in interface DynField_v2
public DynField setClassOfItems(Class theClass) throws DynFieldIsNotAContainerException
DynField
setClassOfItems
in interface DynField
setClassOfItems
in interface DynField_v2
DynField
objectDynFieldIsNotAContainerException
public Class getClassOfItems()
DynField_v2
getClassOfItems
in interface DynField
getClassOfItems
in interface DynField_v2
public DynField setTypeOfItems(int type)
setTypeOfItems
in interface DynField_v2
public int getTypeOfItems()
DynField_v2
getTypeOfItems
in interface DynField_v2
public DynField setValidateElements(boolean validate)
setValidateElements
in interface DynField_v2
public boolean getValidateElements()
getValidateElements
in interface DynField_v2
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()}.