FileDocCategorySizeDatePackage
PersonTyp.javaAPI DocExample10967Fri Feb 23 14:19:16 GMT 2001None

PersonTyp

public class PersonTyp extends Object implements oracle.sql.CustomDatumFactory, oracle.sql.CustomDatum

Fields Summary
public static final String
_SQL_NAME
public static final int
_SQL_TYPECODE
_Ctx
_ctx
oracle.jpub.runtime.MutableStruct
_struct
static int[]
_sqlType
static oracle.sql.CustomDatumFactory[]
_factory
static final PersonTyp
_PersonTypFactory
Constructors Summary
public PersonTyp()

    _struct = new MutableStruct(new Object[7], _sqlType, _factory);
    try
    {
      _ctx = new _Ctx(DefaultContext.getDefaultContext());
    }
    catch (Exception e)
    {
      _ctx = null;
    }
  
public PersonTyp(sqlj.runtime.ConnectionContext c)

    _struct = new MutableStruct(new Object[7], _sqlType, _factory);
    _ctx = new _Ctx(c == null ? DefaultContext.getDefaultContext()
                              : c);
  
public PersonTyp(Connection c)

    _struct = new MutableStruct(new Object[7], _sqlType, _factory);
    _ctx = new _Ctx(c);
  
Methods Summary
public oracle.sql.CustomDatumcreate(oracle.sql.Datum d, int sqlType)

    if (d == null) return null;
    PersonTyp o = new PersonTyp();
    o._struct = new MutableStruct((STRUCT) d, _sqlType, _factory);
    o._ctx = new _Ctx(((STRUCT) d).getConnection());
    return o;
  
public java.math.BigDecimalgetAge()

    PersonTyp __jPt_temp = this;
    java.math.BigDecimal __jPt_result;
    /*@lineinfo:generated-code*//*@lineinfo:138^5*/

//  ************************************************************
//  #sql [_ctx] { BEGIN
//        :__jPt_result := :__jPt_temp.GET_AGE();
//        END;
//       };
//  ************************************************************

