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.ARRAY;
import oracle.sql.ArrayDescriptor;
import oracle.jpub.runtime.MutableArray;
public class PersonIdentifierTab implements CustomDatum, CustomDatumFactory
{
public static final String _SQL_NAME = "SCOTT.PERSON_IDENTIFIER_TAB";
public static final int _SQL_TYPECODE = OracleTypes.ARRAY;
MutableArray _array;
static final PersonIdentifierTab _PersonIdentifierTabFactory = new PersonIdentifierTab();
public static CustomDatumFactory getFactory()
{
return _PersonIdentifierTabFactory;
}
/* constructors */
public PersonIdentifierTab()
{
this((PersonIdentifierTyp[])null);
}
public PersonIdentifierTab(PersonIdentifierTyp[] a)
{
_array = new MutableArray(a, 2002, PersonIdentifierTyp.getFactory());
}
/* CustomDatum interface */
public Datum toDatum(OracleConnection c) throws SQLException
{
return _array.toDatum(c, _SQL_NAME);
}
/* CustomDatumFactory interface */
public CustomDatum create(Datum d, int sqlType) throws SQLException
{
if (d == null) return null;
PersonIdentifierTab a = new PersonIdentifierTab();
a._array = new MutableArray((ARRAY) d, 2002, PersonIdentifierTyp.getFactory());
return a;
}
public int length() throws SQLException
{
return _array.length();
}
public int getBaseType() throws SQLException
{
return _array.getBaseType();
}
public String getBaseTypeName() throws SQLException
{
return _array.getBaseTypeName();
}
public ArrayDescriptor getDescriptor() throws SQLException
{
return _array.getDescriptor();
}
/* array accessor methods */
public PersonIdentifierTyp[] getArray() throws SQLException
{
return (PersonIdentifierTyp[]) _array.getObjectArray(
new PersonIdentifierTyp[_array.length()]);
}
public void setArray(PersonIdentifierTyp[] a) throws SQLException
{
_array.setObjectArray(a);
}
public PersonIdentifierTyp[] getArray(long index, int count) throws SQLException
{
return (PersonIdentifierTyp[]) _array.getObjectArray(index,
new PersonIdentifierTyp[_array.sliceLength(index, count)]);
}
public void setArray(PersonIdentifierTyp[] a, long index) throws SQLException
{
_array.setObjectArray(a, index);
}
public PersonIdentifierTyp getElement(long index) throws SQLException
{
return (PersonIdentifierTyp) _array.getObjectElement(index);
}
public void setElement(PersonIdentifierTyp a, long index) throws SQLException
{
_array.setObjectElement(a, index);
}
}
|