|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
关于第二点:俺问问你,如果是企业级项目的话,诸如RMI,EJB,等一些关键技术,这些难道都不需要学么?如果光是使用jsp,servlet,javabean的话。
在Hibernate中关于java.util.Date范例的映照为:
java范例Hibernate范例Mysql范例java.util.Date、java.sql.DatedateDATEjava.util.Date、java.sql.TimetimeTIMEjava.util.Date、java.sql.TimestamptimestampTIMESTAMP
假如利用timestamp作为Date范例映照时,详细代码以下:
Java代码
public class User {
private String userPK;
private String userID;
private String password;
private String nickname;
private boolean state;
private boolean role;
private Date registerDate;
private int points;
public String getUserPK() {
return userPK;
}
private void setUserPK(String userPK) {
this.userPK = userPK;
}
public String getUserID() {
return userID;
}
public void setUserID(String userID) {
this.userID = userID;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public Date getRegisterDate() {
return registerDate;
}
public void setRegisterDate(Date registerDate) {
this.registerDate = registerDate;
}
public int getPoints() {
return points;
}
public void setPoints(int points) {
this.points = points;
}
public void setState(boolean state) {
this.state = state;
}
public boolean getState(){
return this.state;
}
public void setRole(boolean role) {
this.role = role;
}
public boolean getRole(){
return this.role;
}
}
<p>
在ruby里才是一切皆对象。当然我不并不是很了解ruby,但是ruby确实是将语法简化得很好。 |
|