{
  sqlj.runtime.ConnectionContext __sJT_connCtx = _ctx;
  if (__sJT_connCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_CONN_CTX();
  sqlj.runtime.ExecutionContext __sJT_execCtx = __sJT_connCtx.getExecutionContext();
  if (__sJT_execCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_EXEC_CTX();
  PersonTyp __sJT_2 = __jPt_temp;
  synchronized (__sJT_execCtx) {
    sqlj.runtime.profile.RTStatement __sJT_stmt = __sJT_execCtx.registerStatement(__sJT_connCtx, PersonTyp_SJProfileKeys.getKey(0), 0);
    try 
    {
      __sJT_stmt.setObject(2, __sJT_2);
      __sJT_execCtx.executeUpdate();
      __jPt_result = __sJT_stmt.getBigDecimal(1);
    }
    finally 
    {
      __sJT_execCtx.releaseStatement();
    }
  }
}


//  ************************************************************

/*@lineinfo:user-code*//*@lineinfo:142^5*/
    return __jPt_result;
  
public java.math.BigDecimalgetAgeOn(java.sql.Timestamp aidDate)

    PersonTyp __jPt_temp = this;
    java.math.BigDecimal __jPt_result;
    /*@lineinfo:generated-code*//*@lineinfo:152^5*/

//  ************************************************************
//  #sql [_ctx] { BEGIN
//        :__jPt_result := :__jPt_temp.GET_AGE_ON(
//        :aidDate);
//        END;
//       };
//  ************************************************************

{
  sqlj.runtime.ConnectionContext __sJT_connCtx = _ctx;
  if (__sJT_connCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_CONN_CTX();
  sqlj.runtime.ExecutionContext __sJT_execCtx = __sJT_connCtx.getExecutionContext();
  if (__sJT_execCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_EXEC_CTX();
  PersonTyp __sJT_2 = __jPt_temp;
  java.sql.Timestamp __sJT_3 = aidDate;
  synchronized (__sJT_execCtx) {
    sqlj.runtime.profile.RTStatement __sJT_stmt = __sJT_execCtx.registerStatement(__sJT_connCtx, PersonTyp_SJProfileKeys.getKey(0), 1);
    try 
    {
      __sJT_stmt.setObject(2, __sJT_2);
      __sJT_stmt.setTimestamp(3, __sJT_3);
      __sJT_execCtx.executeUpdate();
      __jPt_result = __sJT_stmt.getBigDecimal(1);
    }
    finally 
    {
      __sJT_execCtx.releaseStatement();
    }
  }
}


//  ************************************************************

/*@lineinfo:user-code*//*@lineinfo:157^5*/
    return __jPt_result;
  
public java.sql.TimestampgetBirthDate()

 return (java.sql.Timestamp) _struct.getAttribute(4); 
public static oracle.sql.CustomDatumFactorygetFactory()

     
  
    return _PersonTypFactory;
  
public java.lang.StringgetFirstName()

 return (String) _struct.getAttribute(2); 
public java.math.BigDecimalgetId()

    java.math.BigDecimal __jPt_result;
    /*@lineinfo:generated-code*//*@lineinfo:165^5*/

//  ************************************************************
//  #sql [_ctx] __jPt_result = { VALUES(PERSON_TYP.GET_ID())  };
//  ************************************************************

{
  sqlj.runtime.ConnectionContext __sJT_connCtx = _ctx;
  if (__sJT_connCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_CONN_CTX();
  sqlj.runtime.ExecutionContext __sJT_execCtx = __sJT_connCtx.getExecutionContext();
  if (__sJT_execCtx == null) sqlj.runtime.error.RuntimeRefErrors.raise_NULL_EXEC_CTX();
  synchronized (__sJT_execCtx) {
    sqlj.runtime.profile.RTStatement __sJT_stmt = __sJT_execCtx.registerStatement(__sJT_connCtx, PersonTyp_SJProfileKeys.getKey(0), 2);
    try 
    {
      __sJT_execCtx.executeUpdate();
      java.math.BigDecimal __sJT_result;
      __sJT_result = __sJT_stmt.getBigDecimal(1);
      __jPt_result = __sJT_result;
    }
    finally 
    {
      __sJT_execCtx.releaseStatement();
    }
  }
}


//  ************************************************************

/*@lineinfo:user-code*//*@lineinfo:165^62*/
    return __jPt_result;
  
public PersonIdentifierTabgetIdentifiers()

 return (PersonIdentifierTab) _struct.getAttribute(6); 
public java.lang.StringgetLastName()

 return (String) _struct.getAttribute(1); 
public java.lang.StringgetMiddleName()

 return (String) _struct.getAttribute(3); 
public java.lang.StringgetMothersMaidenName()

 return (String) _struct.getAttribute(5); 
public java.math.BigDecimalgetPersonId()

 return (java.math.BigDecimal) _struct.getAttribute(0); 
public voidsetBirthDate(java.sql.Timestamp birthDate)

 _struct.setAttribute(4, birthDate); 
public voidsetFirstName(java.lang.String firstName)

 _struct.setAttribute(2, firstName); 
public voidsetIdentifiers(PersonIdentifierTab identifiers)

 _struct.setAttribute(6, identifiers); 
public voidsetLastName(java.lang.String lastName)

 _struct.setAttribute(1, lastName); 
public voidsetMiddleName(java.lang.String middleName)

 _struct.setAttribute(3, middleName); 
public voidsetMothersMaidenName(java.lang.String mothersMaidenName)

 _struct.setAttribute(5, mothersMaidenName); 
public voidsetPersonId(java.math.BigDecimal personId)

 _struct.setAttribute(0, personId); 
public oracle.sql.DatumtoDatum(oracle.jdbc.driver.OracleConnection c)

    _ctx = new _Ctx(c);
    return _struct.toDatum(c, _SQL_NAME);