javax.cim

Class CIMDataType

public class CIMDataType extends Object implements Serializable

Encapsulates the CIM data types as defined in the CIM Infrastructure Specification. The CIM only allows a set number of data type. This class defines the mapping of CIM data types to Java objects.

Note: CIM Allows the size of an array as part of the data type. The predefined classes are unbounded.

The following table shows the mapping of CIM Data Type to Java.
CIM Data Type Java Representation
uint8 UnsignedInteger8
sint8 Byte
uint16 UnsignedInteger16
sint16 Short
uint32 UnsignedInteger32
sint32 Integer
uint64 UnsignedInteger64
sint64 Long
string String
boolean Boolean
real32 Float
real64 Double
datetime CIMDataTimeAbsolute
CIMDataTimeInterval
<classname> ref CIMObjectPath
char16 Character
Field Summary
static intBOOLEAN
Boolean
static CIMDataTypeBOOLEAN_ARRAY_T
Boolean unbounded array data type.
static CIMDataTypeBOOLEAN_T
Boolean data type.
static intCHAR16
16-bit UCS-2 character
static CIMDataTypeCHAR16_ARRAY_T
16-bit UCS-2 character unbounded Array type.
static CIMDataTypeCHAR16_T
16-bit UCS-2 character data type.
static intCLASS
CIMClass type
static CIMDataTypeCLASS_T
CIMClass type
static intDATETIME
A string containing the date-time
static CIMDataTypeDATETIME_ARRAY_T
A date-time unbounded array data type.
static CIMDataTypeDATETIME_T
A date-time data type.
static intINVALID
Invalid type.
static CIMDataTypeINVALID_T
Invalid data type.
static intNULL
Null type
static intOBJECT
CIMInstance type
static CIMDataTypeOBJECT_ARRAY_T
CIMInstance unbounded Array type
static CIMDataTypeOBJECT_T
CIMInstance type data type Note: For CIMV2, this can only be used when the property has either an EmbeddedInstance or EmbeddedObject qualifier.
static intREAL32
IEEE 4-byte floating-point
static CIMDataTypeREAL32_ARRAY_T
IEEE 4-byte floating-point unbounded array data type
static CIMDataTypeREAL32_T
IEEE 4-byte floating-point data type
static intREAL64
IEEE 8-byte floating-point
static CIMDataTypeREAL64_ARRAY_T
IEEE 8-byte floating-point unbounded array data type.
static CIMDataTypeREAL64_T
IEEE 8-byte floating-point data type.
static intREFERENCE
Reference type
static intSINT16
Signed 16-bit integer
static CIMDataTypeSINT16_ARRAY_T
Signed 16-bit integer unbounded array data type.
static CIMDataTypeSINT16_T
Signed 16-bit integer data type
static intSINT32
Signed 32-bit integer
static CIMDataTypeSINT32_ARRAY_T
Signed 32-bit integer unbounded array data type.
static CIMDataTypeSINT32_T
Signed 32-bit integer data type
static intSINT64
Signed 64-bit integer
static CIMDataTypeSINT64_ARRAY_T
Signed 64-bit integer unbounded array data type
static CIMDataTypeSINT64_T
Signed 64-bit integer data type.
static intSINT8
Signed 8-bit integer
static CIMDataTypeSINT8_ARRAY_T
Signed 8-bit integer unbounded array data type
static CIMDataTypeSINT8_T
Signed 8-bit integer data type
static intSTRING
UCS-2 string
static CIMDataTypeSTRING_ARRAY_T
UCS-2 string unbounded array data type
static CIMDataTypeSTRING_T
UCS-2 string data type
static intUINT16
Unsigned 16-bit integer
static CIMDataTypeUINT16_ARRAY_T
Unsigned 16-bit integer unbounded array data type
static CIMDataTypeUINT16_T
Unsigned 16-bit integer data type
static intUINT32
Unsigned 32-bit integer
static CIMDataTypeUINT32_ARRAY_T
Unsigned 32-bit integer unbounded array data type
static CIMDataTypeUINT32_T
Unsigned 32-bit integer data type.
static intUINT64
Unsigned 64-bit integer
static CIMDataTypeUINT64_ARRAY_T
Unsigned 64-bit integer unbounded array data type.
static CIMDataTypeUINT64_T
Unsigned 64-bit integer data type
static intUINT8
Unsigned 8-bit integer
static CIMDataTypeUINT8_ARRAY_T
Unsigned 8-bit integer unbounded array data type
static CIMDataTypeUINT8_T
Unsigned 8-bit integer data type
Constructor Summary
CIMDataType(int pType, int pSize)
Constructs a CIMDataType array object of the specified type and size.
CIMDataType(String pClassName)
Creates a new CIM REFERENCE data type object with the specified class reference.
CIMDataType(String pClassName, int pSize)
Creates a new CIM REFERENCE_ARRAY data type object with the specified class reference.
Method Summary
booleanequals(Object obj)
Checks that the specified object is a CIM data type.
static CIMDataTypegetDataType(Object o)
Get the data type of an object.
StringgetRefClassName()
Returns the class name of the CIM REFERENCE data type.
intgetSize()
Returns the size of the maximum number of elements an array data type may hold.
intgetType()
Returns the data type.
booleanisArray()
Checks if the data type is an array type.
StringtoString()
Returns aString representation of the CIMDataType.

