Class CIMObject
java.lang.Object
org.sblim.wbem.cim.CIMElement
org.sblim.wbem.cim.CIMQualifiableElement
org.sblim.wbem.cim.CIMObject
- All Implemented Interfaces:
Serializable, Comparable
- Direct Known Subclasses:
CIMClass, CIMInstance
- See Also:
-
Field Summary
FieldsFields inherited from class CIMQualifiableElement
iQualifiers
Fields inherited from class CIMElement
CLOSING_BRAKET, EMPTY, iName, OPENING_BRAKET
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(CIMProperty pProperty) Adds a property to the specified object.Returns a list of CIMProperties for this CIMObject.getKeys()
Returns a list of key properties in this CIMObject.Returns a list of CIMProperties for this CIMObject.getProperty
(String pPropertyName) Gets the specified CIMProperty, if the property exists.getProperty
(String pName, String pOriginClass) Gets the CIMProperty from the current CIMElement, if the property exits.protected CIMProperty
getProperty
(CIMProperty pProperty) removeProperty
(String propertyName) Remove the specified property from the object.abstract void
setObjectPath
(CIMObjectPath pObjectPath) Specifies the CIMObjectPath for this CIM Object.void
setProperties
(Vector pProperties) Replace the current properties from the object and add the new set of properties defined by the argument.setProperty
(String pPropertyName, CIMValue pValue) Sets the value for the property, if the property already exists, otherwise create a new property with the specified name, and sets assigns the especified value to it.Methods inherited from class CIMQualifiableElement
addQualifier, getQualifier, getQualifiers, removeQualifier, setQualifiers
Methods inherited from class CIMElement
appendTab, assign, compareTo, equals, getName, lessThan, setName, vectorToMOFString, vectorToMOFString, vectorToMOFString
-
Field Details
-
iObjectPath
-
iAllProperties
-
-
Constructor Details
-
CIMObject
protected CIMObject() -
CIMObject
-
-
Method Details
-
getProperty
Gets the specified CIMProperty, if the property exists.- Parameters:
pPropertyName
- the name of the CIMProperty, with the following format "propName" or "propName.orignClass".- Returns:
- null if the property does not exists, otherwise returns the CIMProperty.
-
getProperty
Gets the CIMProperty from the current CIMElement, if the property exits.- Parameters:
pName
- a string which specifies the property name.pOriginClass
- a String which specifies the originClass.- Returns:
- null if the property exits, otherwise returns the CIMProperty.
-
getProperty
-
getProperties
Returns a list of CIMProperties for this CIMObject. For performance reasons the method returns a vector which provides direct access to the properties of the object. It is important to note that any modification to this vector may affect the consistency of the CIMMethod therefore, should be avoided. The application should decide when the vector needs to be cloned or not to preserve a consistent internal state.- Returns:
- a vector of CIMProperties for this CIMObject.
-
getAllProperties
Returns a list of CIMProperties for this CIMObject. For performance reasons the method returns the internal property vector of the object. It is important to note that any modification to this vector may affect the consistency of the CIMMethod therefore, should be avoided. The application should decide when the vector needs to be cloned or not to preserve a consistent internal state.- Returns:
- internal vector of CIMProperties for this CIMObject.
-
addProperty
Adds a property to the specified object. If the property already exits in the object, the property will not be modified. No exception is thrown.- Parameters:
pProperty
- property to be added
-
setProperties
Replace the current properties from the object and add the new set of properties defined by the argument. If any property is repeated, only the first instance of it will be added.- Parameters:
pProperties
-
-
setProperty
Sets the value for the property, if the property already exists, otherwise create a new property with the specified name, and sets assigns the especified value to it.- Parameters:
pPropertyName
- A string specifing the property name.pValue
- CIMValue that will be assigned to the property. It may be null.- Returns:
- if the property already exists, returns the modified property, otherwise returns the new property that was created.
- Throws:
IllegalArgumentException
- if the propertyName is null
-
removeProperty
Remove the specified property from the object. If the object does not contains the specified.- Parameters:
propertyName
- The property's name- Returns:
- The removed property
- Throws:
IllegalArgumentException
- if the property name is null
-
getKeys
Returns a list of key properties in this CIMObject.- Returns:
- a vector of cloned key properties.
-
setObjectPath
Specifies the CIMObjectPath for this CIM Object.- Parameters:
pObjectPath
- The object path
-