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

📄 tbcustomer_vrnevs__weblogic_cmp_rdbms.java

📁 用j2ee开发的一个旅店管理系统
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
/**
* This code was automatically generated at 1:33:19 on 2006-9-2
* by weblogic.ejb20.cmp.rdbms.codegen.RDBMSCodeGenerator -- do not edit.
*
* @version WebLogic Server 8.1  Thu Mar 20 23:06:05 PST 2003 246620 
* @author Copyright (c) 2006 by BEA Systems, Inc. All Rights Reserved.
*/

package com.xc.hotelmanager.hotel.control.entity;

import java.lang.reflect.Method;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.io.IOException;

import javax.ejb.EntityContext;
import javax.ejb.EJBException;
import javax.ejb.EJBObject;
import javax.ejb.ObjectNotFoundException;
import javax.ejb.NoSuchEntityException;
import javax.ejb.Handle;
import javax.ejb.HomeHandle;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingEnumeration;
import javax.naming.NameClassPair;
import javax.rmi.PortableRemoteObject;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;

import weblogic.ejb.OptimisticConcurrencyException;
import weblogic.ejb20.InternalException;
import weblogic.ejb20.internal.EJBRuntimeUtils;
import weblogic.ejb20.internal.EntityEJBContextImpl;
import weblogic.ejb20.interfaces.WLEnterpriseBean;
import weblogic.ejb20.interfaces.CachingManager;
import weblogic.ejb20.persistence.RSInfoImpl;
import weblogic.ejb20.persistence.spi.CMPBean;
import weblogic.ejb20.persistence.spi.CMPBeanManager;
import weblogic.ejb20.persistence.spi.PersistenceManager;
import weblogic.ejb20.persistence.spi.PersistenceRuntimeException;
import weblogic.ejb20.persistence.spi.RSInfo;

import weblogic.ejb20.cmp.rdbms.RDBMSObjectInputStream;
import weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager;
import weblogic.ejb20.cmp.rdbms.RDBMSException;
import weblogic.ejb20.cmp.rdbms.RDBMSUtils;
import weblogic.ejb20.cmp.rdbms.RDBMSM2NSet;
import weblogic.ejb20.cmp.rdbms.RDBMSSet;

import weblogic.transaction.TransactionHelper;
import weblogic.ejb20.dd.DDConstants;

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

import weblogic.utils.Debug;

