Skip to main content
Package com.gpudb

Class TypeObjectMap.ConvertingFieldHandler

java.lang.Object
com.gpudb.TypeObjectMap.ConvertingFieldHandler
All Implemented Interfaces:
Enclosing class:

public static final class TypeObjectMap.ConvertingFieldHandler extends Object implements TypeObjectMap.Accessor, TypeObjectMap.Mutator
A combined TypeObjectMap.Accessor and TypeObjectMap.Mutator that provides access to a specified field using reflection, converting the value to and from the data type of a specified GPUdb column.
  • Constructor Details

  • Method Details

    • get

      public Object get(Object o)
      Returns the value of the field specified in the constructor from the specified object, converting it to the data type of the GPUdb column specified in the constructor. The object must belong to the class containing the field.
      Specified by:
      Parameters:
      o - the object
      Returns:
      the converted value of the field
      Throws:
      GPUdbRuntimeException - if the value could not be retrieved
    • set

      public void set(Object o, Object value)
      Sets the value of the field specified in the constructor in the specified object after converting it from the data type of the GPUdb column specified in the constructor. The object must belong to the class containing the field.
      Specified by:
      set in interface TypeObjectMap.Mutator
      Parameters:
      o - the object
      value - the unconverted new value of the field
      Throws:
      GPUdbRuntimeException - if the value could not be set