user.java
来自「Hibernate (著译者: 陈天河等)项目开发宝典本书以Hibernate为」· Java 代码 · 共 97 行
JAVA
97 行
package cn.hxex.tools.model;
import java.util.HashSet;
import java.util.Set;
/**
* The User
*
* @hibernate.class
* table="USERINFO"
*/
public class User implements java.io.Serializable
{
/**
* @hibernate.id
* generator-class="uuid.hex"
* column="ID"
*/
private String id;
/**
* @hibernate.property
* column="NAME"
*/
private String name;
/**
* @hibernate.property
* column="PASSWORD"
*/
private String password;
/**
* @hibernate.many-to-one
* column="USER_ID"
* cascade="save-update"
* unique="true"
*/
private Set messages = new HashSet(0);
/** default constructor */
public User()
{
}
/** full constructor */
public User(String name, String password, Set messages)
{
this.name = name;
this.password = password;
this.messages = messages;
}
public String getId()
{
return this.id;
}
public void setId(String id)
{
this.id = id;
}
public String getName()
{
return this.name;
}
public void setName(String name)
{
this.name = name;
}
public String getPassword()
{
return this.password;
}
public void setPassword(String password)
{
this.password = password;
}
public Set getMessages()
{
return this.messages;
}
public void setMessages(Set messages)
{
this.messages = messages;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?