FileDocCategorySizeDatePackage
LocationTyp.javaAPI DocExample7863Fri Feb 23 14:19:06 GMT 2001None

LocationTyp

public class LocationTyp 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 LocationTyp
_LocationTypFactory
Constructors Summary
public LocationTyp()

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

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

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

    if (d == null) return null;
    LocationTyp o = new LocationTyp();
    o._struct = new MutableStruct((STRUCT) d, _sqlType, _factory);
    o._ctx = new _Ctx(((STRUCT) d).getConnection());
    return o;
  
public java.lang.StringgetCode()

 return (String) _struct.getAttribute(2); 
public java.sql.TimestampgetEndDate()

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

     
  
    return _LocationTypFactory;
  
public java.math.BigDecimalgetId()

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

//  ************************************************************
//  #sql [_ctx] __jPt_result = { VALUES(LOCATION_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, LocationTyp_SJProfileKeys.getKey(0), 0);
    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:125^64*/
    return __jPt_result;
  
public java.math.BigDecimalgetLocationId()

 return (java.math.BigDecimal) _struct.getAttribute(0); 
public java.lang.StringgetName()

 return (String) _struct.getAttribute(3); 
public java.math.BigDecimalgetParentLocationId()

 return (java.math.BigDecimal) _struct.getAttribute(1); 
public java.sql.TimestampgetStartDate()

 return (java.sql.Timestamp) _struct.getAttribute(4); 
public voidsetCode(java.lang.String code)

 _struct.setAttribute(2, code); 
public voidsetEndDate(java.sql.Timestamp endDate)

 _struct.setAttribute(5, endDate); 
public voidsetLocationId(java.math.BigDecimal locationId)

 _struct.setAttribute(0, locationId); 
public voidsetName(java.lang.String name)

 _struct.setAttribute(3, name); 
public voidsetParentLocationId(java.math.BigDecimal parentLocationId)

 _struct.setAttribute(1, parentLocationId); 
public voidsetStartDate(java.sql.Timestamp startDate)

 _struct.setAttribute(4, startDate); 
public oracle.sql.DatumtoDatum(oracle.jdbc.driver.OracleConnection c)

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