FileDocCategorySizeDatePackage
Person.javaAPI DocExample1537Fri Feb 23 08:12:28 GMT 2001None

Person

public class Person extends JPerson

Fields Summary
private Connection
conn
Constructors Summary
public Person()


    
  super();
 
public Person(Connection conn)

 
  super();
  setConnection(conn);
 
Methods Summary
public java.lang.IntegergetAge()

  Integer age = null;
  if (conn!=null) {
   Person thisPerson = this;
   CallableStatement cstmt = 
    conn.prepareCall("{ ? = call " + getSQLTypeName() + ".GET_AGE( ? ) }");
   cstmt.registerOutParameter(1, Types.NUMERIC);
   cstmt.setObject(2, thisPerson);
   cstmt.execute();
   age = new Integer(cstmt.getInt(1));
  }
  return age;
 
public java.lang.IntegergetAgeOn(java.sql.Timestamp date)

  Integer age = null;
  if (conn!=null) {
   Person thisPerson = this;
   CallableStatement cstmt = 
    conn.prepareCall("{ ? = call " + getSQLTypeName() + ".GET_AGE_ON( ?, ? ) }");
   cstmt.registerOutParameter(1, Types.NUMERIC);
   cstmt.setObject(2, thisPerson);
   cstmt.setTimestamp(3, date);
   cstmt.execute();
   age = new Integer(cstmt.getInt(1));
  }
  return age;
 
public java.math.BigDecimalgetId()

  BigDecimal id  = null;
  if (conn!=null) {
   Person thisPerson = this;
   CallableStatement cstmt = 
    conn.prepareCall("{ ? = call " + getSQLTypeName() + ".GET_ID( ) }");
   cstmt.registerOutParameter(1, Types.NUMERIC);
   cstmt.execute();
   id = cstmt.getBigDecimal(1);
  }
  return id;
 
public voidsetConnection(java.sql.Connection conn)

  this.conn = conn;