Class StringEnumerateDomainType
- java.lang.Object
-
- org.openbravo.base.model.domaintype.BaseDomainType
-
- org.openbravo.base.model.domaintype.BasePrimitiveDomainType
-
- org.openbravo.base.model.domaintype.BaseEnumerateDomainType<String>
-
- org.openbravo.base.model.domaintype.StringEnumerateDomainType
-
- All Implemented Interfaces:
DomainType
,EnumerateDomainType
,PrimitiveDomainType
public class StringEnumerateDomainType extends BaseEnumerateDomainType<String>
The type of a column which can only have a value from a pre-defined set.- Author:
- mtaal
-
-
Field Summary
-
Fields inherited from interface org.openbravo.base.model.domaintype.PrimitiveDomainType
EMPTY_STRING
-
-
Constructor Summary
Constructors Constructor Description StringEnumerateDomainType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
createFromString(String strValue)
Converts a string back to an object value of the primitive type ({link #getPrimitiveType()}) represented by this DomainType.Class<?>
getPrimitiveType()
As a standard only a string/varchar column can have enumerates.String
getXMLSchemaType()
-
Methods inherited from class org.openbravo.base.model.domaintype.BaseEnumerateDomainType
addEnumerateValue, checkIsValidValue, getEnumerateValues
-
Methods inherited from class org.openbravo.base.model.domaintype.BasePrimitiveDomainType
convertToString, 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
-
Methods inherited from interface org.openbravo.base.model.domaintype.PrimitiveDomainType
convertToString, getFormatId, getHibernateType
-
-
-
-
Method Detail
-
getPrimitiveType
public Class<?> getPrimitiveType()
As a standard only a string/varchar column can have enumerates.- Specified by:
getPrimitiveType
in interfacePrimitiveDomainType
- Overrides:
getPrimitiveType
in classBaseEnumerateDomainType<String>
- Returns:
- class of
String
.
-
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.
-
-