import java.sql.SQLException;
import oracle.jdbc.driver.OracleConnection;
import oracle.jdbc.driver.OracleTypes;
import oracle.sql.CustomDatum;
import oracle.sql.CustomDatumFactory;
import oracle.sql.Datum;
import oracle.sql.REF;
import oracle.sql.STRUCT;
public class PersonIdentifierTypRef implements CustomDatum, CustomDatumFactory
{
public static final String _SQL_BASETYPE = "SCOTT.PERSON_IDENTIFIER_TYP";
public static final int _SQL_TYPECODE = OracleTypes.REF;
REF _ref;
static final PersonIdentifierTypRef _PersonIdentifierTypRefFactory = new PersonIdentifierTypRef();
public static CustomDatumFactory getFactory()
{
return _PersonIdentifierTypRefFactory;
}
/* constructor */
public PersonIdentifierTypRef()
{
}
/* CustomDatum interface */
public Datum toDatum(OracleConnection c) throws SQLException
{
return _ref;
}
/* CustomDatumFactory interface */
public CustomDatum create(Datum d, int sqlType) throws SQLException
{
if (d == null) return null;
PersonIdentifierTypRef r = new PersonIdentifierTypRef();
r._ref = (REF) d;
return r;
}
public PersonIdentifierTyp getValue() throws SQLException
{
return (PersonIdentifierTyp) PersonIdentifierTyp.getFactory().create(
_ref.getSTRUCT(), OracleTypes.REF);
}
public void setValue(PersonIdentifierTyp c) throws SQLException
{
_ref.setValue((STRUCT) c.toDatum(_ref.getConnection()));
}
}
|