public final class TbCustomer_vrnevs__WebLogic_CMP_RDBMS extends com.xc.hotelmanager.hotel.control.entity.TbCustomerBean
implements CMPBean, TbCustomer_vrnevs_Intf
{
  // =================================================================
  // Class  variable(s)
  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);
  
  private static String EOL = System.getProperty("line.separator");
  
  
  
  private javax.ejb.EJBContext __WL_EJBContext;
  
  private int __WL_method_state;
  
  private short __WL_bean_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 AssertionError("Entity beans can't have"
    + " bean-managed transactions");
  }
  
  public void __WL_setBeanManagedTransaction(javax.transaction.Transaction tx) {
    throw new 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; } 
  
  
  // =================================================================
  // ejbSelect Methods Defined on CMR Beans
  
  
  
  // =================================================================
  // Instance variable(s)
  private EntityContext __WL_ctx;
  private RDBMSPersistenceManager __WL_pm;  private ClassLoader __WL_classLoader;  
  
  public java.lang.String cid;  public java.lang.String cname;  public java.lang.String csex;  public java.lang.String cstuts;  public java.lang.String cnote;  
  
  
  
  
  
  
  
  private boolean[] __WL_isModified = new boolean[5];  private boolean __WL_modifiedBeanIsRegistered= false;  
  private boolean __WL_invalidatedBeanIsRegistered= false;  
  private boolean[] __WL_isLoaded = new boolean[5];  private boolean __WL_beanIsLoaded= false;  
  
  // for remote relationships
  
  
  
  
  // =================================================================
  // Constructor(s)
  public TbCustomer_vrnevs__WebLogic_CMP_RDBMS()  {
    super();
    
    __WL_initialize();
    
    
  }
  
  // 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)
  {
    __WL_initialize_persistent(__WL_initSnapshotVars);
    
    __WL_beanIsLoaded = false;
    
    __WL_modifiedBeanIsRegistered = false;
    
    
    //cached relationship state
        
  }
  
  private void __WL_initialize_persistent(boolean __WL_initSnapshotVars)
  {
    for (int __WL_i = 0; __WL_i < 5; __WL_i++) {
      __WL_isLoaded[__WL_i] = false;
      __WL_isModified[__WL_i] = false;
    }
    
        csex = null;    cid = null;    cnote = null;    cstuts = null;    cname = null;    
    if (__WL_initSnapshotVars) {
      
    }
  }
  
  // ================================================================
  // Method(s)
  public void setEntityContext(javax.ejb.EntityContext arg0) {
    int oldState = __WL_method_state;
    try {
      __WL_method_state = STATE_SET_CONTEXT;
      super.setEntityContext(arg0);
      this.__WL_ctx = arg0;
    } finally {
      __WL_method_state = oldState;
    }
  }
  
  public void unsetEntityContext()
  
  {
    int oldState = __WL_method_state;
    try {
      __WL_method_state = STATE_UNSET_CONTEXT;
      super.unsetEntityContext();
    } finally {
      __WL_method_state = oldState;
    }
  }
  
  public void ejbActivate()
  
  {
    int oldState = __WL_method_state;
    try {
      __WL_method_state = STATE_EJB_ACTIVATE;
      super.ejbActivate();
    } finally {
      __WL_method_state = oldState;
    }
  }
  
  
  // ================================================================
  // Getter and Setter methods.
  public java.lang.String getCid()
  {
    try {
      if (!(__WL_isLoaded[0] || __WL_isModified[0])) {
        __WL_loadGroup0();
      }
      
      return cid;
    } catch (RuntimeException re) {
      if (__WL_verbose) {
        Debug.say("rethrowing RuntimeException.");
        re.printStackTrace();
      }
      throw re;
    } catch (Exception ex) {
      if (__WL_verbose) {
        Debug.say("wrapping Exception in PersistenceRuntimeException.");
        ex.printStackTrace();
      }
      throw new PersistenceRuntimeException(ex);
    }
    
  }
  public void setCid(
  java.lang.String cid)
  {
    if (__WL_method_state!=STATE_EJB_CREATE) {      Loggable l = EJBLogger.logcannotCallSetOnPkLoggable();throw new IllegalStateException(l.getMessage());}    if ((this.cid == cid || (this.cid!=null && this.cid.equals(cid))) && __WL_isLoaded[0]) return;    
    this.cid = cid;
    __WL_isModified[0] = true;
    
    if (! __WL_modifiedBeanIsRegistered) {
      __WL_pm.registerModifiedBean(__WL_ctx.getPrimaryKey());
      __WL_modifiedBeanIsRegistered = true;
    }
    
    
  }
    public java.lang.String getCname()
  {
    try {
      if (!(__WL_isLoaded[1] || __WL_isModified[1])) {
        __WL_loadGroup0();
      }
      
      return cname;
    } catch (RuntimeException re) {
      if (__WL_verbose) {
        Debug.say("rethrowing RuntimeException.");
        re.printStackTrace();
      }
      throw re;
    } catch (Exception ex) {
      if (__WL_verbose) {
        Debug.say("wrapping Exception in PersistenceRuntimeException.");
        ex.printStackTrace();
      }
      throw new PersistenceRuntimeException(ex);
    }
    
  }
  public void setCname(
  java.lang.String cname)
  {
    if ((this.cname == cname || (this.cname!=null && this.cname.equals(cname))) && __WL_isLoaded[1]) return;    
    this.cname = cname;
    __WL_isModified[1] = true;
    
    if (! __WL_modifiedBeanIsRegistered) {
      __WL_pm.registerModifiedBean(__WL_ctx.getPrimaryKey());
      __WL_modifiedBeanIsRegistered = true;
    }
    
    
  }
    public java.lang.String getCsex()
  {
    try {
      if (!(__WL_isLoaded[2] || __WL_isModified[2])) {
        __WL_loadGroup0();
      }
      
      return csex;
    } catch (RuntimeException re) {
      if (__WL_verbose) {
        Debug.say("rethrowing RuntimeException.");
        re.printStackTrace();
      }
      throw re;
    } catch (Exception ex) {
      if (__WL_verbose) {
        Debug.say("wrapping Exception in PersistenceRuntimeException.");
        ex.printStackTrace();
      }
      throw new PersistenceRuntimeException(ex);
    }
    
  }
  public void setCsex(
  java.lang.String csex)
  {
    if ((this.csex == csex || (this.csex!=null && this.csex.equals(csex))) && __WL_isLoaded[2]) return;    
    this.csex = csex;
    __WL_isModified[2] = true;
    
    if (! __WL_modifiedBeanIsRegistered) {
      __WL_pm.registerModifiedBean(__WL_ctx.getPrimaryKey());
      __WL_modifiedBeanIsRegistered = true;
    }
    
    
  }
    public java.lang.String getCstuts()
  {
    try {
      if (!(__WL_isLoaded[3] || __WL_isModified[3])) {
        __WL_loadGroup0();
      }
      
      return cstuts;
    } catch (RuntimeException re) {
      if (__WL_verbose) {
        Debug.say("rethrowing RuntimeException.");
        re.printStackTrace();
      }
      throw re;
    } catch (Exception ex) {
      if (__WL_verbose) {
        Debug.say("wrapping Exception in PersistenceRuntimeException.");
        ex.printStackTrace();
      }
      throw new PersistenceRuntimeException(ex);
    }
    
  }
  public void setCstuts(
  java.lang.String cstuts)
  {
    if ((this.cstuts == cstuts || (this.cstuts!=null && this.cstuts.equals(cstuts))) && __WL_isLoaded[3]) return;    
    this.cstuts = cstuts;
    __WL_isModified[3] = true;
    
    if (! __WL_modifiedBeanIsRegistered) {
      __WL_pm.registerModifiedBean(__WL_ctx.getPrimaryKey());
      __WL_modifiedBeanIsRegistered = true;
    }
    
    
  }
    public java.lang.String getCnote()
  {
    try {
      if (!(__WL_isLoaded[4] || __WL_isModified[4])) {
        __WL_loadGroup0();
      }
      
      return cnote;
    } catch (RuntimeException re) {
      if (__WL_verbose) {
        Debug.say("rethrowing RuntimeException.");
        re.printStackTrace();
      }
      throw re;
    } catch (Exception ex) {
      if (__WL_verbose) {
        Debug.say("wrapping Exception in PersistenceRuntimeException.");
        ex.printStackTrace();
      }
      throw new PersistenceRuntimeException(ex);
    }
    
  }
  public void setCnote(
  java.lang.String cnote)
  {
    if ((this.cnote == cnote || (this.cnote!=null && this.cnote.equals(cnote))) && __WL_isLoaded[4]) return;    
    this.cnote = cnote;
    __WL_isModified[4] = true;
    
    if (! __WL_modifiedBeanIsRegistered) {
      __WL_pm.registerModifiedBean(__WL_ctx.getPrimaryKey());
      __WL_modifiedBeanIsRegistered = true;
    }
    
    
  }
    
  
  
  
  //=================================================================
  //Finder methods.
  public java.lang.Object ejbFindByPrimaryKey(java.lang.String param0) throws javax.ejb.FinderException
  {    if(__WL_verbose) {
      Debug.say("called findByPrimaryKey.");
    }
    
    java.sql.Connection __WL_con = null;
    java.sql.PreparedStatement __WL_stmt = null;
    java.sql.ResultSet __WL_rs = null;
    int __WL_offset = 0;
    com.xc.hotelmanager.hotel.control.entity.TbCustomer_vrnevs__WebLogic_CMP_RDBMS __WL_bean = null;    Object __WL_eo = null;    Object __WL_eo_rc = null;    
    
    
    
    
    int selectForUpdateVal = __WL_pm.getSelectForUpdateValue();
    
    java.lang.String __WL_query = null;
    
    switch(selectForUpdateVal) {
      case DDConstants.SELECT_FOR_UPDATE_DISABLED:
      __WL_query = "SELECT WL0.cid, WL0.cname, WL0.cnote, WL0.csex, WL0.cstuts  FROM Customer WL0 WHERE ( WL0.cid = ? )";
      break;
      
      case DDConstants.SELECT_FOR_UPDATE:
      __WL_query = "SELECT WL0.cid, WL0.cname, WL0.cnote, WL0.csex, WL0.cstuts  FROM Customer WL0 WHERE ( WL0.cid = ? ) FOR UPDATE ";
      break;
      
      case DDConstants.SELECT_FOR_UPDATE_NO_WAIT:
      __WL_query = "SELECT WL0.cid, WL0.cname, WL0.cnote, WL0.csex, WL0.cstuts  FROM Customer WL0 WHERE ( WL0.cid = ? ) FOR UPDATE NOWAIT ";
      break;
      
      default:
      throw new AssertionError(
      "Unknown selectForUpdate type: '"+selectForUpdateVal+"'");

⌨️ 快捷键说明

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