📄 guestbook.java
字号:
/*
* @author : Neelesh
* @Version : 1.0
*
* Development Environment : Oracle9i JDeveloper
* Name of the File : Guestbook.java
* Creation/Modification History :
*
* Neelesh 03-Oct-2002 Created
*
*/
package oracle.otnsamples.vsm.services.data;
import java.util.Date;
/**
* This is a value object, which also serves as an ActionForm for JSPs. Should
* the MVC implementation change anytime,the class needs to be modified by
* removing the inheritence from ActionForm class. The class is a value object
* for guestbook, and has getters and setters for username,id,
* comments,email,rating,commentdate.
*
* @author Neelesh
* @version 1.0
*/
public class Guestbook implements java.io.Serializable {
private Date commentDate; // date of entry
private String comments; // comment text
private String email; // email of user
private String id; // unique id
private String langId; //language id
private String rating; // rating, 1-excellent,2-good,3-poor
private String userName; // user who entered comment
/**
* Default constructor
*/
public Guestbook() {
}
/**
* Constructor with initializers
*
* @param <b>id</b> - String id
* @param <b>userName</b> String user name
* @param <b>email</b> - String email id
* @param <b>rating</b> String rating- 1-excellent,2-good,3-poor
* @param <b>comments</b> String comments
* @param <b>commentDate</b> Date of entry
* @param <b>langId</b> Language id
*/
public Guestbook(
String id, String userName, String email, String rating,
String comments, Date commentDate, String langId) {
this.id = id;
this.userName = userName;
this.email = email;
this.rating = rating;
this.comments = comments;
this.commentDate = commentDate;
this.langId = langId;
}
/**
* Gets the rating of the user
*
* @return <b>String</b> -rating, 1-excellent,2-good,3-poor
*/
public String getRating() {
return rating;
}
/**
* Gets the date of entry
*
* @return <b>Date</b> -date of entry
*/
public Date getCommentDate() {
return commentDate;
}
/**
* Gets the comments of the user
*
* @return <b>String </b> -comments
*/
public String getComments() {
return comments;
}
/**
* Sets the user name
*
* @param <b>userName</b> user name
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
* Gets the email of the user
*
* @return <b>String </b> -email of the user
*/
public String getEmail() {
return email;
}
/**
* sets the email of the user
*
* @param <b>newEmail</b> -email of the user
*/
public void setEmail(String newEmail) {
email = newEmail;
}
/**
* Sets the rating of the user
*
* @param <b>newRating</b> -rating, 1-excellent,2-good,3-poor
*/
public void setRating(String newRating) {
rating = newRating;
}
/**
* Sets the date of entry
*
* @param <b>commentDate</b> -date of entry
*/
public void setCommentDate(Date commentDate) {
this.commentDate = commentDate;
}
/**
* Gets the entry id
*
* @return <b> String </b> - id
*/
public String getId() {
return id;
}
/**
* Sets the comments from the user
*
* @param <b>comments</b> comments from user
*/
public void setComments(String newComments) {
comments = newComments;
}
/**
* Sets the entry id
*
* @param <b> newId</b> - id
*/
public void setId(String newId) {
id = newId;
}
/**
* Sets the language id
*
* @param <b>id</b> id
*/
public void setLangId(String id) {
langId = id;
}
/**
* Gets the user name
*
* @return <b>String </b> -user name
*/
public String getUserName() {
return userName;
}
/**
* Gets the language id
*
* @return <b>String</b> id
*/
public String getLangId() {
return langId;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -