javax.cim

Class CIMClassProperty

public class CIMClassProperty extends CIMProperty implements CIMQualifiedElementInterface, Serializable

Creates and instantiates a CIM property, a name/value pair used to characterize instances of a class. Use this API to create a new attribute to describe managed objects. For example, after a printer upgrade to handle duplex (two-sided) printing, you could use this interface to create a CIM property called duplex. The CIMProperty class inherits the property name from its parent class (CIMProperty extends CIMQualifiedElement). A CIM Property is defined by its name, data type and origin class.
Constructor Summary
CIMClassProperty(String pName, CIMDataType pType, Object pValue, CIMQualifier[] pQualifiers, boolean pKey, boolean propagated, String originClass)
This method constructs an instance of CIMClassProperty.
Method Summary
booleanequals(Object pObj)
CIMClassPropertyfilter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin)
Returns a CIMClassProperty filtered as specified.
CIMClassPropertyfilter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin, boolean pLocalOnly)
Returns a CIMClassProperty filtered as specified.
CIMQualifiergetQualifier(int pIndex)
Get a qualifier by index.
CIMQualifiergetQualifier(String pName)
Gets a qualifier by name.
intgetQualifierCount()
Get the number of qualifiers defined for this property.
CIMQualifier[]getQualifiers()
Returns the list of qualifiers for this property.
ObjectgetQualifierValue(String pName)
booleanhasQualifier(String pName)
Checks whether the specified qualifier is one of the qualifiers defined for this property.
booleanhasQualifierValue(String pName, Object pValue)
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

CIMClassProperty

public CIMClassProperty(String pName, CIMDataType pType, Object pValue, CIMQualifier[] pQualifiers, boolean pKey, boolean propagated, String originClass)
This method constructs an instance of CIMClassProperty.

Parameters: pName - The name of the property. pType - The data type of the property. pValue - The value of the property. pQualifiers - The qualifiers for the property. pKey - true if the property is a key, otherwise false. propagated - true if the property was inherited, otherwise false. originClass - The original class in which the property was defined.

Method Detail

equals

public boolean equals(Object pObj)

See Also: CIMProperty

filter

public CIMClassProperty filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin)
Returns a CIMClassProperty filtered as specified.

Parameters: pIncludeQualifiers - If true all qualifiers are returned; otherwise no qualifiers. pIncludeClassOrigin - If true the class origin is included; otherwise no class origin is present

Returns: A filtered CIMClassProperty.

filter

public CIMClassProperty filter(boolean pIncludeQualifiers, boolean pIncludeClassOrigin, boolean pLocalOnly)
Returns a CIMClassProperty filtered as specified.

Parameters: pIncludeQualifiers If true all qualifiers are returned; otherwise no qualifiers. pIncludeClassOrigin If true the class origin is included; otherwise no class origin is present pLocalOnly If true only the qualifiers that were not propagated will be included.

Returns: CIMClassProperty A filtered CIMClassProperty

getQualifier

public CIMQualifier getQualifier(int pIndex)
Get a qualifier by index.

Parameters: pIndex - The index of the qualifier to retrieve.

Returns: The Qualifier at the specified index.

getQualifier

public CIMQualifier getQualifier(String pName)
Gets a qualifier by name.

Parameters: pName - The name of the qualifier to get.

Returns: The qualifier requested or null if the qualifier does not exist.

getQualifierCount

public int getQualifierCount()
Get the number of qualifiers defined for this property.

Returns: The number of qualifiers defined for this property.

getQualifiers

public CIMQualifier[] getQualifiers()
Returns the list of qualifiers for this property.

Returns: Qualifiers for this property.

getQualifierValue

public Object getQualifierValue(String pName)

See Also: CIMQualifiedElementInterface

hasQualifier

public boolean hasQualifier(String pName)
Checks whether the specified qualifier is one of the qualifiers defined for this property.

Parameters: pName - the name of the qualifier.

Returns: true if the qualifier exists in this property, otherwise false.

hasQualifierValue

public boolean hasQualifierValue(String pName, Object pValue)

See Also: CIMQualifiedElementInterface

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.