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

📄 customerbean.java

📁 A J2EE & Jsp Example
💻 JAVA
字号:
/* * * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. *  * This software is the proprietary information of Sun Microsystems, Inc.   * Use is subject to license terms. * The code in this example is offered under the license at:  * http://wireless.java.sun.com/berkeley_license.html * */package customerejb;import javax.ejb.*;public abstract class CustomerBean implements javax.ejb.EntityBean {        private javax.ejb.EntityContext context;            /**     * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)     */    public void setEntityContext(javax.ejb.EntityContext aContext) {        context=aContext;    }            /**     * @see javax.ejb.EntityBean#ejbActivate()     */    public void ejbActivate() {            }            /**     * @see javax.ejb.EntityBean#ejbPassivate()     */    public void ejbPassivate() {            }            /**     * @see javax.ejb.EntityBean#ejbRemove()     */    public void ejbRemove() {            }            /**     * @see javax.ejb.EntityBean#unsetEntityContext()     */    public void unsetEntityContext() {        context=null;    }            /**     * @see javax.ejb.EntityBean#ejbLoad()     */    public void ejbLoad() {            }            /**     * @see javax.ejb.EntityBean#ejbStore()     */    public void ejbStore() {            }        public abstract java.lang.String getCustomerId();    public abstract void setCustomerId(java.lang.String customerId);        public abstract java.lang.String getEmail();    public abstract void setEmail(java.lang.String email);        public abstract java.lang.String getPhone();    public abstract void setPhone(java.lang.String phone);    public abstract java.lang.String getFirstName();    public abstract void setFirstName(java.lang.String FirstName);        public java.lang.String ejbCreate(CustomerTO custTO) throws javax.ejb.CreateException {                this.setCustomerId(custTO.getCustomerId());        this.setFirstName(custTO.getFirstName());        this.setLastName(custTO.getLastName());        this.setStreet(custTO.getStreet());        this.setCity(custTO.getCity());        this.setZip(custTO.getZip());        this.setPhone(custTO.getPhone());        this.setEmail(custTO.getEmail());        return(custTO.getCustomerId());    }        public void ejbPostCreate(CustomerTO custTO) throws javax.ejb.CreateException {    }        public java.lang.String ejbCreate(java.lang.String id) throws javax.ejb.CreateException {        this.setCustomerId(id);        return(id);    }        public void ejbPostCreate(java.lang.String id) throws javax.ejb.CreateException {    }        public CustomerTO getCustomer() {        CustomerTO custTO;        custTO = new CustomerTO(        this.getCustomerId(),        this.getFirstName(),        this.getLastName(),        this.getStreet(),        this.getCity(),        this.getState(),        this.getZip(),        this.getPhone(),        this.getEmail() );        return custTO;    }        public void updateCustomer(CustomerTO custTO) throws CustomerException {        this.setFirstName(custTO.getFirstName());        this.setLastName(custTO.getLastName());        this.setStreet(custTO.getStreet());        this.setCity(custTO.getCity());        this.setState(custTO.getState());        this.setZip(custTO.getZip());        this.setPhone(custTO.getPhone());        this.setEmail(custTO.getEmail());    }        public abstract void setCity(java.lang.String city);        public abstract java.lang.String getCity();        public abstract void setState(java.lang.String state);        public abstract java.lang.String getState();        public abstract void setStreet(java.lang.String street);        public abstract java.lang.String getStreet();        public abstract void setZip(java.lang.String zip);        public abstract java.lang.String getZip();        public abstract void setLastName(java.lang.String lastName);        public abstract java.lang.String getLastName();    }

⌨️ 快捷键说明

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