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

📄 basecourse.java

📁 Extjs2增删改查
💻 JAVA
字号:
package com.tcg.demo.bean.base;

import com.tcg.demo.bean.Course;

import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2008-10-29
 * Time: 21:45:20
 * To change this template use File | Settings | File Templates.
 */
public abstract class BaseCourse  implements Serializable {

	public static String REF = "Course";
	public static String PROP_TEACHER = "teacher";
	public static String PROP_COURSE = "course";
	public static String PROP_ID = "id";
	public static String PROP_CREDITHOUR = "credithour";
	public static String PROP_STUDENTNUM = "studentnum";


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

	/**
	 * Constructor for primary key
	 */
	public BaseCourse (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.lang.String course;

	private java.lang.String teacher;

	private java.lang.Long credithour;

	private java.lang.Long studentnum;




	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="com.tcg.core.LongIdGenerator"
     *  column="id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 * @deprecated
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: course
	 */

	public java.lang.String getCourse () {
		return course;
	}

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


	/**
	 * Return the value associated with the column: teacher
	 */

	public java.lang.String getTeacher () {
		return teacher;
	}

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


	/**
	 * Return the value associated with the column: credithour
	 */

	public java.lang.Long getCredithour () {
		return credithour;
	}

	/**
	 * Set the value related to the column: credithour
	 * @param credithour the credithour value
	 */
	public void setCredithour (java.lang.Long credithour) {
		this.credithour = credithour;
	}


	/**
	 * Return the value associated with the column: studentnum
	 */

	public java.lang.Long getStudentnum () {
		return studentnum;
	}

	/**
	 * Set the value related to the column: studentnum
	 * @param studentnum the studentnum value
	 */
	public void setStudentnum (java.lang.Long studentnum) {
		this.studentnum = studentnum;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof Course)) return false;
		else {
			Course course = (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 () {
		org.apache.commons.lang.builder.ToStringBuilder builder = new org.apache.commons.lang.builder.ToStringBuilder(this);
		builder.append(id);
		builder.append(course);
		builder.append(teacher);
		builder.append(credithour);
		builder.append(studentnum);
		return builder.toString();
	}


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -