⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 contact_gnsg8g__weblogic_cmp_rdbms.java

📁 Java源码 Java源码
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
/**
 * This code was automatically generated at 3:18:57 PM on Sep 3, 2003
 * by weblogic.ejb20.cmp11.rdbms.codegen.RDBMSCodeGenerator -- do not edit.
 *
 * @version WebLogic Server 8.1  Fri Jun 20 23:06:40 PDT 2003 271009 
 * @author Copyright (c) 2003 by BEA Systems, Inc. All Rights Reserved.
 */

package cmp1bean;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.ObjectOutputStream;

import java.sql.SQLException;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import javax.ejb.EntityContext;
import javax.ejb.ObjectNotFoundException;
import javax.ejb.NoSuchEntityException;
import javax.ejb.EJBException;

import weblogic.ejb20.persistence.RSInfoImpl;
import weblogic.ejb20.persistence.spi.PersistenceManager;
import weblogic.ejb20.persistence.spi.PersistenceRuntimeException;
import weblogic.ejb20.persistence.spi.CMPBean;
import weblogic.ejb20.persistence.spi.CMPBeanManager;
import weblogic.ejb20.persistence.spi.RSInfo;

import weblogic.ejb20.cmp.rdbms.RDBMSObjectInputStream;

import weblogic.ejb20.cmp11.rdbms.PersistenceManagerImpl;
import weblogic.ejb20.cmp11.rdbms.RDBMSUtils;
import weblogic.ejb20.dd.DDConstants;

import weblogic.utils.Debug;
import weblogic.ejb20.EJBLogger;
import weblogic.logging.Loggable;

