Provides the basic interface to define CIM data type defined by the CIM
specification.
BOOLEAN
public static final int BOOLEAN
Boolean.
BOOLEAN_ARRAY
public static final int BOOLEAN_ARRAY
CHAR16
public static final int CHAR16
16 bit UCS-2 character.
CHAR16_ARRAY
public static final int CHAR16_ARRAY
CLASS
public static final int CLASS
Class type.
DATETIME
public static final int DATETIME
A string which defines a datetime value according the CIM specification.
DATETIME_ARRAY
public static final int DATETIME_ARRAY
INVALID
public static final int INVALID
Invalid type.
INVALID_DATATYPE
public static final CIMDataType INVALID_DATATYPE
MAX_ARRAY_TYPE
public static final int MAX_ARRAY_TYPE
MAX_SINGLE_TYPE
public static final int MAX_SINGLE_TYPE
MIN_ARRAY_TYPE
public static final int MIN_ARRAY_TYPE
MIN_SINGLE_TYPE
public static final int MIN_SINGLE_TYPE
NULL
public static final int NULL
Null type.
NULL_DATATYPE
public static final CIMDataType NULL_DATATYPE
NUMERIC
public static final int NUMERIC
Numeric type for key properties
OBJECT
public static final int OBJECT
CIMInstance type.
REAL32
public static final int REAL32
IEEE 4-byte floating point.
REAL32_ARRAY
public static final int REAL32_ARRAY
REAL64
public static final int REAL64
IEEE 8-byte floating point.
REAL64_ARRAY
public static final int REAL64_ARRAY
REFERENCE
public static final int REFERENCE
Reference type.
REFERENCE_ARRAY
public static final int REFERENCE_ARRAY
SINT16
public static final int SINT16
Signed 16-bit integer.
SINT16_ARRAY
public static final int SINT16_ARRAY
SINT32
public static final int SINT32
Signed 32-bit integer.
SINT32_ARRAY
public static final int SINT32_ARRAY
SINT64
public static final int SINT64
Signed 64-bit integer.
SINT64_ARRAY
public static final int SINT64_ARRAY
SINT8
public static final int SINT8
Signed 8-bit integer.
SINT8_ARRAY
public static final int SINT8_ARRAY
SIZE_SINGLE
public static final int SIZE_SINGLE
SIZE_UNLIMITED
public static final int SIZE_UNLIMITED
STRING
public static final int STRING
UCS String.
STRING_ARRAY
public static final int STRING_ARRAY
UINT16
public static final int UINT16
Unsigned 16-bit integer.
UINT16_ARRAY
public static final int UINT16_ARRAY
UINT32
public static final int UINT32
Unsigned 32-bit integer.
UINT32_ARRAY
public static final int UINT32_ARRAY
UINT64
public static final int UINT64
Unsigned 64-bit integer.
UINT64_ARRAY
public static final int UINT64_ARRAY
UINT8
public static final int UINT8
Unsigned 8-bit integer.
UINT8_ARRAY
public static final int UINT8_ARRAY
clone
public Object clone()
equals
public boolean equals(Object obj)
findArrayType
public static int findArrayType(int pSimpleType)
Returns a value which represents the array type representation of a
single type passed as an argument.
pSimpleType
- The simple type
- returns the corresponding array element type, or INVALID if the
specified data type does not has a corresponding array type
element.
findSimpleType
public static int findSimpleType(int pArrayType)
Returns a value which represents the single type representation of an
array type passed as an argument.
pArrayType
- The array type
- returns the corresponding single element type, or INVALID if the
specified data type does not has a corresponding single type
element.
findType
public static int findType(Object pValue)
Returns an integer value that represents the data type for the specified
object. (i.e. NULL for null values, UINT8 for Unsigned8 values, and so
on). If the value type is undetermined, return INVALID type.
- The CIM data type fitting the value
getDataType
public static CIMDataType getDataType(String pTypeString,
boolean pIsArray)
Returns the correspoding CIMDataType object for the specified string
type. Given a string representation of the data type (i.e. "uint16")
returns the appropiate CIMDataType. The isArray argument determine if the
resulting data type must be an array type or a single type element.
pTypeString
- The type's string representationpIsArray
- true
if the type must be an array type,
false
if the type must be a non-array type
getPredefinedType
public static CIMDataType getPredefinedType(int pType)
Return a predefined value for the CIMDataType. Applications are encourage
to use this method instead of creating new CIMDataType objects. An
exception to use this is when an array data type, with an specific size
other than unlimited size, needs to be used.
pType
- One of the data type constants in this class
getRefClassName
public String getRefClassName()
Returns the class name pointed by this data type.
- The referenced class' name
getSize
public int getSize()
Returns the current size of the data type.
- an integer which represents the size of the data type. A value of
zero or a positive value means that the data type is an array
type, and the value represent the size of the array. If the
returned value is SIZE_UNLIMITED, the data type represents an
unlimited size array, which means that the size has not been
specified. If the returned value is SIZE_SINGLE, the data type
represents a single element entity.
getStringType
public String getStringType()
Returns the string representation of this type.
- The string representation
getType
public int getType()
Returns the type of this object.
hashCode
public int hashCode()
isArrayType
public boolean isArrayType()
Defermines if the current data type is an array type.
true
if this type is an array type,
false
otherwise
isReferenceType
public boolean isReferenceType()
Determines if the current data type is a reference type.
true
if this data type is a reference type,
false
otherwise
isTypeCompatible
public static boolean isTypeCompatible(Object pValue,
CIMDataType pDataType)
Defermines if the specified data type is is compatible with the data type
of the specified value.
pValue
- The valuepDataType
- The data type
true
, if compatible, false
otherwise
main
public static void main(String[] args)
setType
public void setType(int pType)
Sets the current type of the object. Additionally, modifies the size
field to SIZE_UNLIMITED if specified data type is an array type,
otherwise assigns it to SIZE_SINGLE
toMOF
public String toMOF()
Returns the MOF representation of this object.
toString
public String toString()