Package org.sblim.wbem.cim
Class CIMProperty
- java.lang.Object
-
- org.sblim.wbem.cim.CIMElement
-
- org.sblim.wbem.cim.CIMQualifiableElement
-
- org.sblim.wbem.cim.CIMProperty
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
public class CIMProperty extends CIMQualifiableElement implements java.lang.Cloneable, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.sblim.wbem.cim.CIMQualifiableElement
iQualifiers
-
Fields inherited from class org.sblim.wbem.cim.CIMElement
CLOSING_BRAKET, EMPTY, iName, OPENING_BRAKET
-
-
Constructor Summary
Constructors Constructor Description CIMProperty()
Creates an CIMProperty object.CIMProperty(java.lang.String pName)
Creates a CIMProperty object with the specified name.CIMProperty(java.lang.String pName, CIMValue pValue)
Creates a CIMProperty with the specified name and CIMValue.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
clone()
java.lang.Object
clone(boolean pIncludeQualifier, boolean pIncludeClassOrigin)
Creates a replica of this object.boolean
equals(java.lang.Object obj)
java.lang.String
getOriginClass()
Returns the origin class for this object.java.lang.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(java.lang.String pName)
Removes the qualifier with the specified name from this CIMProperty.void
setKey(boolean pKey)
Adds/removes the key qualifiervoid
setOriginClass(java.lang.String pOriginClass)
Specifies the origin class for this CIMProperty.void
setOverridingProperty(java.lang.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.java.lang.String
toMOF()
Returns the MOF representation of this CIMObject.java.lang.String
toString()
-
Methods inherited from class org.sblim.wbem.cim.CIMQualifiableElement
addQualifier, getQualifier, getQualifiers, setQualifiers
-
Methods inherited from class org.sblim.wbem.cim.CIMElement
appendTab, assign, compareTo, getName, lessThan, setName, vectorToMOFString, vectorToMOFString, vectorToMOFString
-
-
-
-
Constructor Detail
-
CIMProperty
public CIMProperty()
Creates an CIMProperty object.
-
CIMProperty
public CIMProperty(java.lang.String pName)
Creates a CIMProperty object with the specified name.- Parameters:
pName
- The property's name
-
CIMProperty
public CIMProperty(java.lang.String pName, CIMValue pValue)
Creates a CIMProperty with the specified name and CIMValue.- Parameters:
pName
- The property's namepValue
- The property's value
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
clone
public java.lang.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
- iftrue
, the qualifiers of the CIMProperty will be copiedpIncludeClassOrigin
- iftrue
, the classorigin information will be copied- Returns:
- The replica
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classCIMElement
-
getOriginClass
public java.lang.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 java.lang.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
-
getValue
public CIMValue getValue()
Returns the CIMValue associated with this CIMProperty.- Returns:
- The value
-
getType
public CIMDataType getType()
Returns the CIMDataType associated with this CIMProperty.- Returns:
- The type
-
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(java.lang.String pName)
Removes the qualifier with the specified name from this CIMProperty.- Overrides:
removeQualifier
in classCIMQualifiableElement
- Parameters:
pName
- The qualifier's name- Returns:
true
if the qualifier was successfully removed, otherwise returnsfalse
.
-
setKey
public void setKey(boolean pKey)
Adds/removes the key qualifier- Parameters:
pKey
- iftrue
the key qualifier is added, otherwise it's removed
-
setOverridingProperty
public void setOverridingProperty(java.lang.String pNewOverridingProperty)
Specifies the overriding property for this CIMProperty.- Parameters:
pNewOverridingProperty
- The overriding property
-
setOriginClass
public void setOriginClass(java.lang.String pOriginClass)
Specifies the origin class for this CIMProperty.- Parameters:
pOriginClass
- The origin class
-
setPropagated
public void setPropagated(boolean pValue)
Sets the propagated value to the specified value.- Parameters:
pValue
- The propageted value
-
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- Throws:
java.lang.IllegalArgumentException
- if the current property already has a CIMValue assigned to it and the new CIMDataType does not matches the value's data type.
-
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.
-
setValue
public void setValue(CIMValue pValue)
Sets the value of this CIMProperty to the specified CIMProperty.- Parameters:
pValue
- The value- Throws:
java.lang.IllegalArgumentException
- if the specified CIMValues's type does not match current CIMDataType
-
toMOF
public java.lang.String toMOF()
Returns the MOF representation of this CIMObject.- Returns:
- The MOF representation
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-