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

📄 basetfile.java

📁 持久层hibernate技术使用的一个例子
💻 JAVA
字号:
package cn.hope.front.pojo.base;

import java.io.Serializable;


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

public abstract class BaseTFile  implements Serializable {

	public static String REF = "TFile";
	public static String PROP_FLAG = "flag";
	public static String PROP_TF_DTIMES = "tfDtimes";
	public static String PROP_TF_INTRO = "tfIntro";
	public static String PROP_TF_NAME = "tfName";
	public static String PROP_TF_PATH = "tfPath";
	public static String PROP_TF_TIME = "tfTime";
	public static String PROP_TF_SIZE = "tfSize";


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

	/**
	 * Constructor for primary key
	 */
	public BaseTFile (java.lang.Integer tfId) {
		this.setTfId(tfId);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseTFile (
		java.lang.Integer tfId,
		java.lang.String flag,
		java.lang.Integer tfDtimes,
		java.lang.String tfName,
		java.lang.String tfPath,
		java.util.Date tfTime,
		java.lang.Integer tfSize) {

		this.setTfId(tfId);
		this.setFlag(flag);
		this.setTfDtimes(tfDtimes);
		this.setTfName(tfName);
		this.setTfPath(tfPath);
		this.setTfTime(tfTime);
		this.setTfSize(tfSize);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer tfId;

	// fields
	private java.lang.String flag;
	private java.lang.Integer tfDtimes;
	private java.lang.String tfIntro;
	private java.lang.String tfName;
	private java.lang.String tfPath;
	private java.util.Date tfTime;
	private java.lang.Integer tfSize;

	// many to one
	private cn.hope.front.pojo.TFileType2 tFileType2;
	private cn.hope.front.pojo.TInfo tInfo;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="tf_id"
     */
	public java.lang.Integer getTfId () {
		return tfId;
	}

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




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

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



	/**
	 * Return the value associated with the column: tf_dtimes
	 */
	public java.lang.Integer getTfDtimes () {
		return tfDtimes;
	}

	/**
	 * Set the value related to the column: tf_dtimes
	 * @param tfDtimes the tf_dtimes value
	 */
	public void setTfDtimes (java.lang.Integer tfDtimes) {
		this.tfDtimes = tfDtimes;
	}



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

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



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

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



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

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



	/**
	 * Return the value associated with the column: tf_time
	 */
	public java.util.Date getTfTime () {
		return tfTime;
	}

	/**
	 * Set the value related to the column: tf_time
	 * @param tfTime the tf_time value
	 */
	public void setTfTime (java.util.Date tfTime) {
		this.tfTime = tfTime;
	}



	/**
	 * Return the value associated with the column: tf_size
	 */
	public java.lang.Integer getTfSize () {
		return tfSize;
	}

	/**
	 * Set the value related to the column: tf_size
	 * @param tfSize the tf_size value
	 */
	public void setTfSize (java.lang.Integer tfSize) {
		this.tfSize = tfSize;
	}



	/**
	 * Return the value associated with the column: tft2_id
	 */
	public cn.hope.front.pojo.TFileType2 getTFileType2 () {
		return tFileType2;
	}

	/**
	 * Set the value related to the column: tft2_id
	 * @param tFileType2 the tft2_id value
	 */
	public void setTFileType2 (cn.hope.front.pojo.TFileType2 tFileType2) {
		this.tFileType2 = tFileType2;
	}



	/**
	 * Return the value associated with the column: t_id
	 */
	public cn.hope.front.pojo.TInfo getTInfo () {
		return tInfo;
	}

	/**
	 * Set the value related to the column: t_id
	 * @param tInfo the t_id value
	 */
	public void setTInfo (cn.hope.front.pojo.TInfo tInfo) {
		this.tInfo = tInfo;
	}





	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof cn.hope.front.pojo.TFile)) return false;
		else {
			cn.hope.front.pojo.TFile tFile = (cn.hope.front.pojo.TFile) obj;
			if (null == this.getTfId() || null == tFile.getTfId()) return false;
			else return (this.getTfId().equals(tFile.getTfId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getTfId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getTfId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}

⌨️ 快捷键说明

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