CustomerBean.java
资源名称:MyStore.rar [点击查看]
上传用户:hgs128
上传日期:2007-02-03
资源大小:166k
文件大小:5k
源码类别:
百货/超市行业
开发平台:
WINDOWS
- /*
- * Created on 1999-5-17
- */
- package bmp;
- import javax.ejb.EntityBean;
- import javax.ejb.FinderException;
- /**
- * @ejb.bean name="Customer"
- * jndi-name="CustomerBean"
- * type="BMP"
- *
- * @ejb.dao class="dao.CustomerDAO"
- *impl-class="dao.CustomerDAOImpl"
- *
- *@ejb.resource-ref res-ref-name="jdbc/OracleDS"
- * res-type="javax.sql.Datasource"
- * res-auth="Container"
- *
- *@jboss.resource-ref
- * res-ref-name="jdbc/OracleDS"
- * jndi-name="java:/OracleDS"
- *
- *--
- * This is needed for JOnAS.
- * If you are not using JOnAS you can safely remove the tags below.
- * @jonas.bean ejb-name="Customer"
- * jndi-name="CustomerBean"
- *
- *--
- **/
- public abstract class CustomerBean implements EntityBean {
- private String customerID;
- private String userID;
- private String firstName;
- private String lastName;
- private String address;
- private String phone;
- private String shareholderStatus;
- /**
- * Returns the customerID
- * @return the customerID
- *
- * @ejb.persistence
- * @ejb.pk-field
- * @ejb.interface-method
- *
- */
- public java.lang.String getCustomerID(){
- return customerID;
- }
- /**
- * Sets the customerID
- * @param java.lang.String the new customerID value
- *
- * @ejb.interface-method
- * @author Danny
- */
- public void setCustomerID(java.lang.String customerID){
- this.customerID=customerID;
- }
- /**
- * Returns the userID
- * @return the userID
- * @ejb.persistence
- * @ejb.interface-method
- * @author Danny
- */
- public java.lang.String getUserID(){
- return userID;
- }
- /**
- * Sets the userID
- * @param java.lang.String the new userID value
- * @ejb.interface-method
- * @author Danny
- */
- public void setUserID(java.lang.String userID){
- this.userID=userID;
- }
- /**
- * Returns the firstName
- * @return the firstName
- * @ejb.persistence
- * @ejb.interface-method
- * @author Danny
- */
- public java.lang.String getFirstName(){
- return firstName;
- }
- /**
- * Sets the firstName
- * @param java.lang.String the new firstName value
- * @ejb.interface-method
- * @author Danny
- */
- public void setFirstName(java.lang.String firstName){
- this.firstName=firstName;
- }
- /**
- * Returns the lastName
- * @return the lastName
- * @ejb.persistence
- * @ejb.interface-method
- * @author Danny
- */
- public java.lang.String getLastName(){
- return lastName;
- }
- /**
- * Sets the lastName
- * @param java.lang.String the new lastName value
- * @ejb.interface-method
- * @author Danny
- */
- public void setLastName(java.lang.String lastName){
- this.lastName=lastName;
- }
- /**
- * Returns the address
- * @return the address
- * @ejb.persistence
- * @ejb.interface-method
- * @author Danny
- */
- public java.lang.String getAddress(){
- return address;
- }
- /**
- * Sets the address
- * @param java.lang.String the new address value
- * @ejb.interface-method
- * @author Danny
- */
- public void setAddress(java.lang.String address){
- this.address=address;
- }
- /**
- * Returns the phone
- * @return the phone
- * @ejb.persistence
- * @ejb.interface-method
- * @author Danny
- */
- public java.lang.String getPhone(){
- return phone;
- }
- /**
- * Sets the phone
- * @param java.lang.String the new phone value
- * @ejb.interface-method
- * @author Danny
- */
- public void setPhone(java.lang.String phone){
- this.phone=phone;
- }
- /**
- * Returns the shareholderStatus
- * @return the shareholderStatus
- * @ejb.persistence
- * @ejb.interface-method
- * @author Danny
- */
- public java.lang.String getShareholderStatus(){
- return shareholderStatus;
- }
- /**
- * Sets the shareholderStatus
- * @param java.lang.String the new shareholderStatus value
- * @ejb.interface-method
- * @author Danny
- */
- public void setShareholderStatus(java.lang.String shareholderStatus){
- this.shareholderStatus=shareholderStatus;
- }
- /**
- * Finds the primary key
- * @param pk
- * @return
- * @throws FinderException
- */
- public CustomerPK ejbFindByPrimaryKey (CustomerPK pk) throws FinderException{
- System.out.println("Entering the CustomerBean.ejbFinderByPrimaryKey()");
- System.out.println("Leaving the CustomerBean.ejbFinderByPrimaryKey()");
- return null;
- }
- public CustomerPK ejbFindByUserID (String userID) throws FinderException{
- System.out.println("Entering the CustomerBean.ejbFindByUserID()");
- System.out.println("Leaving the CustomerBean.ejbFindByUserID()");
- return null;
- }
- /**
- * Returns CustomerData Object
- * @return CustomerData
- * @ejb.interface-method
- * view-type="local"
- **/
- public CustomerData getCustomerData(){
- System.out.println("Entering the CustomerBean.getCustomerData()");
- System.out.println("Leaving the CustomerBean.getCustomerData()");
- return new CustomerData(getCustomerID(),getUserID(),getFirstName(),getLastName(),getAddress(),
- getPhone(),getShareholderStatus());
- }
- }