org.sblim.cimclient.internal.cim
Class CIMQualifiedElementInterfaceImpl

java.lang.Object
  extended by org.sblim.cimclient.internal.cim.CIMQualifiedElementInterfaceImpl
All Implemented Interfaces:
java.io.Serializable, CIMQualifiedElementInterface

public class CIMQualifiedElementInterfaceImpl
extends java.lang.Object
implements CIMQualifiedElementInterface, java.io.Serializable

Class CIMQualifiedElementInterfaceImpl is responsible for implementing the functionality of javax.cim.CIMQualifiedElementInterface

See Also:
Serialized Form

Constructor Summary
CIMQualifiedElementInterfaceImpl(CIMQualifier<?>[] pQualifiers)
          Ctor.
CIMQualifiedElementInterfaceImpl(CIMQualifier<?>[] pQualifiers, boolean pIsKeyed)
          Ctor.
CIMQualifiedElementInterfaceImpl(CIMQualifier<?>[] pQualifiers, boolean pIsKeyed, boolean pKeepEmbObj)
          Ctor.
CIMQualifiedElementInterfaceImpl(CIMQualifier<?>[] pQualifiers, boolean pIsKeyed, boolean pKeepEmbObj, boolean pIsAssociation)
          Ctor.
 
Method Summary
 boolean equals(java.lang.Object pObj)
           
 CIMQualifier<?> getQualifier(int pIndex)
          Get a qualifier by index.
 CIMQualifier<?> getQualifier(java.lang.String pName)
          Gets a qualifier by name.
 int getQualifierCount()
          Get the number of qualifiers defined for this CIM Element.
 CIMQualifier<?>[] getQualifiers()
          Returns the list of qualifiers for this class.
 CIMQualifier<?>[] getQualifiers(boolean pLocalOnly)
          getQualifiers - helps filtering based on the propagated flag.
 java.lang.Object getQualifierValue(java.lang.String pName)
          Gets a qualifier value by name.
 boolean hasQualifier(java.lang.String pName)
          Checks whether the specified qualifier is one of the qualifiers in this CIM element.
 boolean hasQualifierValue(java.lang.String pName, java.lang.Object pValue)
          Checks whether the specified qualifier is one of the qualifiers defined for this property with the specified value.
 boolean isEmbeddedObject()
          Returns true if the "EmbeddedObject" qualifier with true value presents.
 boolean isKeyed()
          Returns true if the "key" Qualifier with true value presents.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CIMQualifiedElementInterfaceImpl

public CIMQualifiedElementInterfaceImpl(CIMQualifier<?>[] pQualifiers)
Ctor. This constructor doesn't modify the passed qualifier list.

Parameters:
pQualifiers -

CIMQualifiedElementInterfaceImpl

public CIMQualifiedElementInterfaceImpl(CIMQualifier<?>[] pQualifiers,
                                        boolean pIsKeyed)
Ctor. This constructor modifies the qualifier list according to the pIsKeyed flag.

Parameters:
pQualifiers -
pIsKeyed -

CIMQualifiedElementInterfaceImpl

public CIMQualifiedElementInterfaceImpl(CIMQualifier<?>[] pQualifiers,
                                        boolean pIsKeyed,
                                        boolean pKeepEmbObj)
Ctor. This constructor is able to not remove the EmbeddedObject qualifier. It is useful for the XML parser to parse EmbeddedObject qualified elements without values.

Parameters:
pQualifiers -
pIsKeyed -
pKeepEmbObj -

CIMQualifiedElementInterfaceImpl

public CIMQualifiedElementInterfaceImpl(CIMQualifier<?>[] pQualifiers,
                                        boolean pIsKeyed,
                                        boolean pKeepEmbObj,
                                        boolean pIsAssociation)
Ctor. This constructor is able to not remove the EmbeddedObject qualifier. It is useful for the XML parser to parse EmbeddedObject qualified elements without values. It also adds or removes the Association qualifier depending on the value of pIsAssociation.

