📄 profileform.java
字号:
/*
* @author : Sujatha
* @Version : 1.0
*
* Development Environment : Oracle9i JDeveloper
* Name of the File : ProfileForm.java
* Creation/Modification History :
*
* Sujatha 10-March-2003 Created
*
*/
package oracle.otnsamples.vsm.actions.forms;
// Value object corresponding to Profile
import oracle.otnsamples.vsm.services.data.Profile;
// Apache Action Form
import org.apache.struts.action.ActionForm;
/**
* The class is a Struts action form encapsulating user profile data. The class
* has getters and setters for profile related information like name, email,
* address, creditcard number etc.
*
* @author Sujatha
* @version 1.0
*/
public class ProfileForm extends ActionForm {
private String address;
private String cardExpiryDate;
private String cardNumber;
private String cardProvider;
private String city;
private String countryID;
private String email;
private String firstName;
private String lastName;
private String password;
private String phone;
private String role;
private String state;
private String userName;
private String zip;
/**
* Default constructor, takes no arguments
*/
public ProfileForm() {
}
/**
* Constructor which takes an Profile value object and copies the values from
* the object
*
* @param <b>profile</b> Profile object
*/
public ProfileForm(Profile profile) {
this.userName = profile.getUserName();
this.firstName = profile.getFirstName();
this.lastName = profile.getLastName();
this.email = profile.getEmail();
this.address = profile.getAddress();
this.city = profile.getCity();
this.state = profile.getState();
this.countryID = profile.getCountryID();
this.zip = profile.getZip();
this.phone = profile.getPhone();
this.role = profile.getRole();
this.password = profile.getPassword();
this.cardProvider = profile.getCardProvider();
this.cardNumber = profile.getCardNumber();
this.cardExpiryDate = profile.getCardExpiryDate();
}
/**
* Gets the user name
*
* @return <b>String</b> user name
*/
public String getUserName() {
return userName;
}
/**
* Sets the user name
*
* @param <b>userName</b> user name
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
* Gets the first name
*
* @return <b>String</b> first name
*/
public String getFirstName() {
return firstName;
}
/**
* Sets the first name
*
* @param <b>firstName</b> first name
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
* Gets the last name
*
* @return <b>String</b> last name
*/
public String getLastName() {
return lastName;
}
/**
* Sets the last name
*
* @param <b>lastName</b> last name
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}
/**
* Gets the email
*
* @return <b>String</b> email id of user
*/
public String getEmail() {
return email;
}
/**
* Sets the email
*
* @param <b>email</b> email id of user
*/
public void setEmail(String email) {
this.email = email;
}
/**
* Gets the address
*
* @return <b>String</b> address of the user
*/
public String getAddress() {
return address;
}
/**
* Sets the address
*
* @param <b>address</b> address of the user
*/
public void setAddress(String address) {
this.address = address;
}
/**
* Gets the city
*
* @return <b>String</b> city of the user
*/
public String getCity() {
return city;
}
/**
* Sets the city
*
* @param <b>city</b> city of the user
*/
public void setCity(String city) {
this.city = city;
}
/**
* Gets the state
*
* @return <b>String</b> state of the user
*/
public String getState() {
return state;
}
/**
* Sets the state
*
* @param <b>state</b> state of the user
*/
public void setState(String state) {
this.state = state;
}
/**
* Gets the country code
*
* @return <b>String</b> country code
*/
public String getCountryID() {
return countryID;
}
/**
* Sets the country code
*
* @param <b>countryID</b> country code
*/
public void setCountryID(String countryID) {
this.countryID = countryID;
}
/**
* Gets the zip
*
* @return <b>String</b> zip code
*/
public String getZip() {
return zip;
}
/**
* Sets the zip
*
* @param <b>zip</b> zip code
*/
public void setZip(String zip) {
this.zip = zip;
}
/**
* Gets the phone
*
* @return <b>String</b> phone number
*/
public String getPhone() {
return phone;
}
/**
* Sets the phone number
*
* @param <b>phone</b> phone number
*/
public void setPhone(String phone) {
this.phone = phone;
}
/**
* Gets the password
*
* @return <b>String</b> password of the user
*/
public String getPassword() {
return password;
}
/**
* Sets the password
*
* @param <b>password</b> password of the user
*/
public void setPassword(String password) {
this.password = password;
}
/**
* Gets the user's role
*
* @return <b>String</b> role of the user - Possible values are user, owner
* and admin
*/
public String getRole() {
return role;
}
/**
* Sets the user's role
*
* @param <b>role</b> role of the user - Possible values are user, owner and
* admin
*/
public void setRole(String role) {
this.role = role;
}
/**
* Gets the user's credit card provider name
*
* @return <b>String</b> credit card provider
*/
public String getCardProvider() {
return cardProvider;
}
/**
* Sets the user's credit card provider name
*
* @param <b>cardProvider</b> credit card provider
*/
public void setCardProvider(String cardProvider) {
this.cardProvider = cardProvider;
}
/**
* Gets the credit card number
*
* @return <b>String</b> user's credit card number
*/
public String getCardNumber() {
return cardNumber;
}
/**
* Sets the credit card number
*
* @param <b>cardNumber</b> credit card number
*/
public void setCardNumber(String cardNumber) {
this.cardNumber = cardNumber;
}
/**
* Gets the credit card expiry date
*
* @return <b>String</b> credit card expiry date
*/
public String getCardExpiryDate() {
return cardExpiryDate;
}
/**
* Sets the credit card expiry date
*
* @param <b>cardExpiryDate</b> credit card expiry date
*/
public void setCardExpiryDate(String cardExpiryDate) {
this.cardExpiryDate = cardExpiryDate;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -