Class DateDomainType
- java.lang.Object
-
- org.openbravo.base.model.domaintype.BaseDomainType
-
- org.openbravo.base.model.domaintype.BasePrimitiveDomainType
-
- org.openbravo.base.model.domaintype.DateDomainType
-
- All Implemented Interfaces:
DomainType
,PrimitiveDomainType
public class DateDomainType extends BasePrimitiveDomainType
The type for a date column.- Author:
- mtaal
-
-
Field Summary
-
Fields inherited from interface org.openbravo.base.model.domaintype.PrimitiveDomainType
EMPTY_STRING
-
-
Constructor Summary
Constructors Constructor Description DateDomainType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
convertToString(Object value)
Converts an object value of this type to a locale/system neutral String.Object
createFromString(String strValue)
Converts a string back to an object value of the primitive type ({link #getPrimitiveType()}) represented by this DomainType.Class<?>
getPrimitiveType()
The primitive type class (for example java.lang.Long) if this is a primitive type.String
getXMLSchemaType()
-
Methods inherited from class org.openbravo.base.model.domaintype.BasePrimitiveDomainType
checkIsValidValue, getFormatId, getHibernateType
-
Methods inherited from class org.openbravo.base.model.domaintype.BaseDomainType
checkObjectIsValid, getClasses, getModelProvider, getReference, initialize, setModelProvider, setReference
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openbravo.base.model.domaintype.DomainType
checkObjectIsValid, getModelProvider, getReference, initialize, setModelProvider, setReference
-
-
-
-
Method Detail
-
getPrimitiveType
public Class<?> getPrimitiveType()
Description copied from interface:PrimitiveDomainType
The primitive type class (for example java.lang.Long) if this is a primitive type.- Returns:
- class of the
Date
-
convertToString
public String convertToString(Object value)
Description copied from interface:PrimitiveDomainType
Converts an object value of this type to a locale/system neutral String. Is used in XML conversion. The opposite of this method is thePrimitiveDomainType.createFromString(String)
method.- Specified by:
convertToString
in interfacePrimitiveDomainType
- Overrides:
convertToString
in classBasePrimitiveDomainType
- Parameters:
value
- the value to convert to a string.- Returns:
- the String representation, if the value is null then an empty String is returned
-
createFromString
public Object createFromString(String strValue)
Description copied from interface:PrimitiveDomainType
Converts a string back to an object value of the primitive type ({link #getPrimitiveType()}) represented by this DomainType. This method is the opposite of thePrimitiveDomainType.convertToString(Object)
method.- Specified by:
createFromString
in interfacePrimitiveDomainType
- Overrides:
createFromString
in classBasePrimitiveDomainType
- Parameters:
strValue
- the string value to convert- Returns:
- the object value, null is returned if an empty string or null are passed as parameter.
-
getXMLSchemaType
public String getXMLSchemaType()
- Returns:
- the xml schema type which matches the primitive type, is used to create the XML Schema for the REST web services.
-
-