Class LongDomainType
- java.lang.Object
-
- org.openbravo.base.model.domaintype.BaseDomainType
-
- org.openbravo.base.model.domaintype.BasePrimitiveDomainType
-
- org.openbravo.base.model.domaintype.LongDomainType
-
- All Implemented Interfaces:
DomainType
,PrimitiveDomainType
public class LongDomainType extends BasePrimitiveDomainType
The type for an integer/long column.- Author:
- mtaal
-
-
Field Summary
-
Fields inherited from interface org.openbravo.base.model.domaintype.PrimitiveDomainType
EMPTY_STRING
-
-
Constructor Summary
Constructors Constructor Description LongDomainType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkIsValidValue(Property property, Object value)
Checks if a certain value is valid according to the type of the reference.Object
createFromString(String strValue)
Converts a string back to an object value of the primitive type ({link #getPrimitiveType()}) represented by this DomainType.String
getFormatId()
Returns the id of the format definition to use for this domain type.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
convertToString, 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
Long
-
checkIsValidValue
public void checkIsValidValue(Property property, Object value) throws ValidationException
Description copied from interface:DomainType
Checks if a certain value is valid according to the type of the reference.- Specified by:
checkIsValidValue
in interfaceDomainType
- Overrides:
checkIsValidValue
in classBasePrimitiveDomainType
- Parameters:
property
- the property which has this valuevalue
- the value- Throws:
ValidationException
-
getFormatId
public String getFormatId()
Description copied from interface:PrimitiveDomainType
Returns the id of the format definition to use for this domain type. Is normally only relevant for numeric domain types. The id is the prefix part of the name in the Format.xml file. So for example the id 'integer' maps to all the Format.xml entries with integer as a prefix.- Specified by:
getFormatId
in interfacePrimitiveDomainType
- Overrides:
getFormatId
in classBasePrimitiveDomainType
- Returns:
- the name of the format definition in the format.xml, if not relevant then null 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.
-
-