Package com.cloudinary.metadata
Class DateMetadataField
- java.lang.Object
-
- org.cloudinary.json.JSONObject
-
- com.cloudinary.metadata.MetadataField<java.util.Date>
-
- com.cloudinary.metadata.DateMetadataField
-
- All Implemented Interfaces:
java.io.Serializable
public class DateMetadataField extends MetadataField<java.util.Date>
Represents a metadata field with type 'date'- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.cloudinary.metadata.MetadataField
DEFAULT_VALUE, EXTERNAL_ID, LABEL, MANDATORY, TYPE, VALIDATION
-
Fields inherited from class org.cloudinary.json.JSONObject
NULL
-
-
Constructor Summary
Constructors Constructor Description DateMetadataField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
getDefaultValue()
Get the default value of this date field.void
setDefaultValue(java.util.Date defaultValue)
Sets the default date used for this field.-
Methods inherited from class com.cloudinary.metadata.MetadataField
getDataSource, getExternalId, getLabel, getType, getValidation, isMandatory, setDataSource, setExternalId, setLabel, setMandatory, setValidation
-
Methods inherited from class org.cloudinary.json.JSONObject
accumulate, append, doubleToString, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toString, toString, valueToString, wrap, write
-
-
-
-
Method Detail
-
setDefaultValue
public void setDefaultValue(java.util.Date defaultValue)
Sets the default date used for this field.- Overrides:
setDefaultValue
in classMetadataField<java.util.Date>
- Parameters:
defaultValue
- The date to set. Date only without a time component, UTC assumed.
-
getDefaultValue
public java.util.Date getDefaultValue() throws java.text.ParseException
Get the default value of this date field.- Overrides:
getDefaultValue
in classMetadataField<java.util.Date>
- Returns:
- The date only without a time component, UTC.
- Throws:
java.text.ParseException
- When the underlying value is malformed.
-
-