org.sblim.wbem.cim

Class CIMProperty

Implemented Interfaces:
Cloneable, Comparable, Serializable

public class CIMProperty
extends CIMQualifiableElement
implements Cloneable, Serializable

CIMProperty.java (C) Copyright IBM Corp. 2005, 2006 THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. You can obtain a current copy of the Common Public License from http://www.opensource.org/licenses/cpl1.0.php

Field Summary

Fields inherited from class org.sblim.wbem.cim.CIMQualifiableElement

iQualifiers

Fields inherited from class org.sblim.wbem.cim.CIMElement

CLOSING_BRAKET, EMPTY, OPENING_BRAKET, iName

Constructor Summary

CIMProperty()
Creates an CIMProperty object.
CIMProperty(String pName)
Creates a CIMProperty object with the specified name.
CIMProperty(String pName, CIMValue pValue)
Creates a CIMProperty with the specified name and CIMValue.

Method Summary

Object
clone()
Object
clone(boolean pIncludeQualifier, boolean pIncludeClassOrigin)
Creates a replica of this object.
boolean
equals(Object obj)
String
getOriginClass()
Returns the origin class for this object.
String
getOverridingProperty()
Returns the name of the property that this CIMProperty overrides.
int
getSize()
Returns the size of this property.
CIMDataType
getType()
Returns the CIMDataType associated with this CIMProperty.
CIMValue
getValue()
Returns the CIMValue associated with this CIMProperty.
boolean
isKey()
Determines if this CIMProperty contains the Key qualifier.
boolean
isPropagated()
Determines if this CIMProperty is propagated.
boolean
isReference()
Determines if this CIMProperty is a reference data type.
boolean
removeQualifier(String pName)
Removes the qualifier with the specified name from this CIMProperty.
void
setKey(boolean pKey)
Adds/removes the key qualifier
void
setOriginClass(String pOriginClass)
Specifies the origin class for this CIMProperty.
void
setOverridingProperty(String pNewOverridingProperty)
Specifies the overriding property for this CIMProperty.
void
setPropagated(boolean pValue)
Sets the propagated value to the specified value.
CIMQualifier
setQualifier(CIMQualifier pQualifier)
Updates the CIMQualifier value from the CIMProperty with the specified CIMQualifier.
void
setSize(int pSize)
Deprecated. the size of the property is bounded to the CIMDataType, which is unmutable.
void
setType(CIMDataType pType)
Sets the CIMDataType for this CIMProperty.
void
setValue(CIMValue pValue)
Sets the value of this CIMProperty to the specified CIMProperty.
String
toMOF()
Returns the MOF representation of this CIMObject.
String
toString()

Methods inherited from class org.sblim.wbem.cim.CIMQualifiableElement

addQualifier, getQualifier, getQualifiers, removeQualifier, setQualifiers

Methods inherited from class org.sblim.wbem.cim.CIMElement

appendTab, assign, compareTo, equals, getName, lessThan, setName, vectorToMOFString, vectorToMOFString, vectorToMOFString

Constructor Details

CIMProperty

public CIMProperty()
Creates an CIMProperty object.

CIMProperty

public CIMProperty(String pName)
Creates a CIMProperty object with the specified name.
Parameters:
pName - The property's name

CIMProperty

public CIMProperty(String pName,
                   CIMValue pValue)
Creates a CIMProperty with the specified name and CIMValue.
Parameters:
pName - The property's name
pValue - The property's value

Method Details

clone

public Object clone()

clone

public Object clone(boolean pIncludeQualifier,
                    boolean pIncludeClassOrigin)
Creates a replica of this object. Only if the includeQualifier arguments is true, the qualifiers of the CIMProperty will be copied. Only if includeClassOrigin is true, the classorigin information will be passed to the new object.
Parameters:
pIncludeQualifier - if true, the qualifiers of the CIMProperty will be copied
pIncludeClassOrigin - if true, the classorigin information will be copied
Returns:
The replica

equals

public boolean equals(Object obj)
Overrides:
equals in interface CIMElement

getOriginClass

public String getOriginClass()
Returns the origin class for this object. The origin class specifies the CIMClass that introduces this property.
Returns:
The originating class

getOverridingProperty

public String getOverridingProperty()
Returns the name of the property that this CIMProperty overrides. Returns null if this CIMProperty does not override any property.
Returns:
The overridden property

getSize

public int getSize()
Returns the size of this property.
Returns:
The size

getType

public CIMDataType getType()
Returns the CIMDataType associated with this CIMProperty.
Returns:
The type

getValue

public CIMValue getValue()
Returns the CIMValue associated with this CIMProperty.
Returns:
The value

isKey

public boolean isKey()
Determines if this CIMProperty contains the Key qualifier.
Returns:
true if the property is a key property

isPropagated

public boolean isPropagated()
Determines if this CIMProperty is propagated.
Returns:
true if the property is propagated

isReference

public boolean isReference()
Determines if this CIMProperty is a reference data type.
Returns:
true if the property is a reference

removeQualifier

public boolean removeQualifier(String pName)
Removes the qualifier with the specified name from this CIMProperty.
Overrides:
removeQualifier in interface CIMQualifiableElement
Parameters:
pName - The qualifier's name
Returns:
true if the qualifier was successfully removed, otherwise returns false.

setKey

public void setKey(boolean pKey)
Adds/removes the key qualifier
Parameters:
pKey - if true the key qualifier is added, otherwise it's removed

setOriginClass

public void setOriginClass(String pOriginClass)
Specifies the origin class for this CIMProperty.
Parameters:
pOriginClass - The origin class

setOverridingProperty

public void setOverridingProperty(String pNewOverridingProperty)
Specifies the overriding property for this CIMProperty.
Parameters:
pNewOverridingProperty - The overriding property

setPropagated

public void setPropagated(boolean pValue)
Sets the propagated value to the specified value.
Parameters:
pValue - The propageted value

setQualifier

public CIMQualifier setQualifier(CIMQualifier pQualifier)
            throws CIMException
Updates the CIMQualifier value from the CIMProperty with the specified CIMQualifier.
Parameters:
pQualifier - The qualifier
Returns:
The new qualifier
Throws:
CIMException - if a CIMQualifier with the same name does not exists.

setSize

public void setSize(int pSize)

Deprecated. the size of the property is bounded to the CIMDataType, which is unmutable. Applications are encourage to specify the CIMDataType with the appopiated size.

Specifies the size of this property.
Parameters:
pSize - The size

setType

public void setType(CIMDataType pType)
Sets the CIMDataType for this CIMProperty.
Parameters:
pType - The type

setValue

public void setValue(CIMValue pValue)
Sets the value of this CIMProperty to the specified CIMProperty.
Parameters:
pValue - The value

toMOF

public String toMOF()
Returns the MOF representation of this CIMObject.
Returns:
The MOF representation

toString

public String toString()

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