📄 basescity.java
字号:
package cn.hope.front.pojo.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the s_city table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="s_city"
*/
public abstract class BaseSCity implements Serializable {
public static String REF = "SCity";
public static String PROP_FLAG = "flag";
public static String PROP_SC_NAME = "scName";
// constructors
public BaseSCity () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseSCity (java.lang.Integer scId) {
this.setScId(scId);
initialize();
}
/**
* Constructor for required fields
*/
public BaseSCity (
java.lang.Integer scId,
java.lang.String scName) {
this.setScId(scId);
this.setScName(scName);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer scId;
// fields
private java.lang.String flag;
private java.lang.String scName;
// many to one
private cn.hope.front.pojo.SProvin sProvin;
// collections
private java.util.Set students;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="identity"
* column="sc_id"
*/
public java.lang.Integer getScId () {
return scId;
}
/**
* Set the unique identifier of this class
* @param scId the new ID
*/
public void setScId (java.lang.Integer scId) {
this.scId = scId;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: flag
*/
public java.lang.String getFlag () {
return flag;
}
/**
* Set the value related to the column: flag
* @param flag the flag value
*/
public void setFlag (java.lang.String flag) {
this.flag = flag;
}
/**
* Return the value associated with the column: sc_name
*/
public java.lang.String getScName () {
return scName;
}
/**
* Set the value related to the column: sc_name
* @param scName the sc_name value
*/
public void setScName (java.lang.String scName) {
this.scName = scName;
}
/**
* Return the value associated with the column: s_pid
*/
public cn.hope.front.pojo.SProvin getSProvin () {
return sProvin;
}
/**
* Set the value related to the column: s_pid
* @param sProvin the s_pid value
*/
public void setSProvin (cn.hope.front.pojo.SProvin sProvin) {
this.sProvin = sProvin;
}
/**
* Return the value associated with the column: students
*/
public java.util.Set getStudents () {
return students;
}
/**
* Set the value related to the column: students
* @param students the students value
*/
public void setStudents (java.util.Set students) {
this.students = students;
}
public void addTostudents (cn.hope.front.pojo.Student student) {
if (null == getStudents()) setStudents(new java.util.HashSet());
getStudents().add(student);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof cn.hope.front.pojo.SCity)) return false;
else {
cn.hope.front.pojo.SCity sCity = (cn.hope.front.pojo.SCity) obj;
if (null == this.getScId() || null == sCity.getScId()) return false;
else return (this.getScId().equals(sCity.getScId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getScId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getScId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -