import java.sql.SQLException;
import oracle.jdbc.driver.OracleConnection;
import oracle.jdbc.driver.OracleTypes;
import java.sql.SQLData;
import java.sql.SQLInput;
import java.sql.SQLOutput;
import oracle.sql.STRUCT;
import oracle.jpub.runtime.MutableStruct;
public class JPerson implements SQLData
{
public static final String _SQL_NAME = "SCOTT.PERSON_TYP";
public static final int _SQL_TYPECODE = OracleTypes.STRUCT;
private java.math.BigDecimal m_personId;
private String m_lastName;
private String m_firstName;
private String m_middleName;
private java.sql.Timestamp m_birthDate;
private String m_mothersMaidenName;
private java.sql.Array m_identifiers;
/* constructor */
public JPerson()
{
}
public void readSQL(SQLInput stream, String type)
throws SQLException
{
setPersonId(stream.readBigDecimal());
setLastName(stream.readString());
setFirstName(stream.readString());
setMiddleName(stream.readString());
setBirthDate(stream.readTimestamp());
setMothersMaidenName(stream.readString());
setIdentifiers(stream.readArray());
}
public void writeSQL(SQLOutput stream)
throws SQLException
{
stream.writeBigDecimal(getPersonId());
stream.writeString(getLastName());
stream.writeString(getFirstName());
stream.writeString(getMiddleName());
stream.writeTimestamp(getBirthDate());
stream.writeString(getMothersMaidenName());
stream.writeArray(getIdentifiers());
}
public String getSQLTypeName() throws SQLException
{
return _SQL_NAME;
}
/* accessor methods */
public java.math.BigDecimal getPersonId()
{ return m_personId; }
public void setPersonId(java.math.BigDecimal personId)
{ m_personId = personId; }
public String getLastName()
{ return m_lastName; }
public void setLastName(String lastName)
{ m_lastName = lastName; }
public String getFirstName()
{ return m_firstName; }
public void setFirstName(String firstName)
{ m_firstName = firstName; }
public String getMiddleName()
{ return m_middleName; }
public void setMiddleName(String middleName)
{ m_middleName = middleName; }
public java.sql.Timestamp getBirthDate()
{ return m_birthDate; }
public void setBirthDate(java.sql.Timestamp birthDate)
{ m_birthDate = birthDate; }
public String getMothersMaidenName()
{ return m_mothersMaidenName; }
public void setMothersMaidenName(String mothersMaidenName)
{ m_mothersMaidenName = mothersMaidenName; }
public java.sql.Array getIdentifiers()
{ return m_identifiers; }
public void setIdentifiers(java.sql.Array identifiers)
{ m_identifiers = identifiers; }
}
|