📄 baseadmin.java
字号:
package hibernate.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the admin table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="admin"
*/
public abstract class BaseAdmin implements Serializable {
public static String REF = "Admin";
public static String PROP_PASSWORD = "Password";
public static String PROP_SEX = "Sex";
public static String PROP_BIRTHDAY = "Birthday";
public static String PROP_EMAIL = "Email";
public static String PROP_TELEPHONE = "Telephone";
public static String PROP_NAME = "Name";
public static String PROP_AGE = "Age";
public static String PROP_ID = "Id";
// constructors
public BaseAdmin () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseAdmin (java.lang.Integer id) {
this.setId(id);
initialize();
}
/**
* Constructor for required fields
*/
public BaseAdmin (
java.lang.Integer id,
java.lang.String name,
java.lang.String password,
java.lang.String telephone,
java.lang.String email,
java.lang.String sex) {
this.setId(id);
this.setName(name);
this.setPassword(password);
this.setTelephone(telephone);
this.setEmail(email);
this.setSex(sex);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer id;
// fields
private java.lang.String name;
private java.lang.String password;
private java.lang.String telephone;
private java.lang.String email;
private java.lang.String sex;
private java.lang.Integer age;
private java.util.Date birthday;
// collections
private java.util.Set favorites;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="identity"
* column="id"
*/
public java.lang.Integer getId () {
return id;
}
/**
* Set the unique identifier of this class
* @param id the new ID
*/
public void setId (java.lang.Integer id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: name
*/
public java.lang.String getName () {
return name;
}
/**
* Set the value related to the column: name
* @param name the name value
*/
public void setName (java.lang.String name) {
this.name = name;
}
/**
* Return the value associated with the column: password
*/
public java.lang.String getPassword () {
return password;
}
/**
* Set the value related to the column: password
* @param password the password value
*/
public void setPassword (java.lang.String password) {
this.password = password;
}
/**
* Return the value associated with the column: telephone
*/
public java.lang.String getTelephone () {
return telephone;
}
/**
* Set the value related to the column: telephone
* @param telephone the telephone value
*/
public void setTelephone (java.lang.String telephone) {
this.telephone = telephone;
}
/**
* Return the value associated with the column: email
*/
public java.lang.String getEmail () {
return email;
}
/**
* Set the value related to the column: email
* @param email the email value
*/
public void setEmail (java.lang.String email) {
this.email = email;
}
/**
* Return the value associated with the column: sex
*/
public java.lang.String getSex () {
return sex;
}
/**
* Set the value related to the column: sex
* @param sex the sex value
*/
public void setSex (java.lang.String sex) {
this.sex = sex;
}
/**
* Return the value associated with the column: age
*/
public java.lang.Integer getAge () {
return age;
}
/**
* Set the value related to the column: age
* @param age the age value
*/
public void setAge (java.lang.Integer age) {
this.age = age;
}
/**
* Return the value associated with the column: birthday
*/
public java.util.Date getBirthday () {
return birthday;
}
/**
* Set the value related to the column: birthday
* @param birthday the birthday value
*/
public void setBirthday (java.util.Date birthday) {
this.birthday = birthday;
}
/**
* Return the value associated with the column: Favorites
*/
public java.util.Set getFavorites () {
return favorites;
}
/**
* Set the value related to the column: Favorites
* @param favorites the Favorites value
*/
public void setFavorites (java.util.Set favorites) {
this.favorites = favorites;
}
public void addToFavorites (hibernate.Favorites favorites) {
if (null == getFavorites()) setFavorites(new java.util.TreeSet());
getFavorites().add(favorites);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof hibernate.Admin)) return false;
else {
hibernate.Admin admin = (hibernate.Admin) obj;
if (null == this.getId() || null == admin.getId()) return false;
else return (this.getId().equals(admin.getId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -