|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.cim.CIMInstance
public class CIMInstance
The CIMInstance
class represents an instance of a CIM class.
Constructor Summary | |
---|---|
CIMInstance(CIMObjectPath pName,
CIMProperty[] pProps)
Constructs a CIMInstance object using the name and
properties specified. |
Method Summary | |
---|---|
CIMInstance |
deriveInstance(CIMObjectPath pPath)
Returns a CIMInstance with the updated CIMObjectPath . |
CIMInstance |
deriveInstance(CIMProperty[] pPropA)
Returns a CIMInstance with the updated values for the
properties in pPropA . |
boolean |
equals(java.lang.Object o)
Indicates whether some other instance is "equal to" this one. |
CIMInstance |
filterProperties(boolean pLocalOnly,
boolean pIncludeClassOrigin,
java.lang.String[] pPropertyList)
This method returns a new CIMInstance with properties
filtered according to the input parameters. |
java.lang.String |
getClassName()
Get the name of the class that instantiates this CIM instance. |
CIMProperty[] |
getKeys()
Get the key properties for this instance. |
CIMObjectPath |
getObjectPath()
Returns the CIMObjectPath that represents this instance. |
CIMProperty[] |
getProperties()
Retrieve an array of the properties for this instance. |
CIMProperty |
getProperty(int pIndex)
Get a class property by index. |
CIMProperty |
getProperty(java.lang.String pName)
Returns the specified property. |
CIMProperty |
getProperty(java.lang.String pName,
java.lang.String pOriginClass)
Returns the specified CIMProperty . |
int |
getPropertyCount()
Get the number of properties defined in this CIMClass . |
java.lang.Object |
getPropertyValue(java.lang.String name)
Returns the value of a property of this CIM Instance. |
int |
hashCode()
Computes the hash code for this instance. |
java.lang.String |
toString()
Returns a String representation of the
CIMInstance . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CIMInstance(CIMObjectPath pName, CIMProperty[] pProps) throws java.lang.IllegalArgumentException
CIMInstance
object using the name and
properties specified.
pName
- -
The objectpath for this CIMInstance
pProps
- -
The properties for this CIMInstance
java.lang.IllegalArgumentException
-
name
is null
or
name.getObjectName()
is null
.
[OPTIONAL] - If the key property values do not match the
values in the property array. This is optional due to the
cost of the verification. Some implementations may leave it
up to the developer to ensure that the values match.
Method Detail |
---|
public CIMInstance deriveInstance(CIMObjectPath pPath)
CIMObjectPath
.
pPath
- The complete CIMObjectPath
for this instance.
CIMInstance
a new CIMInstance
with
the updated CIMObjectPath
.public CIMInstance deriveInstance(CIMProperty[] pPropA)
CIMInstance
with the updated values for the
properties in pPropA
. Any new properties are ignored.
pPropA
- -
The array of properties to update.
CIMInstance
with the updated properties.public boolean equals(java.lang.Object o)
CIMInstances
are considered equal if the names are the
same. This method does NOT compare each property value.
equals
in class java.lang.Object
o
- -
The object to compare.
true
if the specified path references the same
instance, otherwise false
.Object.equals(java.lang.Object)
public CIMInstance filterProperties(boolean pLocalOnly, boolean pIncludeClassOrigin, java.lang.String[] pPropertyList)
CIMInstance
with properties
filtered according to the input parameters. Inclusion of class origin and
qualifiers can also be controlled.
pLocalOnly
- -
Include only the properties values that were instantiated in
this instance.pIncludeClassOrigin
- -
classOrigins are only included if true
.pPropertyList
-
If the propertyList
input parameter is not
null
, the members of the array define one
or more Property names. The returned Instance does not include
elements for any Properties missing from this list.
If the propertyList
input parameter is an
empty array this signifies that no Properties are
included in each returned class.
If the propertyList
input parameter is null
this specifies that all Properties are included in each
returned class.
If the propertyList
contains duplicate elements
or invalid property names, they are ignored.
CIMInstance
matching the input filter.public java.lang.String getClassName()
public CIMProperty[] getKeys()
public CIMObjectPath getObjectPath()
CIMObjectPath
that represents this instance.
getObjectPath
in interface CIMNamedElementInterface
CIMObjectPath
that represents this instance.public CIMProperty[] getProperties()
public CIMProperty getProperty(int pIndex)
pIndex
- -
The index of the class property to retrieve.
CIMProperty
at the specified index.public CIMProperty getProperty(java.lang.String pName)
pName
- -
The text string for the name of the property.
null
if the property
does not exist.public CIMProperty getProperty(java.lang.String pName, java.lang.String pOriginClass)
CIMProperty
.
pName
- -
The string name of the property to get.pOriginClass
- -
(Optional) The string name of the class in which the property
was defined.
null
if the property does not exist, otherwise
returns the CIM property.public int getPropertyCount()
CIMClass
.
CIMClass
.public java.lang.Object getPropertyValue(java.lang.String name)
name
- -
The name of the property.
null
if the property does not exist.public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
String
representation of the
CIMInstance
. This method is intended to be used only for
debugging purposes, and the format of the returned string may vary
between implementations. The returned string may be empty but
may not be null
.
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |