📄 basecourse.java
字号:
package hibernate.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the course table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="course"
*/
public abstract class BaseCourse implements Serializable {
public static String REF = "Course";
public static String PROP_PREPARE = "Prepare";
public static String PROP_MARK = "Mark";
public static String PROP_DEP = "Dep";
public static String PROP_NAME = "Name";
public static String PROP_ID = "Id";
// constructors
public BaseCourse () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseCourse (java.lang.String id) {
this.setId(id);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.String id;
// fields
private java.lang.String name;
private java.lang.Integer mark;
private java.lang.String prepare;
private java.lang.String dep;
// collections
private java.util.Set<hibernate.Classes> classeses;
/**
* Return the unique identifier of this class
* @hibernate.id
* column="id"
*/
public java.lang.String getId () {
return id;
}
/**
* Set the unique identifier of this class
* @param id the new ID
*/
public void setId (java.lang.String 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: mark
*/
public java.lang.Integer getMark () {
return mark;
}
/**
* Set the value related to the column: mark
* @param mark the mark value
*/
public void setMark (java.lang.Integer mark) {
this.mark = mark;
}
/**
* Return the value associated with the column: prepare
*/
public java.lang.String getPrepare () {
return prepare;
}
/**
* Set the value related to the column: prepare
* @param prepare the prepare value
*/
public void setPrepare (java.lang.String prepare) {
this.prepare = prepare;
}
/**
* Return the value associated with the column: dep
*/
public java.lang.String getDep () {
return dep;
}
/**
* Set the value related to the column: dep
* @param dep the dep value
*/
public void setDep (java.lang.String dep) {
this.dep = dep;
}
/**
* Return the value associated with the column: Classeses
*/
public java.util.Set<hibernate.Classes> getClasseses () {
return classeses;
}
/**
* Set the value related to the column: Classeses
* @param classeses the Classeses value
*/
public void setClasseses (java.util.Set<hibernate.Classes> classeses) {
this.classeses = classeses;
}
public void addToClasseses (hibernate.Classes classes) {
if (null == getClasseses()) setClasseses(new java.util.TreeSet<hibernate.Classes>());
getClasseses().add(classes);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof hibernate.Course)) return false;
else {
hibernate.Course course = (hibernate.Course) obj;
if (null == this.getId() || null == course.getId()) return false;
else return (this.getId().equals(course.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 + -