📄 itrequest.java
字号:
/*
* ITRequest.java
*
* Created on January 18, 2007, 11:14 AM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package Wearnes;
import java.util.*;
/**
*
* @author dongliang.guo
*/
public class ITRequest {
/** Creates a new instance of ITRequest */
public static String itServiceEmail="itservice@wearnes.com";
private int req_id=0;
private String user_name="";
private String req_date="";
private String company="";
private String department="";
private String expected_completion_date;
private String category="";
private String item="";
private String description="";
private String process_status="";
private String completed_by="";
private String solution="";
private String impact="";
private int cost=0;
private String toBeApprovedBy="";
// private Collection<ITRequestObserver> observers;
private Vector observers;
private Vector observersProfile;
public ITRequest(
String user_name,
String req_date,
String company,
String department,
String category,
String item,
String description,
String impact,
String process_status,
String expected_date
) {
observers=new Vector();
observersProfile=new Vector();
this.user_name=user_name;
this.req_date=req_date;
this.company=company;
this.department=department;
this.category=category;
this.item=item;
this.description=description;
this.impact=impact;
this.process_status=process_status;
expected_completion_date=expected_date;
}
public void attachObserver(ObserverOfRequest o) {
observers.add(o);
}
public void detachObserver(ObserverOfRequest o) {
observers.remove(o);
}
public void setReq_id(int id) {
req_id=id;
}
public void setStatus(String s) {
process_status=s;
notifyAllRequestObserver();
}
public String getStatus() {
return process_status;
}
public void notifyAllRequestObserver() {
Iterator i=observers.iterator();
while(i.hasNext()) {
ObserverOfRequest ob=(ObserverOfRequest)i.next();
ob.updateOnRequestStatusChange(process_status);
}
}
public void setSolution(String sol) {
solution=sol;
}
public void setComleted_by(String compl) {
this.completed_by=compl;
}
public void setCost(int c) {
this.cost=c;
}
public int req_id() {
return req_id;
}
public String user_name() {
return user_name;
}
public String req_date() {
return req_date;
}
public String expected_completion_date() {
return expected_completion_date;
}
public String company() {
return company;
}
public String department() {
return department;
}
public String category() {
return category;
}
public String item() {
return item;
}
public int cost(){
return cost;
}
public String description() {
return description;
}
public String impact() {
return impact;
}
public String solution() {
return solution;
}
public String process_status() {
return process_status;
}
public String completed_by() {
return completed_by;
}
public void setCompleted_by(String cl) {
completed_by=cl;
}
public String toBeApprovedBy() {
return toBeApprovedBy;
}
public Vector observers() {
return observers;
}
public Vector observersProfile() {
return observersProfile;
}
public void attachObserversProfile(ObserverProfile profile) {
observersProfile.add(profile);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -