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

📄 basenspost.java

📁 一个成熟的论坛
💻 JAVA
字号:
package com.singnet.bean.base;

import java.lang.Comparable;
import java.io.Serializable;


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

public abstract class BaseNsPost  implements Comparable, Serializable {

	public static String REF = "NsPost";
	public static String PROP_POST_USER = "postUser";
	public static String PROP_POST_UTIME = "postUtime";
	public static String PROP_POST_TITLE = "postTitle";
	public static String PROP_POST_UID = "postUid";
	public static String PROP_POST_CTIME = "postCtime";
	public static String PROP_POST_PID = "postPid";
	public static String PROP_ID = "id";
	public static String PROP_POST_EDITOR = "postEditor";
	public static String PROP_POST_CONTENT = "postContent";


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

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

	/**
	 * Constructor for required fields
	 */
	public BaseNsPost (
		java.lang.Long id,
		java.lang.Long postPid,
		java.lang.String postUid,
		java.lang.String postUser,
		java.lang.String postTitle,
		java.lang.String postContent) {

		this.setId(id);
		this.setPostPid(postPid);
		this.setPostUid(postUid);
		this.setPostUser(postUser);
		this.setPostTitle(postTitle);
		this.setPostContent(postContent);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.Long postPid;
	private java.lang.String postUid;
	private java.lang.String postUser;
	private java.lang.String postTitle;
	private java.lang.String postContent;
	private java.util.Date postCtime;
	private java.util.Date postUtime;
	private java.lang.String postEditor;



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

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




	/**
	 * Return the value associated with the column: post_pid
	 */
	public java.lang.Long getPostPid () {
		return postPid;
	}

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



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

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



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

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



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

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



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

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



	/**
	 * Return the value associated with the column: post_ctime
	 */
	public java.util.Date getPostCtime () {
		return postCtime;
	}

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



	/**
	 * Return the value associated with the column: post_utime
	 */
	public java.util.Date getPostUtime () {
		return postUtime;
	}

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



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

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





	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.singnet.bean.NsPost)) return false;
		else {
			com.singnet.bean.NsPost nsPost = (com.singnet.bean.NsPost) obj;
			if (null == this.getId() || null == nsPost.getId()) return false;
			else return (this.getId().equals(nsPost.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 int compareTo (Object obj) {
		if (obj.hashCode() > hashCode()) return 1;
		else if (obj.hashCode() < hashCode()) return -1;
		else return 0;
	}

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


}

⌨️ 快捷键说明

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