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