javax.cim

Class CIMProperty

public class CIMProperty extends CIMValuedElement implements Serializable

The CIMProperty class wraps the value of a CIM Property. A CIM Property Object consists of a name, data type and value. The CIM Property object also includes a flag to signify whether the property is a key property (used as part of the name of the CIM element), a flag to signify whether it was propgated from a parent class (or default value) and the class origin information (where the property was originally defined or last overridden). A CIM Property is defined in the CIM Infrastructure Specification. The specification is available from the DMTF (Distributed Management Task Force) at http://dmtf.org/.
Constructor Summary
CIMProperty(String pName, CIMDataType pType, Object pValue)
Constructs a CIMProperty to be used in instances.
CIMProperty(String pName, CIMDataType pType, Object pValue, boolean pKey, boolean pPropagated, String pOriginClass)
Constructs a CIMProperty to be used in instances.
Method Summary
booleanequals(Object pObj)
Compares this object against the specified object.
StringgetOriginClass()
Returns the class or instance in which this property was defined.
booleanisKey()
Convenience method for determining if this property is a Key.
booleanisPropagated()
Determines if this property is Propagated.
StringtoString()
Returns a String representation of the CIMElement This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations.

Constructor Detail

CIMProperty

public CIMProperty(String pName, CIMDataType pType, Object pValue)
Constructs a CIMProperty to be used in instances. For a CIMClass CIMClassProperty should be used. This can only be used for non-Key properties, non-propagated properties and when the the originclass is not needed.

Parameters: pName - The name of the property. pType - The CIMDataType of the property. pValue - The value of the property.

CIMProperty

public CIMProperty(String pName, CIMDataType pType, Object pValue, boolean pKey, boolean pPropagated, String pOriginClass)
Constructs a CIMProperty to be used in instances. For a CIMClass CIMClassProperty should be used.

Parameters: pName - The name of the property. pType - The CIMDataType of the property. pValue - The value of the property. pKey - true if the property is a key; otherwise false. pPropagated - true if the value was propogated from the class. pOriginClass - The class in which this property was defined or overriden.

Method Detail

equals

public boolean equals(Object pObj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a CIMValuedObject that represents the same name, type and value as this object.

Parameters: pObj - the object to compare with.

Returns: true if the objects are the same; false otherwise.

getOriginClass

public String getOriginClass()
Returns the class or instance in which this property was defined.

Returns: Name of class where this property was defined.

isKey

public boolean isKey()
Convenience method for determining if this property is a Key.

Returns: true if this property is a key.

isPropagated

public boolean isPropagated()
Determines if this property is Propagated. When this property is part of a class, this value designates that the classorigin value is the same as the class name. For an instance, this designates if the value of this property was inherited from the class or if it was set as part of this instance.

Returns: true if this property is propagated.

toString

public String toString()
Returns a String representation of the CIMElement 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: string representation of this element.

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