Package org.sblim.wbem.cim
Class CIMInstance
- java.lang.Object
-
- org.sblim.wbem.cim.CIMElement
-
- org.sblim.wbem.cim.CIMQualifiableElement
-
- org.sblim.wbem.cim.CIMObject
-
- org.sblim.wbem.cim.CIMInstance
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
public class CIMInstance extends CIMObject implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
iAlias
-
Fields inherited from class org.sblim.wbem.cim.CIMObject
iAllProperties, iObjectPath
-
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 CIMInstance()
Constructs an object of a CIMInstance.CIMInstance(CIMObjectPath pObjectPath)
Constructs an object of a CIMInstance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
clone()
boolean
equals(java.lang.Object o)
java.lang.String
getAlias()
Returns the alias name for the instancejava.lang.String
getClassName()
Returns the class name of the instance.java.util.Vector
getKeyValuePairs()
Returns a list of key properties in this CIMInstance.java.lang.String
getName()
Deprecated.instances don't have names.CIMObjectPath
getObjectPath()
Gets the CIMObjectsPath for this CIMInstance.int
hashCode()
static void
main(java.lang.String[] args)
void
setAlias(java.lang.String pAliasName)
Specifies the alias for this instance.void
setClassName(java.lang.String pClassname)
Specifies the classname for this CIMInstance.void
setName(java.lang.String pName)
Specifies the name for this CIMInstance.void
setObjectPath(CIMObjectPath pObjectPath)
Specifies the CIMObjectPath for this CIMInstance.java.lang.String
toMOF()
Returns the MOF representation of this CIMInstance.java.lang.String
toString()
void
updateProperty(CIMProperty pProperty)
Updates the specified CIMProperty.void
updatePropertyValue(java.util.Vector pProperties)
Updates the properties of the current CIMInstance with the vector of CIMProperty objects.boolean
updatePropertyValue(CIMProperty pProperty)
Updates the CIMProperty value.-
Methods inherited from class org.sblim.wbem.cim.CIMObject
addProperty, getAllProperties, getKeys, getProperties, getProperty, getProperty, getProperty, removeProperty, setProperties, setProperty
-
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, lessThan, vectorToMOFString, vectorToMOFString, vectorToMOFString
-
-
-
-
Constructor Detail
-
CIMInstance
public CIMInstance()
Constructs an object of a CIMInstance.
-
CIMInstance
public CIMInstance(CIMObjectPath pObjectPath)
Constructs an object of a CIMInstance- Parameters:
pObjectPath
-
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classCIMElement
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getAlias
public java.lang.String getAlias()
Returns the alias name for the instance- Returns:
- string which represents the alias for the instance, or null if it hasn't beed specified
-
getClassName
public java.lang.String getClassName()
Returns the class name of the instance.- Returns:
- string which defines the class name for the instance.
-
getKeyValuePairs
public java.util.Vector getKeyValuePairs()
Returns a list of key properties in this CIMInstance.- Returns:
- a vector which provides direct access to the key properties of this instance.
-
getName
public java.lang.String getName()
Deprecated.instances don't have names. However current implementation provides access to the class name of the instance.Returns the class name of this instance.- Overrides:
getName
in classCIMElement
- Returns:
- The name
-
getObjectPath
public CIMObjectPath getObjectPath()
Gets the CIMObjectsPath for this CIMInstance. Note that this method returns the internal representation of the objectpath. It is upto the application to deside when the objectpath must be cloned to maintain consistency.- Returns:
- The CIM object path
-
setObjectPath
public void setObjectPath(CIMObjectPath pObjectPath)
Specifies the CIMObjectPath for this CIMInstance.- Specified by:
setObjectPath
in classCIMObject
- Parameters:
pObjectPath
- The object path- Throws:
java.lang.IllegalArgumentException
- if a null object path is specified
-
setAlias
public void setAlias(java.lang.String pAliasName)
Specifies the alias for this instance.- Parameters:
pAliasName
- The alias
-
setClassName
public void setClassName(java.lang.String pClassname)
Specifies the classname for this CIMInstance.- Parameters:
pClassname
- The class name- Throws:
java.lang.IllegalArgumentException
- for
-
setName
public void setName(java.lang.String pName)
Specifies the name for this CIMInstance.- Overrides:
setName
in classCIMElement
- Parameters:
pName
- The name
-
toMOF
public java.lang.String toMOF()
Returns the MOF representation of this CIMInstance.- Returns:
- The MOF representation
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
updateProperty
public void updateProperty(CIMProperty pProperty)
Updates the specified CIMProperty. If the property does not exists, add the new property to this CIMInstance, otherwise update the value, qualifiers, overridingProperty, and OriginClass attributes.- Parameters:
pProperty
- The property
-
updatePropertyValue
public boolean updatePropertyValue(CIMProperty pProperty)
Updates the CIMProperty value. Updates the CIMProperty's values which matches the specified CIMProperty name. If the CIMProperty does not exists, a new property will be added.- Parameters:
pProperty
- The property- Returns:
- true if the CIMProperty was succesfully updated, or false if a new property was added.
-
updatePropertyValue
public void updatePropertyValue(java.util.Vector pProperties)
Updates the properties of the current CIMInstance with the vector of CIMProperty objects.- Parameters:
pProperties
- A property vector
-
main
public static void main(java.lang.String[] args)
-
-