Class CIMProperty

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

    public class CIMProperty
    extends CIMQualifiableElement
    implements java.lang.Cloneable, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • CIMProperty

        public CIMProperty()
        Creates an CIMProperty object.
      • CIMProperty

        public CIMProperty​(java.lang.String pName)
        Creates a CIMProperty object with the specified name.
        Parameters:
        pName - The property's name
      • CIMProperty

        public CIMProperty​(java.lang.String pName,
                           CIMValue pValue)
        Creates a CIMProperty with the specified name and CIMValue.
        Parameters:
        pName - The property's name
        pValue - The property's value
    • Method Detail

      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • clone

        public java.lang.Object clone​(boolean pIncludeQualifier,
                                      boolean pIncludeClassOrigin)
        Creates a replica of this object. Only if the includeQualifier arguments is true, the qualifiers of the CIMProperty will be copied. Only if includeClassOrigin is true, the classorigin information will be passed to the new object.
        Parameters:
        pIncludeQualifier - if true, the qualifiers of the CIMProperty will be copied
        pIncludeClassOrigin - if true, the classorigin information will be copied
        Returns:
        The replica
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class CIMElement
      • getOriginClass

        public java.lang.String getOriginClass()
        Returns the origin class for this object. The origin class specifies the CIMClass that introduces this property.
        Returns:
        The originating class
      • getOverridingProperty

        public java.lang.String getOverridingProperty()
        Returns the name of the property that this CIMProperty overrides. Returns null if this CIMProperty does not override any property.
        Returns:
        The overridden property
      • getSize

        public int getSize()
        Returns the size of this property.
        Returns:
        The size
      • getValue

        public CIMValue getValue()
        Returns the CIMValue associated with this CIMProperty.
        Returns:
        The value
      • getType

        public CIMDataType getType()
        Returns the CIMDataType associated with this CIMProperty.
        Returns:
        The type
      • isKey

        public boolean isKey()
        Determines if this CIMProperty contains the Key qualifier.
        Returns:
        true if the property is a key property
      • isPropagated

        public boolean isPropagated()
        Determines if this CIMProperty is propagated.
        Returns:
        true if the property is propagated
      • isReference

        public boolean isReference()
        Determines if this CIMProperty is a reference data type.
        Returns:
        true if the property is a reference
      • removeQualifier

        public boolean removeQualifier​(java.lang.String pName)
        Removes the qualifier with the specified name from this CIMProperty.
        Overrides:
        removeQualifier in class CIMQualifiableElement
        Parameters:
        pName - The qualifier's name
        Returns:
        true if the qualifier was successfully removed, otherwise returns false.
      • setKey

        public void setKey​(boolean pKey)
        Adds/removes the key qualifier
        Parameters:
        pKey - if true the key qualifier is added, otherwise it's removed
      • setOverridingProperty

        public void setOverridingProperty​(java.lang.String pNewOverridingProperty)
        Specifies the overriding property for this CIMProperty.
        Parameters:
        pNewOverridingProperty - The overriding property
      • setOriginClass

        public void setOriginClass​(java.lang.String pOriginClass)
        Specifies the origin class for this CIMProperty.
        Parameters:
        pOriginClass - The origin class
      • setPropagated

        public void setPropagated​(boolean pValue)
        Sets the propagated value to the specified value.
        Parameters:
        pValue - The propageted value
      • setSize

        public void setSize​(int pSize)
        Deprecated.
        the size of the property is bounded to the CIMDataType, which is unmutable. Applications are encourage to specify the CIMDataType with the appopiated size.
        Specifies the size of this property.
        Parameters:
        pSize - The size
      • setType

        public void setType​(CIMDataType pType)
        Sets the CIMDataType for this CIMProperty.
        Parameters:
        pType - The type
        Throws:
        java.lang.IllegalArgumentException - if the current property already has a CIMValue assigned to it and the new CIMDataType does not matches the value's data type.
      • setQualifier

        public CIMQualifier setQualifier​(CIMQualifier pQualifier)
                                  throws CIMException
        Updates the CIMQualifier value from the CIMProperty with the specified CIMQualifier.
        Parameters:
        pQualifier - The qualifier
        Returns:
        The new qualifier
        Throws:
        CIMException - if a CIMQualifier with the same name does not exists.
      • setValue

        public void setValue​(CIMValue pValue)
        Sets the value of this CIMProperty to the specified CIMProperty.
        Parameters:
        pValue - The value
        Throws:
        java.lang.IllegalArgumentException - if the specified CIMValues's type does not match current CIMDataType
      • toMOF

        public java.lang.String toMOF()
        Returns the MOF representation of this CIMObject.
        Returns:
        The MOF representation
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object