Class CIMObject

All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
CIMClass, CIMInstance

public abstract class CIMObject extends CIMQualifiableElement
See Also:
  • Field Details

    • iObjectPath

      protected CIMObjectPath iObjectPath
    • iAllProperties

      protected Vector iAllProperties
  • Constructor Details

    • CIMObject

      protected CIMObject()
    • CIMObject

      protected CIMObject(String pName)
  • Method Details

    • getProperty

      public CIMProperty getProperty(String pPropertyName)
      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

      public CIMProperty getProperty(String pName, String pOriginClass)
      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

      protected CIMProperty getProperty(CIMProperty pProperty)
    • getProperties

      public Vector 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

      public Vector 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

      public void addProperty(CIMProperty pProperty)
      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

      public void setProperties(Vector pProperties)
      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

      public CIMProperty 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.
      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

      public CIMProperty removeProperty(String propertyName)
      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

      public Vector getKeys()
      Returns a list of key properties in this CIMObject.
      Returns:
      a vector of cloned key properties.
    • setObjectPath

      public abstract void setObjectPath(CIMObjectPath pObjectPath)
      Specifies the CIMObjectPath for this CIM Object.
      Parameters:
      pObjectPath - The object path