Field Detail

BOOLEAN

public static final int BOOLEAN
Boolean

See Also: Boolean

BOOLEAN_ARRAY_T

public static final CIMDataType BOOLEAN_ARRAY_T
Boolean unbounded array data type.

See Also: Boolean

BOOLEAN_T

public static final CIMDataType BOOLEAN_T
Boolean data type.

See Also: Boolean

CHAR16

public static final int CHAR16
16-bit UCS-2 character

See Also: Character

CHAR16_ARRAY_T

public static final CIMDataType CHAR16_ARRAY_T
16-bit UCS-2 character unbounded Array type.

See Also: Character

CHAR16_T

public static final CIMDataType CHAR16_T
16-bit UCS-2 character data type.

See Also: Character

CLASS

public static final int CLASS
CIMClass type

CLASS_T

public static final CIMDataType CLASS_T
CIMClass type

See Also: CIMClass

DATETIME

public static final int DATETIME
A string containing the date-time

See Also: CIMDateTimeAbsolute

DATETIME_ARRAY_T

public static final CIMDataType DATETIME_ARRAY_T
A date-time unbounded array data type.

See Also: CIMDateTimeAbsolute

DATETIME_T

public static final CIMDataType DATETIME_T
A date-time data type.

See Also: CIMDateTimeAbsolute

INVALID

public static final int INVALID
Invalid type.

INVALID_T

public static final CIMDataType INVALID_T
Invalid data type.

NULL

public static final int NULL
Null type

OBJECT

public static final int OBJECT
CIMInstance type

See Also: CIMInstance

OBJECT_ARRAY_T

public static final CIMDataType OBJECT_ARRAY_T
CIMInstance unbounded Array type

See Also: CIMInstance

OBJECT_T

public static final CIMDataType OBJECT_T
CIMInstance type data type Note: For CIMV2, this can only be used when the property has either an EmbeddedInstance or EmbeddedObject qualifier.

See Also: CIMInstance

REAL32

public static final int REAL32
IEEE 4-byte floating-point

See Also: Float

REAL32_ARRAY_T

public static final CIMDataType REAL32_ARRAY_T
IEEE 4-byte floating-point unbounded array data type

See Also: Float

REAL32_T

public static final CIMDataType REAL32_T
IEEE 4-byte floating-point data type

See Also: Float

REAL64

public static final int REAL64
IEEE 8-byte floating-point

See Also: Double

REAL64_ARRAY_T

public static final CIMDataType REAL64_ARRAY_T
IEEE 8-byte floating-point unbounded array data type.

See Also: Double

REAL64_T

public static final CIMDataType REAL64_T
IEEE 8-byte floating-point data type.

See Also: Double

REFERENCE

public static final int REFERENCE
Reference type

See Also: CIMObjectPath

SINT16

public static final int SINT16
Signed 16-bit integer

See Also: Short

SINT16_ARRAY_T

public static final CIMDataType SINT16_ARRAY_T
Signed 16-bit integer unbounded array data type.

See Also: Short

SINT16_T

public static final CIMDataType SINT16_T
Signed 16-bit integer data type

See Also: Short

SINT32

public static final int SINT32
Signed 32-bit integer

See Also: Integer

SINT32_ARRAY_T

public static final CIMDataType SINT32_ARRAY_T
Signed 32-bit integer unbounded array data type.

See Also: Integer

SINT32_T

public static final CIMDataType SINT32_T
Signed 32-bit integer data type

See Also: Integer

SINT64

