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 PersonIdentifierTypeTypRef implements CustomDatum, CustomDatumFactory
{
public static final String _SQL_BASETYPE = "SCOTT.PERSON_IDENTIFIER_TYPE_TYP";
public static final int _SQL_TYPECODE = OracleTypes.REF;
REF _ref;
static final PersonIdentifierTypeTypRef _PersonIdentifierTypeTypRefFactory = new PersonIdentifierTypeTypRef();
public static CustomDatumFactory getFactory()
{
return _PersonIdentifierTypeTypRefFactory;
}
/* constructor */
public PersonIdentifierTypeTypRef()
{
}
/* 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;
PersonIdentifierTypeTypRef r = new PersonIdentifierTypeTypRef();
r._ref = (REF) d;
return r;
}
public PersonIdentifierTypeTyp getValue() throws SQLException
{
return (PersonIdentifierTypeTyp) PersonIdentifierTypeTyp.getFactory().create(
_ref.getSTRUCT(), OracleTypes.REF);
}
public void setValue(PersonIdentifierTypeTyp c) throws SQLException
{
_ref.setValue((STRUCT) c.toDatum(_ref.getConnection()));
}
}
|