org.dasein.attributes.types
Class TimeFactory

java.lang.Object
  extended by org.dasein.attributes.DataTypeFactory<Date>
      extended by org.dasein.attributes.types.TimeFactory
All Implemented Interfaces:
Serializable

public class TimeFactory
extends DataTypeFactory<Date>

Extends the Date concept to the time as well.

Accepts times formatted as yyyy-MM-dd'T'HH:mm:ss like 2011-02-24T21:30:22

See Also:
Serialized Form

Nested Class Summary
static class TimeFactory.DateAttribute
           
 
Nested classes/interfaces inherited from class org.dasein.attributes.DataTypeFactory
DataTypeFactory.Constraint
 
Field Summary
static String TYPE_NAME
           
 
Constructor Summary
TimeFactory()
           
 
Method Summary
 Translator<String> getDisplayName()
          Provides a multi-lingual display name for this data type.
 String getStringValue(Object ob)
          Converts the specified value to a string representation for storage.
 DataType<Date> getType(boolean ml, boolean mv, boolean req, String... typeArgs)
          Provides access to the underlying data type object that governs this data type.
 DataType<Date> getType(String grp, Number idx, boolean ml, boolean mv, boolean req, String... typeArgs)
          Provides access to the underlying data type object that governs this data type.
 String getTypeName()
           
 
Methods inherited from class org.dasein.attributes.DataTypeFactory
getConstraint, getConstraints, getDisplayValue, getDisplayValue, getInstance, getTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final String TYPE_NAME
See Also:
Constant Field Values
Constructor Detail

TimeFactory

public TimeFactory()
Method Detail

getDisplayName

public Translator<String> getDisplayName()
Description copied from class: DataTypeFactory
Provides a multi-lingual display name for this data type.

Specified by:
getDisplayName in class DataTypeFactory<Date>
Returns:
the display name for the data type

getStringValue

public String getStringValue(Object ob)
Description copied from class: DataTypeFactory
Converts the specified value to a string representation for storage.

Overrides:
getStringValue in class DataTypeFactory<Date>
Parameters:
ob - the object to be converted
Returns:
a string representation for storage

getTypeName

public String getTypeName()
Specified by:
getTypeName in class DataTypeFactory<Date>
Returns:
the name of this data type

getType

public DataType<Date> getType(boolean ml,
                              boolean mv,
                              boolean req,
                              String... typeArgs)
Description copied from class: DataTypeFactory
Provides access to the underlying data type object that governs this data type. The configurable rules for the data type are provided as parameters.

Specified by:
getType in class DataTypeFactory<Date>
Parameters:
ml - is the data type multi-lingual?
mv - is the data type multi-valued?
req - is a value for the data type required?
typeArgs - arbitrary parameters with meaning dependent on the underlying type
Returns:
a data type object for the specified type

getType

public DataType<Date> getType(String grp,
                              Number idx,
                              boolean ml,
                              boolean mv,
                              boolean req,
                              String... typeArgs)
Description copied from class: DataTypeFactory
Provides access to the underlying data type object that governs this data type. The configurable rules for the data type are provided as parameters.

Specified by:
getType in class DataTypeFactory<Date>
Parameters:
grp - the group of the data type.
idx - the index of the data type.
ml - is the data type multi-lingual?
mv - is the data type multi-valued?
req - is a value for the data type required?
typeArgs - arbitrary parameters with meaning dependent on the underlying type
Returns:
a data type object for the specified type


Copyright © 2012 enStratus Networks Inc. All Rights Reserved.