Package oracle.sql

Interface CustomDatumFactory

All Superinterfaces:
oracle.jdbc.internal.ObjectDataFactory

public interface CustomDatumFactory extends oracle.jdbc.internal.ObjectDataFactory
This interface complements CustomDatum. It is passed to getCustom methods to create specific kinds of objects.

Typical use is

  EmpFactory factory = new EmpFactory();
  OracleResultSet rs = ... ;
  Emp m = (Emp)rs.getCustom(n, factory);
  ...
  
  • Method Summary

    Modifier and Type
    Method
    Description
    create(Datum d, int sqlType)
    create an Object from SQL Type and return it.
  • Method Details

    • create

      CustomDatum create(Datum d, int sqlType) throws SQLException
      create an Object from SQL Type and return it. It is sometimes convenient to have the same class implement both CustomDatum and CustomDatumFactory, but normally they are distinct.

      Parameters:
      d - some SQL data that should be used to initialize an Object.
      sqlType - the SQL type that the
      Returns:
      an Object that embeds information from d.
      Throws:
      SQLException