⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 baseclasses.java

📁 jsp例程
💻 JAVA
字号:
package hibernate.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the classes table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="classes"
 */

public abstract class BaseClasses  implements Serializable {

	public static String REF = "Classes";
	public static String PROP_TEACHER = "teacher";
	public static String PROP_COURSE = "course";
	public static String PROP_COUR_TIME = "CourTime";
	public static String PROP_ROOM_ID = "RoomId";
	public static String PROP_ID = "Id";


	// constructors
	public BaseClasses () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseClasses (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 roomId;
	private java.lang.String courTime;

	// many to one
	private hibernate.Teacher teacher;
	private hibernate.Course course;

	// collections
	private java.util.Set<hibernate.Enrol> enrols;



	/**
	 * 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: room_id
	 */
	public java.lang.String getRoomId () {
		return roomId;
	}

	/**
	 * Set the value related to the column: room_id
	 * @param roomId the room_id value
	 */
	public void setRoomId (java.lang.String roomId) {
		this.roomId = roomId;
	}



	/**
	 * Return the value associated with the column: cour_time
	 */
	public java.lang.String getCourTime () {
		return courTime;
	}

	/**
	 * Set the value related to the column: cour_time
	 * @param courTime the cour_time value
	 */
	public void setCourTime (java.lang.String courTime) {
		this.courTime = courTime;
	}



	/**
	 * Return the value associated with the column: tea_id
	 */
	public hibernate.Teacher getTeacher () {
		return teacher;
	}

	/**
	 * Set the value related to the column: tea_id
	 * @param teacher the tea_id value
	 */
	public void setTeacher (hibernate.Teacher teacher) {
		this.teacher = teacher;
	}



	/**
	 * Return the value associated with the column: cour_id
	 */
	public hibernate.Course getCourse () {
		return course;
	}

	/**
	 * Set the value related to the column: cour_id
	 * @param course the cour_id value
	 */
	public void setCourse (hibernate.Course course) {
		this.course = course;
	}



	/**
	 * Return the value associated with the column: enrols
	 */
	public java.util.Set<hibernate.Enrol> getEnrols () {
		return enrols;
	}

	/**
	 * Set the value related to the column: enrols
	 * @param enrols the enrols value
	 */
	public void setEnrols (java.util.Set<hibernate.Enrol> enrols) {
		this.enrols = enrols;
	}

	public void addToenrols (hibernate.Enrol enrol) {
		if (null == getEnrols()) setEnrols(new java.util.TreeSet<hibernate.Enrol>());
		getEnrols().add(enrol);
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof hibernate.Classes)) return false;
		else {
			hibernate.Classes classes = (hibernate.Classes) obj;
			if (null == this.getId() || null == classes.getId()) return false;
			else return (this.getId().equals(classes.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 + -