📄 basekind.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 kind table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="kind"
*/
public abstract class BaseKind implements Comparable, Serializable {
public static String REF = "Kind";
public static String PROP_KIND_DESC = "KindDesc";
public static String PROP_KIND_NAME = "KindName";
public static String PROP_ID = "Id";
// constructors
public BaseKind () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseKind (java.lang.Integer id) {
this.setId(id);
initialize();
}
/**
* Constructor for required fields
*/
public BaseKind (
java.lang.Integer id,
java.lang.String kindName,
java.lang.String kindDesc) {
this.setId(id);
this.setKindName(kindName);
this.setKindDesc(kindDesc);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer id;
// fields
private java.lang.String kindName;
private java.lang.String kindDesc;
// collections
private java.util.Set items = new HashSet();
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="increment"
* column="kind_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: kind_name
*/
public java.lang.String getKindName () {
return kindName;
}
/**
* Set the value related to the column: kind_name
* @param kindName the kind_name value
*/
public void setKindName (java.lang.String kindName) {
this.kindName = kindName;
}
/**
* Return the value associated with the column: kind_desc
*/
public java.lang.String getKindDesc () {
return kindDesc;
}
/**
* Set the value related to the column: kind_desc
* @param kindDesc the kind_desc value
*/
public void setKindDesc (java.lang.String kindDesc) {
this.kindDesc = kindDesc;
}
/**
* Return the value associated with the column: Items
*/
public java.util.Set getItems () {
return items;
}
/**
* Set the value related to the column: Items
* @param items the Items value
*/
public void setItems (java.util.Set items) {
this.items = items;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof org.yeeku.model.Kind)) return false;
else {
org.yeeku.model.Kind kind = (org.yeeku.model.Kind) obj;
if (null == this.getId() || null == kind.getId()) return false;
else return (this.getId().equals(kind.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 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 + -