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

📄 basestudent.java

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

import java.io.Serializable;


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

public abstract class BaseStudent  implements Serializable {

	public static String REF = "Student";
	public static String PROP_PASSWORD = "Password";
	public static String PROP_SEX = "Sex";
	public static String PROP_EMAIL = "Email";
	public static String PROP_IMAGE = "image";
	public static String PROP_MARK = "Mark";
	public static String PROP_TEL = "Tel";
	public static String PROP_JIGUAN = "Jiguan";
	public static String PROP_GIF_ADD = "GifAdd";
	public static String PROP_NAME = "Name";
	public static String PROP_DEPARTMENT = "Department";
	public static String PROP_ID = "Id";
	public static String PROP_PHONE = "Phone";


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

	/**
	 * Constructor for primary key
	 */
	public BaseStudent (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 jiguan;
	private java.lang.String department;
	private java.lang.String sex;
	private java.lang.Integer mark;
	private java.lang.String tel;
	private java.lang.String phone;
	private java.lang.String email;
	private java.lang.String gifAdd;
	private byte[] image;

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

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



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

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



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

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



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

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



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

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



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

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



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

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



	/**
	 * Return the value associated with the column: image
	 */
	public byte[] getImage () {
		return image;
	}

	/**
	 * Set the value related to the column: image
	 * @param image the image value
	 */
	public void setImage (byte[] image) {
		this.image = image;
	}



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