Class DataType
java.lang.Object
com.aquima.interactions.foundation.DataType
- All Implemented Interfaces:
Serializable
This class defines all the data types that are supported by the foundation.
- Since:
- 5.0
- Author:
- O. Kerpershoek, F. v.d. Meer
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
This interface holds the numeric id's of the various data types.static final class
This class holds the names of the various data types. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DataType
Predefined data type for the Any type.static final DataType
static final DataType
Predefined data type for the Boolean type (true or false).static final DataType
Predefined data type for the Currency type.static final DataType
Predefined data type for the Date type.static final DataType
Predefined data type for the datetime type.static final DataType
Predefined data type for the Entity type.static final DataType
Predefined data type for the Integer type.static final DataType
Predefined data type for the Number type.static final DataType
Predefined data type for the Percentage type.static final DataType
Predefined data type for the String type. -
Method Summary
Modifier and TypeMethodDescriptionboolean
This method will compare this instance against the object passed to the method, and return true when both are identical.static DataType
This method returns the data type matching the specified name.int
getId()
This method return the unique id of this data type.getName()
This method return the name of the datatype.int
hashCode()
This method returns a hash code based on the id of the data type.boolean
isDate()
This method returns true when the data type represents a date.boolean
This method returns true when the data type represents a number.toString()
This method returns a string containing descriptive information about this datatype.static DataType
This method tries to determine the data type of the object passed to the method.static DataType
valueOf
(int id) This method can be used to lookup a DataType instance of an id.
-
Field Details
-
ANY
Predefined data type for the Any type. The any type is a special case data type in the sense that it represents all known data types. -
BINARY
-
BOOLEAN
Predefined data type for the Boolean type (true or false). -
STRING
Predefined data type for the String type. -
INTEGER
Predefined data type for the Integer type. This type is used for natural and negative numbers including zero. -
NUMBER
Predefined data type for the Number type. Numbers include both integers and rational numbers. -
DATE
Predefined data type for the Date type. -
DATETIME
Predefined data type for the datetime type. -
ENTITY
Predefined data type for the Entity type. -
CURRENCY
Predefined data type for the Currency type. -
PERCENTAGE
Predefined data type for the Percentage type.
-
-
Method Details
-
valueOf
This method can be used to lookup a DataType instance of an id. When an invalid id is passed to this method a ProfileException will be thrown. The list of valid id's is specified in the Id interface.- Parameters:
id
- integer containing the id of the data type that should be returned.- Returns:
- DataType instance for the specified id.
-
typeOf
This method tries to determine the data type of the object passed to the method. When no type could be determined for the object, an exception will be raised.- Parameters:
obj
- The object for which the data type should be determined.- Returns:
- The data type of the object.
-
forName
This method returns the data type matching the specified name.- Parameters:
name
- The name of the requested data type.- Returns:
- The data type matching the specified name.
-
getId
public int getId()This method return the unique id of this data type.- Returns:
- integer containing the unique id of the data type.
-
getName
This method return the name of the datatype.- Returns:
- String containing the name of the datatype.
-
toString
This method returns a string containing descriptive information about this datatype. -
hashCode
public int hashCode()This method returns a hash code based on the id of the data type. -
equals
This method will compare this instance against the object passed to the method, and return true when both are identical. -
isNumeric
public boolean isNumeric()This method returns true when the data type represents a number.- Returns:
- boolean indicating if this is a numeric data type.
-
isDate
public boolean isDate()This method returns true when the data type represents a date.- Returns:
- boolean indicating if this is a date data type.
-