org.dasein.attributes.types
Class DateFactory.DateAttribute
java.lang.Object
org.dasein.attributes.DataType<Date>
org.dasein.attributes.types.DateFactory.DateAttribute
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- DateFactory
public static class DateFactory.DateAttribute
- extends DataType<Date>
- See Also:
- Serialized Form
| Methods inherited from class org.dasein.attributes.DataType |
equals, getGroup, getIndex, getName, getParameters, getSize, getTranslatedValue, getValues, hashCode, isMultiLingual, isMultiValued, isRequired |
getChoices
public Collection<Date> getChoices()
- Description copied from class:
DataType
- Provides a list of values considered valid for this data type. If any object of the type
governed by this data type is allowed, this method will return
null.
- Specified by:
getChoices in class DataType<Date>
- Returns:
- a list of allowed values or
null to allow any value
getFactory
public DataTypeFactory<Date> getFactory()
- Specified by:
getFactory in class DataType<Date>
- Returns:
- the factory object that owns this data type
getInputType
public DataType.InputType getInputType()
- Specified by:
getInputType in class DataType<Date>
- Returns:
- the type of input that a user interface should provide to prompt a user for
a value
getValue
public Date getValue(Object val)
- Description copied from class:
DataType
- Implementors will implement this method to convert a raw value into a valid value of
this data type. Implementations should throw an
InvalidAttributeException if
they are unable to interpret the raw value.
- Specified by:
getValue in class DataType<Date>
- Parameters:
val - the raw value, such as user input or a string from a persistent store
- Returns:
- a converted value of this data type
isValidChoice
public boolean isValidChoice(Date d)
- Description copied from class:
DataType
Checks the specified value to see if it is valid for this data type. In general,
implementing classes will check the following:
- that the value is not required in the instance of a
null value
- that the value is a member of the choices provided by
DataType.getChoices()
- any other criteria an implementor might want to validate
- Specified by:
isValidChoice in class DataType<Date>
- Parameters:
d - the value being validated
- Returns:
- true if the value is valid for this data type
toString
public String toString()
- Overrides:
toString in class DataType<Date>
- Returns:
- a string representation of this data type
Copyright © 2011 enStratus Networks LLC. All Rights Reserved.