com.ibm.commerce.edp.converters

Class NumberToBooleanConverter

  • java.lang.Object
    • com.ibm.vap.converters.VapAbstractConverter
      • com.ibm.commerce.edp.converters.NumberToBooleanConverter


  • public class NumberToBooleanConverter
    extends com.ibm.vap.converters.VapAbstractConverter
    This class is a utility class that converter the number to a Boolean object.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object dataFrom(java.lang.Object anObject)
      This method answers the appropriate object that is to go TO a datastore field.
      static java.lang.String getTargetClassName()
      This method returns the target class name.
      java.lang.Object objectFrom(java.lang.Object aField)
      This method answers the appropriate object from a field object FROM a datastore.
      static void reset()
      This method sets the singleton variable to null.
      static NumberToBooleanConverter singleton()
      This is a Singleton method to return instance of the converter.
      • Methods inherited from class com.ibm.vap.converters.VapAbstractConverter

        getNumericDatatypes, getStringDatatypes, name, stringDatatypes, unknownClass, unknownType
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • NumberToBooleanConverter

        public NumberToBooleanConverter()
    • Method Detail

      • getTargetClassName

        public static java.lang.String getTargetClassName()
        This method returns the target class name. This should return the name of the class for the instance instanciated as a result of the objectFrom: message sent to the converter.
        Returns:
        name String value of Target class name
      • dataFrom

        public java.lang.Object dataFrom(java.lang.Object anObject)
        This method answers the appropriate object that is to go TO a datastore field. Note that this is an object to object conversion. The conversion to persistent format (strings in the case of SQL) occurs elsewhere. The default is to do nothing.
        Overrides:
        dataFrom in class com.ibm.vap.converters.VapAbstractConverter
        Parameters:
        An - object of type Boolean
        Returns:
        An object of Integer zero for false, one for true
      • objectFrom

        public java.lang.Object objectFrom(java.lang.Object aField)
        This method answers the appropriate object from a field object FROM a datastore. Note that this is an object to object conversion. The conversion to persistent format (strings in the case of SQL) occurs elsewhere. The default is to do nothing.
        Overrides:
        objectFrom in class com.ibm.vap.converters.VapAbstractConverter
        Parameters:
        An - object of type Number
        Returns:
        An object of Boolean type
      • reset

        public static void reset()
        This method sets the singleton variable to null. This is required by each subclass.
      • singleton

        public static NumberToBooleanConverter singleton()
        This is a Singleton method to return instance of the converter.
        Returns:
        An object of NumberToBooleanConverter, the only singleton object