?? noticeinfo.java
字號:
package com.x3408.notice;
import java.text.SimpleDateFormat;
import java.util.Date;
public class NoticeInfo {
private int noticeID;
private String caption;
private String content;
private String publisher;
private String publishTime;
private String planPubTime;
private String planDelTime;
public NoticeInfo(){
}
public NoticeInfo(String pNoticeID,String pCaption,String pContent,String pPublisher,String pPublishTime,String pPlanPubTime,String pPlanDelTime){
this.setNoticeID(pNoticeID);
this.setCaption(pCaption);
this.setContent(pContent);
this.setPublisher(pPublisher);
this.setPublishTime(pPublishTime);
this.setPlanPubTime(pPlanPubTime);
this.setPlanDelTime(pPlanDelTime);
}
public NoticeInfo(String pCaption,String pContent,String pPublisher,String pPlanPubTime,String pPlanDelTime){
this.setCaption(pCaption);
this.setContent(pContent);
this.setPublisher(pPublisher);
this.setPlanPubTime(pPlanPubTime);
this.setPlanDelTime(pPlanDelTime);
this.setPublishTime();
}
public NoticeInfo(String pNoticeID,String pCaption,String pContent,String pPublisher,String pPlanPubTime,String pPlanDelTime){
this(pCaption,pContent,pPublisher,pPlanPubTime,pPlanDelTime);
this.setNoticeID(pNoticeID);
}
public boolean isValid(){
if(this.caption==null||"".equals(this.caption)||this.publisher==null||"".equals(this.publisher)||this.publishTime==null||equals(this.publishTime)){
return false;
}
return true;
}
public int getNoticeID() {
return this.noticeID;
}
public String getCaption() {
return this.caption;
}
public String getContent() {
return this.content;
}
public String getPublisher() {
return this.publisher;
}
public String getPublishTime() {
return this.publishTime;
}
public String getPlanPubTime() {
return this.planPubTime;
}
public String getPlanDelTime() {
return this.planDelTime;
}
public void setNoticeID(String pNoticeID) {
try {
this.noticeID = Integer.parseInt(pNoticeID);
} catch (NumberFormatException e) {
e.printStackTrace();
}
}
public void setCaption(String pCaption) {
this.caption = pCaption;
}
public void setContent(String pContent) {
this.content = pContent;
}
public void setPublisher(String pPublisher) {
this.publisher = pPublisher;
}
public void setPublishTime(String pPublishTime) {
this.publishTime = pPublishTime;
}
public void setPublishTime() {
this.publishTime = new SimpleDateFormat("yyyy-MM-dd HH:mm")
.format(new Date());
}
public void setPlanPubTime(String pPlanPubTime) {
this.planPubTime=pPlanPubTime;
}
public void setPlanDelTime(String pPlanDelTime) {
this.planDelTime=pPlanDelTime;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -