CustomerBMP.java
资源名称:MyStore.rar [点击查看]
上传用户:hgs128
上传日期:2007-02-03
资源大小:166k
文件大小:4k
源码类别:
百货/超市行业
开发平台:
WINDOWS
- /*
- * Generated by XDoclet - Do not edit!
- */
- package bmp;
- /**
- * BMP layer for Customer.
- * @lomboz generated
- */
- public class CustomerBMP
- extends bmp.CustomerBean
- implements javax.ejb.EntityBean
- {
- public java.lang.String getCustomerID()
- {
- return super.getCustomerID();
- }
- public void setCustomerID( java.lang.String customerID )
- {
- super.setCustomerID(customerID);
- makeDirty();
- }
- public java.lang.String getUserID()
- {
- return super.getUserID();
- }
- public void setUserID( java.lang.String userID )
- {
- super.setUserID(userID);
- makeDirty();
- }
- public java.lang.String getFirstName()
- {
- return super.getFirstName();
- }
- public void setFirstName( java.lang.String firstName )
- {
- super.setFirstName(firstName);
- makeDirty();
- }
- public java.lang.String getLastName()
- {
- return super.getLastName();
- }
- public void setLastName( java.lang.String lastName )
- {
- super.setLastName(lastName);
- makeDirty();
- }
- public java.lang.String getAddress()
- {
- return super.getAddress();
- }
- public void setAddress( java.lang.String address )
- {
- super.setAddress(address);
- makeDirty();
- }
- public java.lang.String getPhone()
- {
- return super.getPhone();
- }
- public void setPhone( java.lang.String phone )
- {
- super.setPhone(phone);
- makeDirty();
- }
- public java.lang.String getShareholderStatus()
- {
- return super.getShareholderStatus();
- }
- public void setShareholderStatus( java.lang.String shareholderStatus )
- {
- super.setShareholderStatus(shareholderStatus);
- makeDirty();
- }
- public boolean isModified()
- {
- return dirty;
- }
- protected void makeDirty()
- {
- dirty = true;
- }
- protected void makeClean()
- {
- dirty = false;
- }
- private boolean dirty = false;
- public bmp.CustomerData getData()
- {
- bmp.CustomerData dataHolder = null;
- try
- {
- dataHolder = new bmp.CustomerData();
- dataHolder.setCustomerID( getCustomerID() );
- dataHolder.setUserID( getUserID() );
- dataHolder.setFirstName( getFirstName() );
- dataHolder.setLastName( getLastName() );
- dataHolder.setAddress( getAddress() );
- dataHolder.setPhone( getPhone() );
- dataHolder.setShareholderStatus( getShareholderStatus() );
- }
- catch (RuntimeException e)
- {
- throw new javax.ejb.EJBException(e);
- }
- return dataHolder;
- }
- public bmp.CustomerPK ejbFindByPrimaryKey(bmp.CustomerPK pk) throws javax.ejb.FinderException
- {
- super.ejbFindByPrimaryKey(pk);
- return getDao().findByPrimaryKey(pk);
- }
- public bmp.CustomerPK ejbFindByUserID(java.lang.String userID) throws javax.ejb.FinderException
- {
- super.ejbFindByUserID(userID);
- return getDao().findByUserID(userID);
- }
- public void ejbLoad()
- {
- getDao().load((bmp.CustomerPK) ctx.getPrimaryKey(), this);
- makeClean();
- }
- public void ejbStore()
- {
- if (isModified())
- {
- getDao().store((bmp.CustomerBean) this);
- makeClean();
- }
- }
- public void ejbActivate()
- {
- }
- public void ejbPassivate()
- {
- }
- private javax.ejb.EntityContext ctx = null;
- public void setEntityContext(javax.ejb.EntityContext ctx)
- {
- this.ctx = ctx;
- }
- public void unsetEntityContext()
- {
- this.ctx = null;
- }
- public void ejbRemove() throws javax.ejb.RemoveException
- {
- getDao().remove((bmp.CustomerPK) ctx.getPrimaryKey());
- }
- private static dao.CustomerDAO dao = null;
- protected static synchronized dao.CustomerDAO getDao()
- {
- if (dao != null) {
- return dao;
- } else {
- dao = (dao.CustomerDAO) new dao.CustomerDAOImpl();
- dao.init();
- return dao;
- }
- }
- /* Value Objects BEGIN */
- /* Value Objects END */
- }