public class DefaultDynField extends java.lang.Object implements DynField_v2
DynField_v2.AvailableValuesProvider| Modifier and Type | Field and Description |
|---|---|
static Logger |
log |
ANY, CHOICE, RANGE, RELATION_TYPE_AGGREGATE, RELATION_TYPE_AGGREGATE_WITH_COMPOSITION, RELATION_TYPE_COLLABORATION, RELATION_TYPE_COLLABORATION_WITH_COMPOSITION, RELATION_TYPE_COMPOSITION, RELATION_TYPE_IDENTITY, RELATION_TYPE_NONE| Modifier | Constructor and Description |
|---|---|
|
DefaultDynField(java.lang.String name,
int dataType) |
protected |
DefaultDynField(java.lang.String name,
int dataType,
java.lang.Object defaultValue,
boolean persistent,
boolean mandatory) |
| Modifier and Type | Method and Description |
|---|---|
void |
check() |
java.lang.Object |
clone()
Creates a copy of the object.
|
java.lang.Object |
coerce(java.lang.Object value)
Force the type of value to the type of the field.
|
void |
copyFrom(DynField other) |
boolean |
equals(java.lang.Object obj) |
DynObjectValueItem[] |
getAvailableValues()
Return the available values for this field.
|
DynObjectValueItem[] |
getAvailableValues(DynObject context) |
DynMethod |
getAvailableValuesMethod() |
java.lang.Object |
getCalculatedValue(DynObject self) |
DynMethod |
getCalculateMethod() |
java.lang.String |
getClassNameOfItems()
When is a Container of objects field returns the name of class of the
elements, otherwise returns null
|
java.lang.String |
getClassNameOfValue()
When is a Object field returns the name of object's class, otherwise
returns null
|
java.lang.Class |
getClassOfItems()
When is a Container of objects field returns the class of the elements,
otherwise returns null
|
java.lang.Class |
getClassOfValue()
Return the java class of the value of the field.
|
java.lang.Object |
getCoercedDefaultValue() |
DataType |
getDataType() |
java.lang.Object |
getDefaultValue()
Return the default value used in creation of new objects with this field.
|
java.util.function.Supplier |
getDefaultValueSupplier() |
java.lang.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.
|
java.lang.String |
getGroup()
Return a string that identify a group for this field.
|
java.lang.String |
getLabel() |
java.lang.String |
getLocalizedLabel() |
java.lang.String |
getLocalizedShortLabel() |
java.lang.Object |
getMaxValue() |
java.lang.Object |
getMinValue() |
java.lang.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() |
java.lang.String |
getShortLabel() |
java.lang.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(java.util.List availableValues) |
DynField |
setCalculateMethod(DynMethod method) |
DynField |
setClassOfItems(java.lang.Class theClass)
If field type is List, Set or Map, this class is the class of items.
|
DynField |
setClassOfItems(DynStruct dynStrct) |
DynField |
setClassOfItems(java.lang.String theClassNameOfValue) |
DynField |
setClassOfValue(java.lang.Class theClass)
Sets the class used for the values of the field.
|
DynField |
setClassOfValue(DynStruct dynStruct) |
DynField |
setClassOfValue(java.lang.String theClassName) |
DynField |
setDefaultDynValue(java.lang.Object defaultValue) |
DynField |
setDefaultFieldValue(java.lang.Object defaultValue)
Set the default value used for this field when a new object with this
field is created.
|
DynField |
setDefaultValueSupplier(java.util.function.Supplier supplier) |
DynField |
setDescription(java.lang.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(java.lang.String groupName) |
DynField |
setHidden(boolean hidden) |
DynField |
setLabel(java.lang.String label) |
DynField |
setMandatory(boolean mandatory) |
DynField |
setMaxValue(java.lang.Object maxValue) |
DynField |
setMinValue(java.lang.Object minValue) |
DynField |
setName(java.lang.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 |
setShortLabel(java.lang.String shortLabel) |
DynField |
setSubtype(java.lang.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) |
java.lang.String |
toString() |
void |
validate(java.lang.Object value)
Validate that the value match the properties of the field.
|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloneQuietly, cloneQuietlypublic DefaultDynField(java.lang.String name,
int dataType)
protected DefaultDynField(java.lang.String name,
int dataType,
java.lang.Object defaultValue,
boolean persistent,
boolean mandatory)
public void copyFrom(DynField other)
copyFrom in interface DynField_v2protected ValueType getValueType()
public DynField setCalculateMethod(DynMethod method)
setCalculateMethod in interface DynField_v2public DynMethod getCalculateMethod()
getCalculateMethod in interface DynField_v2public boolean isCalculated()
isCalculated in interface DynField_v2public java.lang.Object getCalculatedValue(DynObject self)
getCalculatedValue in interface DynField_v2public void check()
throws ListBaseException
ListBaseExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
DynFieldpublic DynField setName(java.lang.String name)
public DynField setDescription(java.lang.String description)
DynFieldsetDescription in interface DynFieldDynField objectpublic java.lang.String getDescription()
DynFieldgetDescription in interface DynFieldpublic DynField setLabel(java.lang.String label)
setLabel in interface DynField_LabelAttributepublic java.lang.String getLabel()
getLabel in interface DynField_LabelAttributepublic java.lang.String getLocalizedLabel()
getLocalizedLabel in interface DynField_LabelAttributepublic DynField setShortLabel(java.lang.String shortLabel)
setShortLabel in interface DynField_LabelAttributepublic java.lang.String getShortLabel()
getShortLabel in interface DynField_LabelAttributepublic java.lang.String getLocalizedShortLabel()
getLocalizedShortLabel in interface DynField_LabelAttributepublic DynField setType(int dataType)
DynFieldDataTypes.
This method assign the default values of the type for "ClassOfValue" and
"subType".public int getType()
DynFieldDataTypespublic DataType getDataType()
getDataType in interface DynFieldpublic DynField setSubtype(java.lang.String subtype)
DynFieldDataTypes.DYNOBJECT, the subtype is the
fullname of the DynStruct.setSubtype in interface DynFieldDynField objectpublic java.lang.String getSubtype()
DynFieldDataTypes.DYNOBJECT, the subtype are
the fullname of the DynClass.getSubtype in interface DynFieldpublic DynField setDefaultDynValue(java.lang.Object defaultValue)
setDefaultDynValue in interface DynFieldpublic java.lang.Object getDefaultValue()
DynFieldgetDefaultValue in interface DynFieldpublic java.lang.Object getCoercedDefaultValue()
getCoercedDefaultValue in interface DynField_v2public boolean isAvailableValuesCalculated()
isAvailableValuesCalculated in interface DynField_v2public DynField setAvailableValues(DynObjectValueItem[] availableValues)
setAvailableValues in interface DynFieldpublic DynField setAvailableValues(java.util.List availableValues)
setAvailableValues in interface DynFieldpublic DynField setAvailableValues(DynMethod computeAvailableValues)
setAvailableValues in interface DynField_v2public DynMethod getAvailableValuesMethod()
getAvailableValuesMethod in interface DynField_v2public DynObjectValueItem[] getAvailableValues()
DynFieldgetAvailableValues in interface DynFieldpublic DynObjectValueItem[] getAvailableValues(DynObject context)
getAvailableValues in interface DynField_v2public DynField setMinValue(java.lang.Object minValue)
setMinValue in interface DynFieldpublic java.lang.Object getMinValue()
getMinValue in interface DynFieldpublic DynField setMaxValue(java.lang.Object maxValue)
setMaxValue in interface DynFieldpublic java.lang.Object getMaxValue()
getMaxValue in interface DynFieldpublic boolean isMandatory()
DynFieldisMandatory in interface DynFieldpublic boolean isPersistent()
DynFieldisPersistent in interface DynFieldpublic DynField setMandatory(boolean mandatory)
setMandatory in interface DynFieldpublic DynField setPersistent(boolean persistent)
DynFieldsetPersistent in interface DynFieldpersistent - if the field must be persisted or notDynField objectDynField.isPersistent()public DynField setTheTypeOfAvailableValues(int type)
setTheTypeOfAvailableValues in interface DynFieldpublic int getTheTypeOfAvailableValues()
getTheTypeOfAvailableValues in interface DynFieldpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - public java.lang.Class getClassOfValue()
DynFieldgetClassOfValue in interface DynFieldpublic DynField setClassOfValue(java.lang.Class theClass)
DynFieldsetClassOfValue in interface DynFieldDynField objectpublic DynField setClassOfValue(java.lang.String theClassName)
setClassOfValue in interface DynField_v2public boolean isContainer()
DynFieldDataTypeisContainer in interface DynFieldpublic void validate(java.lang.Object value)
throws DynFieldValidateException
DynFieldvalidate in interface DynFieldDynFieldValidateExceptionpublic java.util.function.Supplier getDefaultValueSupplier()
getDefaultValueSupplier in interface DynField_v2public DynField setDefaultValueSupplier(java.util.function.Supplier supplier)
setDefaultValueSupplier in interface DynField_v2public java.lang.Object coerce(java.lang.Object value)
throws CoercionException
DynFieldcoerce in interface DynFieldCoercionExceptionpublic java.lang.String getGroup()
DynFieldpublic DynField setGroup(java.lang.String groupName)
public int getOder()
DynFieldDynObject.public boolean isHidden()
DynFieldpublic boolean isReadOnly()
DynFieldisReadOnly in interface DynFieldpublic DynField setReadOnly(boolean isReadOnly)
DynFieldsetReadOnly in interface DynFieldisReadOnly - if the graphic component associated to this field
should be readOnly or notpublic DynField setDefaultFieldValue(java.lang.Object defaultValue)
DynFieldsetDefaultFieldValue in interface DynFieldDynField objectpublic Tags getTags()
getTags in interface DynField_v2getTags in interface Taggedpublic java.lang.String getClassNameOfValue()
DynField_v2getClassNameOfValue in interface DynField_v2public DynField setClassOfValue(DynStruct dynStruct)
setClassOfValue in interface DynField_v2public DynStruct getDynClassOfValue()
DynField_v2getDynClassOfValue in interface DynField_v2public int getRelationType()
getRelationType in interface DynField_v2public DynField setRelationType(int relationType)
setRelationType in interface DynField_v2public DynField setElementsType(int type)
DynFieldsetElementsType in interface DynFieldtype - de los elementosDynField objectpublic DynField setElementsType(DynStruct type)
DynFieldsetElementsType in interface DynFieldtype - de los elementosDynField objectpublic DynField getElementsType()
DynFieldgetElementsType in interface DynFieldpublic DynField setClassOfItems(DynStruct dynStrct)
setClassOfItems in interface DynField_v2public DynField setClassOfItems(java.lang.String theClassNameOfValue)
setClassOfItems in interface DynField_v2public java.lang.String getClassNameOfItems()
DynField_v2getClassNameOfItems in interface DynField_v2public DynStruct getDynClassOfItems()
DynField_v2getDynClassOfItems in interface DynField_v2public DynField setClassOfItems(java.lang.Class theClass) throws DynFieldIsNotAContainerException
DynFieldsetClassOfItems in interface DynFieldsetClassOfItems in interface DynField_v2DynField objectDynFieldIsNotAContainerExceptionpublic java.lang.Class getClassOfItems()
DynField_v2getClassOfItems in interface DynFieldgetClassOfItems in interface DynField_v2public DynField setTypeOfItems(int type)
setTypeOfItems in interface DynField_v2public int getTypeOfItems()
DynField_v2getTypeOfItems in interface DynField_v2public DynField setValidateElements(boolean validate)
setValidateElements in interface DynField_v2public boolean getValidateElements()
getValidateElements in interface DynField_v2public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class java.lang.Objectjava.lang.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()}.