public static final int SINT64
Signed 64-bit integer

SINT64_ARRAY_T

public static final CIMDataType SINT64_ARRAY_T
Signed 64-bit integer unbounded array data type

See Also: Long

SINT64_T

public static final CIMDataType SINT64_T
Signed 64-bit integer data type.

See Also: Long

SINT8

public static final int SINT8
Signed 8-bit integer

See Also: Byte

SINT8_ARRAY_T

public static final CIMDataType SINT8_ARRAY_T
Signed 8-bit integer unbounded array data type

See Also: Byte

SINT8_T

public static final CIMDataType SINT8_T
Signed 8-bit integer data type

See Also: Byte

STRING

public static final int STRING
UCS-2 string

See Also: String

STRING_ARRAY_T

public static final CIMDataType STRING_ARRAY_T
UCS-2 string unbounded array data type

See Also: String

STRING_T

public static final CIMDataType STRING_T
UCS-2 string data type

See Also: String

UINT16

public static final int UINT16
Unsigned 16-bit integer

See Also: UnsignedInteger16

UINT16_ARRAY_T

public static final CIMDataType UINT16_ARRAY_T
Unsigned 16-bit integer unbounded array data type

See Also: UnsignedInteger16

UINT16_T

public static final CIMDataType UINT16_T
Unsigned 16-bit integer data type

See Also: UnsignedInteger16

UINT32

public static final int UINT32
Unsigned 32-bit integer

See Also: UnsignedInteger32

UINT32_ARRAY_T

public static final CIMDataType UINT32_ARRAY_T
Unsigned 32-bit integer unbounded array data type

See Also: UnsignedInteger32

UINT32_T

public static final CIMDataType UINT32_T
Unsigned 32-bit integer data type.

See Also: UnsignedInteger32

UINT64

public static final int UINT64
Unsigned 64-bit integer

See Also: UnsignedInteger64

UINT64_ARRAY_T

public static final CIMDataType UINT64_ARRAY_T
Unsigned 64-bit integer unbounded array data type.

See Also: UnsignedInteger64

UINT64_T

public static final CIMDataType UINT64_T
Unsigned 64-bit integer data type

See Also: UnsignedInteger64

UINT8

public static final int UINT8
Unsigned 8-bit integer

See Also: UnsignedInteger8

UINT8_ARRAY_T

public static final CIMDataType UINT8_ARRAY_T
Unsigned 8-bit integer unbounded array data type

See Also: UnsignedInteger8

UINT8_T

public static final CIMDataType UINT8_T
Unsigned 8-bit integer data type

See Also: UnsignedInteger8

Constructor Detail

CIMDataType

public CIMDataType(int pType, int pSize)
Constructs a CIMDataType array object of the specified type and size. This should only be used when the size is being limited/defined as part of the datatype.

Parameters: pType - The data type as define in the CIM class. pSize - The maximum number of elements in the array. 0 is used for variable size.

Throws: IllegalArgumentException Thrown if the pSize value specified is not a positive integer.

CIMDataType

public CIMDataType(String pClassName)
Creates a new CIM REFERENCE data type object with the specified class reference.

Parameters: pClassName - The CIM class reference name.

CIMDataType

public CIMDataType(String pClassName, int pSize)
Creates a new CIM REFERENCE_ARRAY data type object with the specified class reference.

Parameters: pClassName - The CIM class reference name. pSize The size of the array. 0 indicates the array is unbounded.

Method Detail

equals

public boolean equals(Object obj)
Checks that the specified object is a CIM data type.

Parameters: obj - the object to check

See Also: java.lang.Object#equals(java.lang.Object)

getDataType

public static final CIMDataType getDataType(Object o)
Get the data type of an object.

Parameters: o - The object whose data type to return.

Returns: The data type of the specified object.

Throws: IllegalArgumentException - if o is not a valid CIM Type

getRefClassName

public String getRefClassName()
Returns the class name of the CIM REFERENCE data type.

Returns: The CIM REFERENCE class name.

getSize

public int getSize()
Returns the size of the maximum number of elements an array data type may hold.

Returns: The maximum size of the array data type.

getType

public int getType()
Returns the data type.

Returns: The data type.

isArray

public boolean isArray()
Checks if the data type is an array type.

Returns: true if the data type is an array type, false otherwise.

toString

public String toString()
Returns aString representation of the CIMDataType. This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Returns: A string representation of this data type.

See Also: java.lang.Object#toString()

Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.