public final class Contact_gnsg8g__WebLogic_CMP_RDBMS extends cmp1bean.ContactBean 
  implements CMPBean, Contact_gnsg8g_Intf
{
  private static String EOL = System.getProperty("line.separator");
  private static boolean __WL_updateable = true;

  // Snapshot Code to implement Tuned Writes
  private boolean __WL_snapshots_enabled = true;

  private boolean __WL_modified[] = new boolean [2];

  // Snapshot variables
  private java.lang.String __WL_snap_first;
private java.lang.String __WL_snap_email;


  // This method is called by ejbLoad, ejbPassivate, and ejbRemove
  // to initialize the persistent state of the bean and its associated
  // variables.
  public void __WL_initialize() 
  {
    __WL_initialize(true);
  }

  public void __WL_initialize(boolean __WL_initSnapshotVars)
  {
    // initialize persistent state.
        last = null;
    first = null;
    email = null;

  }

  private void __WL_print_byte_array(byte [] b) {

    if (b == null) {
      weblogic.utils.Debug.say("** NULL **");
    } else {
      weblogic.utils.Debug.say("Length: "+b.length);
      for (int i=0; i<b.length; i++) {
        weblogic.utils.Debug.say("** b["+i+"] = "+b[i]);
      }
    }

  }

  // Clear snapshot variables on passivation to free any associated
  // memory

  private void __WL_clear_snapshot_variables() {

    		__WL_snap_first = null;
		__WL_snap_email = null;


  }

  private void __WL_take_snapshot() {

    for (int i=0; i<__WL_modified.length; i++) {
      __WL_modified[i] = false;
    }

    __WL_snap_first = first;
__WL_snap_email = email;


  }

  private String __WL_determineSetString() {

    if (! __WL_snapshots_enabled) return "FIRST = ?, EMAIL = ?";

    boolean nothingModified = true;

    boolean needsComma = false;

    StringBuffer sb = null;


    
  __WL_modified[0] = first != __WL_snap_first;

  if (__WL_modified[0]) {

    nothingModified = false;

    __WL_snap_first = first;

    if (needsComma) {
      sb.append(", ");
    } else {
      sb = new StringBuffer(200);
      needsComma = true;
    }

    sb.append("FIRST = ?");
  }


  __WL_modified[1] = email != __WL_snap_email;

  if (__WL_modified[1]) {

    nothingModified = false;

    __WL_snap_email = email;

    if (needsComma) {
      sb.append(", ");
    } else {
      sb = new StringBuffer(200);
      needsComma = true;
    }

    sb.append("EMAIL = ?");
  }



        
    if (nothingModified) {
      return null;
    } else {
      return sb.toString();
    }

  }


  private byte [] __WL_snapshot_byte_array(byte [] a) {
 
    if (a == null) return null;

    byte [] b = new byte[a.length];

    System.arraycopy(a,0,b,0,a.length);

    return b;
  }


  private javax.ejb.EJBContext __WL_EJBContext;

  private int __WL_method_state;

  private boolean __WL_isRemoved = false;

  private boolean __WL_busy = false;

  private boolean __WL_isLocal = true;

  private boolean  __WL_needsRemove;

  private Object __WL_loadUser;

  private boolean __WL_creatorOfTx;

  public javax.transaction.Transaction __WL_getBeanManagedTransaction() {
    throw new weblogic.utils.AssertionError("Entity beans can't have"
        + " bean-managed transactions");
  }

  public void __WL_setBeanManagedTransaction(javax.transaction.Transaction tx) {
    throw new weblogic.utils.AssertionError("Entity beans can't have"
        + " bean-managed transactions");

  }

  public boolean __WL_isBusy() { return __WL_busy; }
  public void __WL_setBusy(boolean b) { __WL_busy = b; }

  public boolean __WL_getIsLocal() { return __WL_isLocal; }
  public void __WL_setIsLocal(boolean b) { __WL_isLocal = b; }

  public int __WL_getMethodState() { return __WL_method_state; }
  public void __WL_setMethodState(int state) { __WL_method_state = state; }


  public boolean __WL_needsRemove() { return __WL_needsRemove; }
  public void __WL_setNeedsRemove(boolean b) { __WL_needsRemove = b; }

  public void __WL_setCreatorOfTx (boolean b) { __WL_creatorOfTx = b; }
  public boolean __WL_isCreatorOfTx() { return __WL_creatorOfTx; }

  public javax.ejb.EJBContext __WL_getEJBContext() { return __WL_EJBContext; }
  public void __WL_setEJBContext(javax.ejb.EJBContext ctx) { 
    __WL_EJBContext = ctx; 
  }

  public void __WL_setLoadUser(Object o) { __WL_loadUser = o;}
  public Object __WL_getLoadUser() { return __WL_loadUser; } 


  // =================================================================
  // Instance variable(s)
  private EntityContext __WL_ctx;


  // =================================================================
  // Constructor.
    public Contact_gnsg8g__WebLogic_CMP_RDBMS() {
    super();
    __WL_initialize();
  }


  // =================================================================
  // the CMP fields.

  	private boolean[] isModified = new boolean[3];


  private PersistenceManagerImpl __WL_pm = null;
  private static final boolean __WL_debug =
		(System.getProperty(RDBMSUtils.RDBMS_CODEGEN_DEBUG_PROP) != null);
  private static final boolean __WL_verbose = 
		(System.getProperty(RDBMSUtils.RDBMS_CODEGEN_VERBOSE_PROP) != null);

  // =================================================================
  // Implementation of CMPBean
  public void __WL_setup(java.util.Map bmMap, PersistenceManager pm) {
	  this.__WL_pm = (PersistenceManagerImpl)pm;
  }

  public Object __WL_getPrimaryKey() {
            java.lang.String __WL_pk = null;
    
          __WL_pk = this.last;
      return __WL_pk;

  }

  public EntityContext __WL_getEntityContext() {
    return __WL_ctx;
  }

  public void __WL_store(boolean unregister) {}

  public void __WL_superEjbLoad()  {
    int oldState = __WL_method_state;

    try {
      __WL_method_state = STATE_EJBLOAD;
      super.ejbLoad();
          
      if (__WL_snapshots_enabled) __WL_take_snapshot();

    } finally {
      __WL_method_state = oldState;
    }
  }

  public void __WL_superEjbStore()  {
    int oldState = __WL_method_state;

    try {
      __WL_method_state = STATE_EJBSTORE;
      if (__WL_verbose) {
        Debug.say("__WL_superEjbStore "+ __WL_ctx.getPrimaryKey());
      }
      super.ejbStore();
    } finally {
      __WL_method_state = oldState;
    }
  }

  public void __WL_superEjbRemove()
    throws javax.ejb.RemoveException {
  }

  public void __WL_copyFrom(CMPBean otherBean, boolean __WL_initSnapshotVars) {
        cmp1bean.Contact_gnsg8g__WebLogic_CMP_RDBMS __WL_bean = null;
    try {
      __WL_bean = (cmp1bean.Contact_gnsg8g__WebLogic_CMP_RDBMS)otherBean;
    } catch (RuntimeException e) {
      if (__WL_debug) System.out.println("throwing runtime exception");
      throw e;
    }
    catch (Exception ex) {
      if (__WL_debug) System.out.println("throwing ejbeception");
      throw new PersistenceRuntimeException(ex);
    }
last = __WL_bean.last;
first = __WL_bean.first;
email = __WL_bean.email;

  }
  

  public void __WL_loadGroupByIndex(int index, java.sql.ResultSet __WL_rs,
    Integer offset, javax.ejb.EntityBean __WL_bean) throws Exception
  {
    __WL_loadFromRS(__WL_rs, (cmp1bean.Contact_gnsg8g__WebLogic_CMP_RDBMS) __WL_bean);
  }

  public void __WL_loadFromRS(java.sql.ResultSet __WL_rs,
    cmp1bean.Contact_gnsg8g__WebLogic_CMP_RDBMS __WL_bean) throws Exception
  {
    __WL_bean.last = (java.lang.String)__WL_rs.getString(1);
  if (__WL_rs.wasNull()) { __WL_bean.last = null; }
__WL_bean.first = (java.lang.String)__WL_rs.getString(2);
  if (__WL_rs.wasNull()) { __WL_bean.first = null; }
__WL_bean.email = (java.lang.String)__WL_rs.getString(3);
  if (__WL_rs.wasNull()) { __WL_bean.email = null; }

  }

  public void __WL_loadCMRFieldByCmrField(String cmrField, java.sql.ResultSet rs,
     Integer offset, javax.ejb.EntityBean eb) throws Exception
  {
    // not used for CMP11 bean
  }

  public PersistenceManager __WL_getPersistenceManager() {
    return null;
  }

  public void __WL_makeCascadeDelList(Map mapCascadeDelBeans,
                                      List listCascadeDelBeans,
                                      List listCascadeDelBeansWithoutDBUpdate,
                                      boolean withoutDBUpdate)
    throws java.lang.Exception
  {
    listCascadeDelBeans.add(this);
  }

  public boolean[] __WL_getIsModifiedUnion(boolean[] isModified)
  {
    return null;
  }

⌨️ 快捷键说明

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