【Java开源代码栏目提醒】:网学会员为需要Java开源代码的朋友们搜集整理了UserBean.java相关资料,希望对各位网友有所帮助!
/*
* Copyright (c) 1996-2001 Borland Software Corporation. All Rights Reserved.
*
* This SOURCE CODE FILE, which has been provided by Borland Software as part
* of an Borland Software product for use ONLY by licensed users of the product,
* includes CONFIDENTIAL and PROPRIETARY information of Borland Software.
*
* USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
* OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
* THE PRODUCT.
*
* IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND SOFTWARE, ITS
* RELATED COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY
* CLAIMS OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR
* DISTRIBUTION OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES
* ARISING OUT OF OR RESULTING FROM THE USE, MODIFICATION, OR
* DISTRIBUTION OF PROGRAMS OR FILES CREATED FROM, BASED ON, AND/OR
* DERIVED FROM THIS SOURCE CODE FILE.
*/
//------------------------------------------------------------------------------
// Copyright (c) 1996-2001 Borland Software Corporation. All Rights Reserved.
//------------------------------------------------------------------------------
package com.borland.samples.ejb;
import java.rmi.*;
import javax.ejb.*;
import java.
sql.*;
public class UserBean implements EntityBean {
EntityContext entityContext;
public Integer id;
public String name;
public String password;
public Timestamp lastaccessed;
public String firstname;
public String lastname;
public String city;
public String state;
public String zip;
public String address;
public Integer ejbCreate(Integer id, String name, String password, Timestamp lastaccessed) throws CreateException, RemoteException {
this.id = id;
this.name = name;
this.password = password;
this.lastaccessed = lastaccessed;
return null;
}
public Integer ejbCreate(Integer id) throws RemoteException, CreateException, RemoteException {
return ejbCreate(id, null, null, null);
}
public void ejbPostCreate(Integer id, String name, String password, Timestamp lastaccessed) throws CreateException, RemoteException {
}
public void ejbPostCreate(Integer id) throws CreateException, RemoteException {
ejbPostCreate(id, null, null, null);
}
public void ejbLoad() throws RemoteException {
}
public void ejbStore() throws RemoteException {
}
public void ejbRemove() throws RemoveException, RemoteException {
}
public void ejbActivate() throws RemoteException {
}
public void ejbPassivate() throws RemoteException {
}
public void setEntityContext(EntityContext entityContext) throws RemoteException {
this.entityContext = entityContext;
}
public void unsetEntityContext() throws RemoteException {
entityContext = null;
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPass
word() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Timestamp getLastaccessed() {
return lastaccessed;
}
public void setLastaccessed(Timestamp lastaccessed) {
this.lastaccessed = lastaccessed;
}
public boolean isLoggedIn() {
return name != null;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getFirstname() {
return firstname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
public String getLastname() {
return lastname;
}
public void setCity(String city) {
this.city = city;
}
public String getCity() {
return city;
}
public void setState(String state) {
this.state = state;
}
public String getState() {
return state;
}
public void setZip(String zip) {
this.zip = zip;
}
public String getZip() {
return zip;
}
public void setAddress(String address) {
this.address = address;
}
public String getAddress() {
return address;
}
}