Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.schema.types.primitives
Class DateType

java.lang.Object
  extended by org.nuxeo.ecm.core.schema.types.AbstractType
      extended by org.nuxeo.ecm.core.schema.types.PrimitiveType
          extended by org.nuxeo.ecm.core.schema.types.primitives.DateType
All Implemented Interfaces:
Serializable, SimpleType, Type, ValueConverter

public class DateType
extends PrimitiveType

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Field Summary
static String ID
           
static DateType INSTANCE
           
 
Fields inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
EMPTY_SUPERTYPES, F_NOTNULL, F_READONLY
 
Fields inherited from interface org.nuxeo.ecm.core.schema.types.Type
ANY
 
Constructor Summary
DateType()
           
 
Method Summary
 Object convert(Object value)
          Converts the given value to an object compatible with the associated type.
 Object decode(String str)
          Decodes the string representation into an object of this type.
 String encode(Object object)
          Encodes the given object that is assumed to be of this type into a string representation.
 boolean validate(Object object)
          Tests whether the given object is of this type.
 
Methods inherited from class org.nuxeo.ecm.core.schema.types.PrimitiveType
getPrimitiveType, getRef, getSuperType, getTypeHierarchy, isPrimitive, isSimpleType
 
Methods inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
getHelper, getName, getSchema, getSchemaName, isAny, isAnyType, isComplexType, isCompositeType, isListType, isNotNull, isReadOnly, isSuperTypeOf, newInstance, setNotNull, setReadOnly
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.core.schema.types.Type
getHelper, getName, getSchema, getSchemaName, isAnyType, isComplexType, isCompositeType, isListType, isNotNull, isReadOnly, isSuperTypeOf, newInstance
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

INSTANCE

public static final DateType INSTANCE
Constructor Detail

DateType

public DateType()
Method Detail

validate

public boolean validate(Object object)
Description copied from interface: Type
Tests whether the given object is of this type.

Specified by:
validate in interface Type
Specified by:
validate in class PrimitiveType
Parameters:
object - the object to test
Returns:
true if the given object if of this type, false otherwise

convert

public Object convert(Object value)
Description copied from interface: ValueConverter
Converts the given value to an object compatible with the associated type.

Parameters:
value - the value to convert
Returns:
the converted value

decode

public Object decode(String str)
Description copied from interface: Type
Decodes the string representation into an object of this type.

Returns null if the string can not be decoded.

Specified by:
decode in interface Type
Overrides:
decode in class AbstractType
Parameters:
str - the string to decode
Returns:
the converted object that can be use as a value for an object of this type or null if the given object cannot be converted

encode

public String encode(Object object)
Description copied from interface: Type
Encodes the given object that is assumed to be of this type into a string representation.

Null is returned if the object cannot be converted.

Specified by:
encode in interface Type
Overrides:
encode in class AbstractType
Parameters:
object - the object to convert
Returns:
the string representation of the given object or null if object cannot be converted

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.