Parameters:
pQualifiers -
pIsKeyed -
pKeepEmbObj -
pIsAssociation -
Method Detail

equals

public boolean equals(java.lang.Object pObj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

isKeyed

public boolean isKeyed()
Returns true if the "key" Qualifier with true value presents.

Returns:
true/false

isEmbeddedObject

public boolean isEmbeddedObject()
Returns true if the "EmbeddedObject" qualifier with true value presents.

Returns:
true/false

getQualifier

public CIMQualifier<?> getQualifier(int pIndex)
Description copied from interface: CIMQualifiedElementInterface
Get a qualifier by index.

Specified by:
getQualifier in interface CIMQualifiedElementInterface
Parameters:
pIndex - - The index of the qualifier.
Returns:
The Qualifier at index pIndex.
See Also:
CIMQualifiedElementInterface.getQualifier(int)

getQualifier

public CIMQualifier<?> getQualifier(java.lang.String pName)
Description copied from interface: CIMQualifiedElementInterface
Gets a qualifier by name.

Specified by:
getQualifier in interface CIMQualifiedElementInterface
Parameters:
pName - - The name of the qualifier to get.
Returns:
null if the qualifier does not exist, otherwise returns the reference to the qualifier.
See Also:
CIMQualifiedElementInterface.getQualifier(java.lang.String)

getQualifierCount

public int getQualifierCount()
Description copied from interface: CIMQualifiedElementInterface
Get the number of qualifiers defined for this CIM Element.

Specified by:
getQualifierCount in interface CIMQualifiedElementInterface
Returns:
The number of qualifiers.
See Also:
CIMQualifiedElementInterface.getQualifierCount()

getQualifierValue

public java.lang.Object getQualifierValue(java.lang.String pName)
Description copied from interface: CIMQualifiedElementInterface
Gets a qualifier value by name.

Specified by:
getQualifierValue in interface CIMQualifiedElementInterface
Parameters:
pName - - The name of the qualifier to get.
Returns:
null if the qualifier does not exist or value is null, otherwise returns the reference to the qualifier.
See Also:
CIMQualifiedElementInterface.getQualifierValue(java.lang.String)

getQualifiers

public CIMQualifier<?>[] getQualifiers()
Description copied from interface: CIMQualifiedElementInterface
Returns the list of qualifiers for this class.

Specified by:
getQualifiers in interface CIMQualifiedElementInterface
Returns:
Qualifiers for this class.
See Also:
CIMQualifiedElementInterface.getQualifiers()

getQualifiers

public CIMQualifier<?>[] getQualifiers(boolean pLocalOnly)
getQualifiers - helps filtering based on the propagated flag.

Parameters:
pLocalOnly -
Returns:
CIMQualifier[]

hasQualifier

public boolean hasQualifier(java.lang.String pName)
Description copied from interface: CIMQualifiedElementInterface
Checks whether the specified qualifier is one of the qualifiers in this CIM element.

Specified by:
hasQualifier in interface CIMQualifiedElementInterface
Parameters:
pName - - the name of the qualifier
Returns:
true if the qualifier exists in this CIM element, otherwise false.
See Also:
CIMQualifiedElementInterface.hasQualifier(java.lang.String)

hasQualifierValue

public boolean hasQualifierValue(java.lang.String pName,
                                 java.lang.Object pValue)
Description copied from interface: CIMQualifiedElementInterface
Checks whether the specified qualifier is one of the qualifiers defined for this property with the specified value. This method will return false if the qualifier is not applied or if the value does not match.

Specified by:
hasQualifierValue in interface CIMQualifiedElementInterface
Parameters:
pName - - the name of the qualifier
pValue - - the value to be tested
Returns:
true if the qualifier exists and has the value, otherwise false.
See Also:
CIMQualifiedElementInterface.hasQualifierValue(java.lang.String, java.lang.Object)


Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.