bzcardorder.java

来自「oracle9i+j2ee开发aq oracle9i+j2ee开发aq or」· Java 代码 · 共 74 行

JAVA
74
字号
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.STRUCT;import oracle.jpub.runtime.MutableStruct;public class BzCardOrder implements CustomDatum, CustomDatumFactory{  public static final String _SQL_NAME = "BZ_ADM.BZCARDORDER_TYP";  public static final int _SQL_TYPECODE = OracleTypes.STRUCT;  protected MutableStruct _struct;  private static int[] _sqlType =  { 2,12,12,12 };  private static CustomDatumFactory[] _factory = new CustomDatumFactory[4];  private static final BzCardOrder _BzCardOrderFactory = new BzCardOrder();  public static CustomDatumFactory getFactory()  { return _BzCardOrderFactory; }  /* constructor */  protected BzCardOrder(boolean init)  { if(init) _struct = new MutableStruct(new Object[4], _sqlType, _factory); }  public BzCardOrder()  { this(true); }  /* CustomDatum interface */  public Datum toDatum(OracleConnection c) throws SQLException  {    return _struct.toDatum(c, _SQL_NAME);  }  /* CustomDatumFactory interface */  public CustomDatum create(Datum d, int sqlType) throws SQLException  { return create(null, d, sqlType); }  protected CustomDatum create(BzCardOrder o, Datum d, int sqlType) throws SQLException  {    if (d == null) return null;     if (o == null) o = new BzCardOrder(false);    o._struct = new MutableStruct((STRUCT) d, _sqlType, _factory);    return o;  }  /* accessor methods */  public java.math.BigDecimal getEmployeeId() throws SQLException  { return (java.math.BigDecimal) _struct.getAttribute(0); }  public void setEmployeeId(java.math.BigDecimal employeeId) throws SQLException  { _struct.setAttribute(0, employeeId); }  public String getFirstName() throws SQLException  { return (String) _struct.getAttribute(1); }  public void setFirstName(String firstName) throws SQLException  { _struct.setAttribute(1, firstName); }  public String getLastName() throws SQLException  { return (String) _struct.getAttribute(2); }  public void setLastName(String lastName) throws SQLException  { _struct.setAttribute(2, lastName); }  public String getOrdtyp() throws SQLException  { return (String) _struct.getAttribute(3); }  public void setOrdtyp(String ordtyp) throws SQLException  { _struct.setAttribute(3, ordtyp); }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?