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

📄 baseteacher.java

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

import java.io.Serializable;


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

public abstract class BaseTeacher  implements Serializable {

	public static String REF = "Teacher";
	public static String PROP_PASSWORD = "Password";
	public static String PROP_TITLE = "Title";
	public static String PROP_NAME = "Name";
	public static String PROP_ID = "Id";


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

	/**
	 * Constructor for primary key
	 */
	public BaseTeacher (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.String password;
	private java.lang.String title;

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

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



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

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



	/**
	 * 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.Teacher)) return false;
		else {
			hibernate.Teacher teacher = (hibernate.Teacher) obj;
			if (null == this.getId() || null == teacher.getId()) return false;
			else return (this.getId().equals(teacher.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 + -