public enum DataType extends java.lang.Enum<DataType>
INTEGER, FLOAT and STRING
are the respective equivalents of ProcessConstants.AdeptDataType.INTEGER,
ProcessConstants.AdeptDataType.FLOAT and ProcessConstants.AdeptDataType.STRING (see
#fromAdeptDataType(AdeptDataType) and
toAdeptDataType(DataType)).
If new DataTypes are added, isAssignableFrom(DataType),
OrgModelTools.toPolicyToken(Object) and
CmpOperator.canCompare(DataType, DataType) might have to be adapted,
too.
| Enum Constant and Description |
|---|
FLOAT
|
INTEGER
|
NULL
NULL is of course no real data type, but very useful in
cases where attribute values should be unset (i.e. set to null)
or compared to null. |
STRING
a Java
String which is equivalent to
ProcessConstants.AdeptDataType.STRING |
TIMESTAMP
a date + time in the format
yyyy-MM-dd HH:mm:ss |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
displayName()
Returns a display name for this
DataType. |
static DataType |
fromAdeptDataType(ProcessConstants.AdeptDataType adeptDataType)
Returns the equivalent
DataType for the specified
ProcessConstants.AdeptDataType or null if there is none. |
static DataType |
getDataTypeForObject(java.lang.Object object)
Returns the appropriate
DataType for the given type of the
object. |
boolean |
isAssignableFrom(DataType dataType)
Returns whether the given data type can be assign to this data type.
|
boolean |
isEnabled()
Returns whether this data type is enabled in the system.
|
boolean |
isNumber()
Returns whether this
DataType is a number type. |
static ProcessConstants.AdeptDataType |
toAdeptDataType(DataType dataType)
Returns the equivalent
ProcessConstants.AdeptDataType for the specified
DataType or null if there is none. |
static DataType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DataType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataType NULL
NULL is of course no real data type, but very useful in
cases where attribute values should be unset (i.e. set to null)
or compared to null. The actual data type of an attribute
can NEVER be NULL.public static final DataType INTEGER
public static final DataType FLOAT
public static final DataType STRING
String which is equivalent to
ProcessConstants.AdeptDataType.STRINGpublic static final DataType TIMESTAMP
yyyy-MM-dd HH:mm:sspublic static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean isEnabled()
public boolean isNumber()
DataType is a number type.DataType is a number typepublic boolean isAssignableFrom(DataType dataType)
attributeType.isAssignableFrom(valueObjectType), in
ModelChangeOperations.updateEntity(de.aristaflow.adept2.base.sessionmanagement.SessionToken, Entity).
If dataType is NULL this method will return whether
null can be assigned (which means that the attribute value
will be unset).dataType - the data type to testpublic java.lang.String displayName()
DataType.DataTypepublic static DataType getDataTypeForObject(java.lang.Object object)
DataType for the given type of the
object. E.g. an Long-object will be mapped to INTEGER.
If it can't be mapped, null will be returned. If the parameter
is null, the NULL type will be returned.object - the object whose type should be mapped to a
DataTypeDataType of the object or
null if the object type couldn't be mappedpublic static DataType fromAdeptDataType(ProcessConstants.AdeptDataType adeptDataType)
DataType for the specified
ProcessConstants.AdeptDataType or null if there is none.
INTEGER, FLOAT and
STRING are the respective equivalents of
ProcessConstants.AdeptDataType.INTEGER, ProcessConstants.AdeptDataType.FLOAT and
ProcessConstants.AdeptDataType.STRING.
adeptDataType - the ProcessConstants.AdeptDataType to be mappedDataTypepublic static ProcessConstants.AdeptDataType toAdeptDataType(DataType dataType)
ProcessConstants.AdeptDataType for the specified
DataType or null if there is none.
INTEGER, FLOAT and
STRING are the respective equivalents of
ProcessConstants.AdeptDataType.INTEGER, ProcessConstants.AdeptDataType.FLOAT and
ProcessConstants.AdeptDataType.STRING.
dataType - the DataType to be mappedProcessConstants.AdeptDataType