📄 questionform.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package org.lxh.myzngt.struts.form;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
/**
* MyEclipse Struts Creation date: 07-01-2007
*
* XDoclet definition:
*
* @struts.form name="questionForm"
*/
public class QuestionForm extends ActionForm {
/*
* Generated fields
*/
/** qid property */
private String qid;
/** questiontime property */
private String questiontime;
/** commenflag property */
private String commenflag;
/** title property */
private String title;
/** content property */
private String content;
/** status property */
private String status;
/** grade property */
private String grade;
/** itemid property */
private String itemid;
/** subid property */
private String subid;
/** userid property */
private String userid;
/** acceptflag property */
private String acceptflag;
/** offerscore property */
private String offerscore;
/** clickcount property */
private String clickcount;
private String checkcode;
private int type;
// 1:表示进行增加操作
// 2:表示查看问题
/*
* Generated Methods
*/
/**
* Method validate
*
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (type == 1) {
if (this.title == null || "".equals(this.title)) {
errors.add("title", new ActionMessage("question.title.null"));
}
if (this.content == null || "".equals(this.content)) {
errors.add("content",
new ActionMessage("question.content.null"));
}
if (!(this.offerscore == null || "".equals(this.offerscore))) {
if (!this.offerscore.matches("\\d*")) {
errors.add("offerscore", new ActionMessage(
"question.offerscore.error"));
}
}
if (this.checkcode == null || "".equals(this.checkcode)) {
errors.add("checkcode", new ActionMessage("checkcode.null"));
}
if (this.offerscore == null || "".equals(this.offerscore)) {
this.offerscore = "5";
}
}
/*
if (type == 2) {
if (this.qid == null || "".equals(this.qid)) {
errors.add("qid", new ActionMessage("question.qid.null"));
}
}
*/
return errors;
}
/**
* Method reset
*
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
/**
* Returns the qid.
*
* @return String
*/
public String getQid() {
return qid;
}
/**
* Set the qid.
*
* @param qid
* The qid to set
*/
public void setQid(String qid) {
this.qid = qid;
}
/**
* Returns the questiontime.
*
* @return String
*/
public String getQuestiontime() {
return questiontime;
}
/**
* Set the questiontime.
*
* @param questiontime
* The questiontime to set
*/
public void setQuestiontime(String questiontime) {
this.questiontime = questiontime;
}
/**
* Returns the commenflag.
*
* @return String
*/
public String getCommenflag() {
return commenflag;
}
/**
* Set the commenflag.
*
* @param commenflag
* The commenflag to set
*/
public void setCommenflag(String commenflag) {
this.commenflag = commenflag;
}
/**
* Returns the title.
*
* @return String
*/
public String getTitle() {
return title;
}
/**
* Set the title.
*
* @param title
* The title to set
*/
public void setTitle(String title) {
this.title = title;
}
/**
* Returns the content.
*
* @return String
*/
public String getContent() {
return content;
}
/**
* Set the content.
*
* @param content
* The content to set
*/
public void setContent(String content) {
this.content = content;
}
/**
* Returns the status.
*
* @return String
*/
public String getStatus() {
return status;
}
/**
* Set the status.
*
* @param status
* The status to set
*/
public void setStatus(String status) {
this.status = status;
}
/**
* Returns the grade.
*
* @return String
*/
public String getGrade() {
return grade;
}
/**
* Set the grade.
*
* @param grade
* The grade to set
*/
public void setGrade(String grade) {
this.grade = grade;
}
/**
* Returns the itemid.
*
* @return String
*/
public String getItemid() {
return itemid;
}
/**
* Set the itemid.
*
* @param itemid
* The itemid to set
*/
public void setItemid(String itemid) {
this.itemid = itemid;
}
/**
* Returns the subid.
*
* @return String
*/
public String getSubid() {
return subid;
}
/**
* Set the subid.
*
* @param subid
* The subid to set
*/
public void setSubid(String subid) {
this.subid = subid;
}
/**
* Returns the userid.
*
* @return String
*/
public String getUserid() {
return userid;
}
/**
* Set the userid.
*
* @param userid
* The userid to set
*/
public void setUserid(String userid) {
this.userid = userid;
}
/**
* Returns the acceptflag.
*
* @return String
*/
public String getAcceptflag() {
return acceptflag;
}
/**
* Set the acceptflag.
*
* @param acceptflag
* The acceptflag to set
*/
public void setAcceptflag(String acceptflag) {
this.acceptflag = acceptflag;
}
/**
* Returns the offerscore.
*
* @return String
*/
public String getOfferscore() {
return offerscore;
}
/**
* Set the offerscore.
*
* @param offerscore
* The offerscore to set
*/
public void setOfferscore(String offerscore) {
this.offerscore = offerscore;
}
/**
* Returns the clickcount.
*
* @return String
*/
public String getClickcount() {
return clickcount;
}
/**
* Set the clickcount.
*
* @param clickcount
* The clickcount to set
*/
public void setClickcount(String clickcount) {
this.clickcount = clickcount;
}
public String getCheckcode() {
return checkcode;
}
public void setCheckcode(String checkcode) {
this.checkcode = checkcode;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -