Package de.esoco.data.element
Klasse DateDataElement
java.lang.Object
de.esoco.lib.property.AbstractStringProperties
de.esoco.lib.property.StringProperties
- Alle implementierten Schnittstellen:
de.esoco.lib.property.HasProperties
,de.esoco.lib.property.MutableProperties
,Serializable
A data element subclass for
Date
values.- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic enum
Enumeration of the possible input types when presenting data elements of this type in a user interface.Von Klasse geerbte verschachtelte Klassen/Schnittstellen de.esoco.data.element.DataElement
DataElement.CopyMode, DataElement.Flag
-
Feldübersicht
Modifizierer und TypFeldBeschreibungUI property: events that should be visualized in a calendar UI.static final de.esoco.lib.property.PropertyName
<DateDataElement.DateInputType> UI property: the type of a date input field.Von Klasse geerbte Felder de.esoco.data.element.DataElement
ALLOWED_VALUES_CHANGED, ANONYMOUS_ELEMENT_PREFIX, DISPLAY_FLAGS, HIDDEN_URL, INPUT_FLAGS, INTERACTION_URL, ITEM_ALL_RESOURCE, ITEM_NEW_RESOURCE, ITEM_RESOURCE_PREFIX, PATH_SEPARATOR_CHAR, SERVER_PROPERTIES
-
Konstruktorübersicht
KonstruktorBeschreibungDateDataElement
(String name, Date value) Creates a new modifiable instance without a validator.DateDataElement
(String name, Date value, Validator<? super Date> validator, Set<DataElement.Flag> flags) Creates a new instance with a certain initial value. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcopy
(DataElement.CopyMode mode, de.esoco.lib.property.PropertyName<?>... copyProperties) Returns a copy of this data element that contains all or a subset of it's current state.final Date
getValue()
Returns the date value.static void
init()
This method should be invoked to initialize the property name constants for de-serialization.protected DateDataElement
Returns a new instance of the respective data element sub-type on which it is invoked.protected void
updateValue
(Date newValue) Updates the element value.Von Klasse geerbte Methoden de.esoco.data.element.DataElement
checkImmutable, checkValidValue, copyAttributes, copyValue, createItemName, createItemResource, createResourceId, equals, getAllowedValues, getElementValidator, getName, getParent, getPath, getResourceId, getRoot, getSimpleName, getValidator, getValueHashCode, hasEqualValueAs, hashCode, isImmutable, isModified, isOptional, isSelected, isValidValue, markAsChanged, readFrom, removeProperty, setModified, setProperty, setSelected, setStringValue, setValidator, setValue, toDebugString, toString, valuesEqual, writeTo
Von Klasse geerbte Methoden de.esoco.lib.property.StringProperties
clearFlag, clearProperties, setFlag, setProperties, setProperty, setProperty
Von Klasse geerbte Methoden de.esoco.lib.property.AbstractStringProperties
convertCollection, convertMap, convertValue, ensurePropertyMapExists, findValue, getIntProperty, getProperty, getPropertyCount, getPropertyMap, getPropertyNames, hasEqualProperties, hasFlag, hasProperty, parseCollection, parseMap, parseValue, setPropertyMap
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden de.esoco.lib.property.HasProperties
getIntProperty, getProperty, getPropertyCount, getPropertyNames, hasFlag, hasProperty
-
Felddetails
-
DATE_INPUT_TYPE
public static final de.esoco.lib.property.PropertyName<DateDataElement.DateInputType> DATE_INPUT_TYPEUI property: the type of a date input field. -
DATE_HIGHLIGHTS
UI property: events that should be visualized in a calendar UI.
-
-
Konstruktordetails
-
DateDataElement
Creates a new modifiable instance without a validator.- Parameter:
name
- The name of this elementvalue
- The value of this element
-
DateDataElement
public DateDataElement(String name, Date value, Validator<? super Date> validator, Set<DataElement.Flag> flags) Creates a new instance with a certain initial value.- Parameter:
name
- The element namevalue
- The initial valuevalidator
- The validator for the date value or NULL for noneflags
- The optional flags for this data element
-
-
Methodendetails
-
init
public static void init()This method should be invoked to initialize the property name constants for de-serialization. -
copy
public DateDataElement copy(DataElement.CopyMode mode, de.esoco.lib.property.PropertyName<?>... copyProperties) Returns a copy of this data element that contains all or a subset of it's current state. Always copied are the name andflags
. Never copied is the parent reference because upon copying typically a reference to a copied parent needs to be set. The further data the copy contains depends on the copy mode:DataElement.CopyMode.FULL
: The copy contains all data (except the parent reference).DataElement.CopyMode.FLAT
: likeDataElement.CopyMode.FULL
but without sub-ordinate data elements.DataElement.CopyMode.PROPERTIES
: The copy contains only the properties but not the element value and attributes.DataElement.CopyMode.PLACEHOLDER
: The copy contains only the element name to serve as a placeholder.
The copy instance is created by invoking
DataElement.newInstance()
which has the recommendation to overwrite the return type to the concrete subtype to prevent the need for casting by the invoking code. For the same reason it is recommended that subclasses also override this method with the concrete return type and cast the result ofsuper.copy()
to that type.- Setzt außer Kraft:
copy
in KlasseDataElement<Date>
- Parameter:
mode
- The copy modecopyProperties
- An optional list of properties to copy. If not provided all properties will be copied (unless the mode isDataElement.CopyMode.PLACEHOLDER
)- Gibt zurück:
- The copied instance
-
getValue
Returns the date value.- Angegeben von:
getValue
in KlasseDataElement<Date>
- Gibt zurück:
- The element value
- Siehe auch:
-
newInstance
Returns a new instance of the respective data element sub-type on which it is invoked. This is needed for GWT which doesn't support reflection. Used byDataElement.copy(CopyMode, PropertyName...)
for cloning an instance. Implementations should overwrite the return type with their concrete type to prevent the need for casting by the invoking code.- Angegeben von:
newInstance
in KlasseDataElement<Date>
- Gibt zurück:
- The new instance
-
updateValue
Beschreibung aus Klasse kopiert:DataElement
Updates the element value. Will be invoked byDataElement.setValue(Object)
to store a new value after validation. If a subclass wants to reject certain values it should do so in theDataElement.isValidValue(Validator, Object)
method. Subclasses that are always immutable should implement an assertion because if the element has been initialized correctly (validator = NULL) this method should then be reached.- Angegeben von:
updateValue
in KlasseDataElement<Date>
- Parameter:
newValue
- The new value for this element- Siehe auch:
-