ManagerBMP.java
资源名称:MyStore.rar [点击查看]
上传用户:hgs128
上传日期:2007-02-03
资源大小:166k
文件大小:4k
源码类别:
百货/超市行业
开发平台:
WINDOWS
- /*
- * Generated by XDoclet - Do not edit!
- */
- package bmp;
- /**
- * BMP layer for Manager.
- * @lomboz generated
- */
- public class ManagerBMP
- extends bmp.ManagerBean
- implements javax.ejb.EntityBean
- {
- public java.lang.String getManagerID()
- {
- return super.getManagerID();
- }
- public void setManagerID( java.lang.String managerID )
- {
- super.setManagerID(managerID);
- 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 getMessage()
- {
- return super.getMessage();
- }
- public void setMessage( java.lang.String message )
- {
- super.setMessage(message);
- makeDirty();
- }
- public float getSalary()
- {
- return super.getSalary();
- }
- public void setSalary( float salary )
- {
- super.setSalary(salary);
- makeDirty();
- }
- public boolean isModified()
- {
- return dirty;
- }
- protected void makeDirty()
- {
- dirty = true;
- }
- protected void makeClean()
- {
- dirty = false;
- }
- private boolean dirty = false;
- public bmp.ManagerData getData()
- {
- bmp.ManagerData dataHolder = null;
- try
- {
- dataHolder = new bmp.ManagerData();
- dataHolder.setManagerID( getManagerID() );
- dataHolder.setUserID( getUserID() );
- dataHolder.setFirstName( getFirstName() );
- dataHolder.setLastName( getLastName() );
- dataHolder.setAddress( getAddress() );
- dataHolder.setMessage( getMessage() );
- dataHolder.setSalary( getSalary() );
- }
- catch (RuntimeException e)
- {
- throw new javax.ejb.EJBException(e);
- }
- return dataHolder;
- }
- public bmp.ManagerPK ejbFindByPrimaryKey(bmp.ManagerPK pk) throws javax.ejb.FinderException
- {
- super.ejbFindByPrimaryKey(pk);
- return getDao().findByPrimaryKey(pk);
- }
- public bmp.ManagerPK ejbFindByUserID(java.lang.String userID) throws javax.ejb.FinderException
- {
- super.ejbFindByUserID(userID);
- return getDao().findByUserID(userID);
- }
- public void ejbLoad()
- {
- getDao().load((bmp.ManagerPK) ctx.getPrimaryKey(), this);
- makeClean();
- }
- public void ejbStore()
- {
- if (isModified())
- {
- getDao().store((bmp.ManagerBean) 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.ManagerPK) ctx.getPrimaryKey());
- }
- private static dao.ManagerDAO dao = null;
- protected static synchronized dao.ManagerDAO getDao()
- {
- if (dao != null) {
- return dao;
- } else {
- dao = (dao.ManagerDAO) new dao.ManagerDAOImpl();
- dao.init();
- return dao;
- }
- }
- /* Value Objects BEGIN */
- /* Value Objects END */
- }