📄 deal.java
字号:
package entity;
import java.util.Date;
/**
* Deal generated by MyEclipse Persistence Tools
*/
public class Deal implements java.io.Serializable {
// Fields
private Integer dealId;
private UserInfo userInfo;
private Service service;
private String dealMethod;
private Date managerDatetime=this.getNow() ;
// Constructors
/** default constructor */
public Deal() {
}
/** minimal constructor */
public Deal(UserInfo userInfo, Service service, Date managerDatetime) {
this.userInfo = userInfo;
this.service = service;
this.managerDatetime = managerDatetime;
}
/** full constructor */
public Deal(UserInfo userInfo, Service service, String dealMethod,
Date managerDatetime) {
this.userInfo = userInfo;
this.service = service;
this.dealMethod = dealMethod;
this.managerDatetime = managerDatetime;
}
// Property accessors
public Integer getDealId() {
return this.dealId;
}
public void setDealId(Integer dealId) {
this.dealId = dealId;
}
public UserInfo getUserInfo() {
return this.userInfo;
}
public void setUserInfo(UserInfo userInfo) {
this.userInfo = userInfo;
}
public Service getService() {
return this.service;
}
public void setService(Service service) {
this.service = service;
}
public String getDealMethod() {
return this.dealMethod;
}
public void setDealMethod(String dealMethod) {
this.dealMethod = dealMethod;
}
public Date getManagerDatetime() {
return this.managerDatetime;
}
public void setManagerDatetime(Date managerDatetime) {
this.managerDatetime = managerDatetime;
}
private static String getDate (int oldyear,int oldmonth,int oldday) {
int year = oldyear + 1900;
int month = oldmonth + 1;
int day = oldday;
char buf[] = "2000-00-00".toCharArray();
buf[0] = Character.forDigit(year/1000,10);
buf[1] = Character.forDigit((year/100)%10,10);
buf[2] = Character.forDigit((year/10)%10,10);
buf[3] = Character.forDigit(year%10,10);
buf[5] = Character.forDigit(month/10,10);
buf[6] = Character.forDigit(month%10,10);
buf[8] = Character.forDigit(day/10,10);
buf[9] = Character.forDigit(day%10,10);
return new String(buf);
}
private static java.sql.Date getNow(){
java.util.Calendar now = java.util.Calendar.getInstance();
String date = getDate(now.getTime().getYear(),now.getTime().getMonth(),now.getTime().getDate());
return java.sql.Date.valueOf(date);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -