Class DBDrivenLoader

java.lang.Object
overit.geocall.sql.DBDrivenLoader
All Implemented Interfaces:
DBObjectMap

public class DBDrivenLoader extends Object implements DBObjectMap
The class extends a DBObjectMap and can be used in specifical cases to force load (for example to force, during the creation of a DBView, the instantiation of a Float, etc.)
  • Field Details

  • Constructor Details

    • DBDrivenLoader

      public DBDrivenLoader(int type)
      Creates the instance of DBDrivenLoader with the specific mapping type
      Parameters:
      type - Specific mapping type
  • Method Details

    • loadInstance

      public Object loadInstance(ResultSet rs, int field) throws SQLException
      Implements the transformations and the reading of a field in a Java object, starting from a ResultSet, the position and the informations of the ResultSetMetaData
      Specified by:
      loadInstance in interface DBObjectMap
      Parameters:
      rs - The ResultSet from which retrieve the ResultSetMetaData and the values used to create the Java object
      field - Number of the field to read from the ResultSet
      Returns:
      The created object instance, created according the choosen forcing type
      Throws:
      SQLException - The operation of reading from the database can raise an SQLException
    • saveInstance

      public void saveInstance(PreparedStatement ps, int field, Object o) throws SQLException
      Does nothing because the object does not have the ability to save
      Specified by:
      saveInstance in interface DBObjectMap
      Parameters:
      ps - Does nothing because the object does not have the ability to save
      field - Does nothing because the object does not have the ability to save
      o - Does nothing because the object does not have the ability to save
      Throws:
      SQLException - Does nothing because the object does not have the ability to save
    • saveInstance

      public void saveInstance(int field, Object o) throws SQLException
      Does nothing because the object does not have the ability to save
      Parameters:
      field - Does nothing because the object does not have the ability to save
      o - Does nothing because the object does not have the ability to save
      Throws:
      SQLException - Does nothing because the object does not have the ability to save