📄 baseauctionuser.java
字号:
package org.yeeku.model.base;
import java.lang.Comparable;
import java.io.Serializable;
import java.util.HashSet;
/**
* This is an object that contains data related to the auction_user table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="auction_user"
*/
public abstract class BaseAuctionUser implements Comparable, Serializable {
public static String REF = "AuctionUser";
public static String PROP_USERPASS = "Userpass";
public static String PROP_EMAIL = "Email";
public static String PROP_ID = "Id";
public static String PROP_USERNAME = "Username";
// constructors
public BaseAuctionUser () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseAuctionUser (java.lang.Integer id) {
this.setId(id);
initialize();
}
/**
* Constructor for required fields
*/
public BaseAuctionUser (
java.lang.Integer id,
java.lang.String username,
java.lang.String userpass,
java.lang.String email) {
this.setId(id);
this.setUsername(username);
this.setUserpass(userpass);
this.setEmail(email);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer id;
// fields
private java.lang.String username;
private java.lang.String userpass;
private java.lang.String email;
// collections
private java.util.Set itemsByOwner = new HashSet();
private java.util.Set itemsByWiner = new HashSet();
private java.util.Set bids = new HashSet();
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="increment"
* column="user_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: username
*/
public java.lang.String getUsername () {
return username;
}
/**
* Set the value related to the column: username
* @param username the username value
*/
public void setUsername (java.lang.String username) {
this.username = username;
}
/**
* Return the value associated with the column: userpass
*/
public java.lang.String getUserpass () {
return userpass;
}
/**
* Set the value related to the column: userpass
* @param userpass the userpass value
*/
public void setUserpass (java.lang.String userpass) {
this.userpass = userpass;
}
/**
* 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: ItemsByOwner
*/
public java.util.Set getItemsByOwner () {
return itemsByOwner;
}
/**
* Set the value related to the column: ItemsByOwner
* @param itemsByOwner the ItemsByOwner value
*/
public void setItemsByOwner (java.util.Set itemsByOwner) {
this.itemsByOwner = itemsByOwner;
}
/**
* Return the value associated with the column: ItemsByWiner
*/
public java.util.Set getItemsByWiner () {
return itemsByWiner;
}
/**
* Set the value related to the column: ItemsByWiner
* @param itemsByWiner the ItemsByWiner value
*/
public void setItemsByWiner (java.util.Set itemsByWiner) {
this.itemsByWiner = itemsByWiner;
}
/**
* Return the value associated with the column: Bids
*/
public java.util.Set getBids () {
return bids;
}
/**
* Set the value related to the column: Bids
* @param bids the Bids value
*/
public void setBids (java.util.Set bids) {
this.bids = bids;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof org.yeeku.model.AuctionUser)) return false;
else {
org.yeeku.model.AuctionUser auctionUser = (org.yeeku.model.AuctionUser) obj;
if (null == this.getUsername() || null == auctionUser.getUsername()
|| null == this.getUserpass() || null == auctionUser.getUserpass()) return false;
else return (this.getUsername().equals(auctionUser.getUsername())
&& this.getUserpass().equals(auctionUser.getUserpass()));
}
}
public int hashCode () {
return username.hashCode() + userpass.hashCode();
}
public int compareTo (Object obj) {
if (obj.hashCode() > hashCode()) return 1;
else if (obj.hashCode() < hashCode()) return -1;
else return 0;
}
public String toString () {
return super.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -