com.ibm.commerce.payments.plugin

Class NameValueObject

  • java.lang.Object
    • com.ibm.commerce.payments.plugin.NameValueObject
  • All Implemented Interfaces:
    java.io.Serializable


    public class NameValueObject
    extends java.lang.Object
    implements java.io.Serializable

    This class represents a data attribute with a name, a value, and an encryption flag.

    NameValueObject is typically used to store protocol-type information.

    The type of an attribute can be one of the following:

    • Boolean
    • Integer
    • Long
    • BigDecimal
    • String
    • StringBuffer (for binary data)

    When the encryption flag is set, the attribute value will be encrypted while stored in a persistent media (database).

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static short TYPE_BIG_DECIMAL
      Used to indicate that the attribute value is a BigDecimal.
      static short TYPE_BINARY
      Used to indicate that the attribute value is binary (StringBuffer).
      static short TYPE_BOOLEAN
      Used to indicate that the attribute value is a Boolean.
      static short TYPE_INTEGER
      Used to indicate that the attribute value is an Integer.
      static short TYPE_LONG
      Used to indicate that the attribute value is a Long.
      static short TYPE_STRING
      Used to indicate that the attribute value is a String.
    • Constructor Summary

      Constructors 
      Constructor and Description
      NameValueObject()
      This method is the constructor of the name value container.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      short getType()
      This method gets the type of the object.
      java.io.Serializable getValue()
      This method gets the object value.
      boolean isEncryptionRequired()
      This method checks if the value needs to be encrypted.
      void setEncryptionRequired(boolean encryptionRequiredLocal)
      This method sets the encryption flag on the name-value pair.
      void setType(short typeLocal)
      This method sets the type of the name-value pair.
      void setValue(java.io.Serializable valueLocal)
      This method sets the value of the object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TYPE_BOOLEAN

        public static final short TYPE_BOOLEAN
        Used to indicate that the attribute value is a Boolean.
        See Also:
        Constant Field Values
      • TYPE_INTEGER

        public static final short TYPE_INTEGER
        Used to indicate that the attribute value is an Integer.
        See Also:
        Constant Field Values
      • TYPE_LONG

        public static final short TYPE_LONG
        Used to indicate that the attribute value is a Long.
        See Also:
        Constant Field Values
      • TYPE_BIG_DECIMAL

        public static final short TYPE_BIG_DECIMAL
        Used to indicate that the attribute value is a BigDecimal.
        See Also:
        Constant Field Values
      • TYPE_STRING

        public static final short TYPE_STRING
        Used to indicate that the attribute value is a String.
        See Also:
        Constant Field Values
      • TYPE_BINARY

        public static final short TYPE_BINARY
        Used to indicate that the attribute value is binary (StringBuffer).
        See Also:
        Constant Field Values
    • Constructor Detail

      • NameValueObject

        public NameValueObject()

        This method is the constructor of the name value container.

    • Method Detail

      • setEncryptionRequired

        public void setEncryptionRequired(boolean encryptionRequiredLocal)

        This method sets the encryption flag on the name-value pair.

        Parameters:
        encryptionRequiredLocal - If the value needs to be encrypted
      • isEncryptionRequired

        public boolean isEncryptionRequired()

        This method checks if the value needs to be encrypted.

        Returns:
        If the value needs to be encrypted.
      • setType

        public void setType(short typeLocal)

        This method sets the type of the name-value pair.

        Parameters:
        typeLocal - The type of the object.
      • getValue

        public java.io.Serializable getValue()

        This method gets the object value.

        Returns:
        The object value.