📄 basearticle.java
字号:
package com.redsaga.hibnatesample.step1.synchronizer.base;
import java.io.Serializable;
/**
* This class has been automatically generated by Hibernate Synchronizer. * For more information or documentation, visit The Hibernate Synchronizer page * at http://www.binamics.com/hibernatesync or contact Joe Hudson at joe@binamics.com. * * This is an object that contains data related to the article table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="article"
*/
public abstract class BaseArticle implements Serializable {
public static String PROP_ARTICLE_TYPE = "articleType";
public static String PROP_HITS = "hits";
public static String PROP_LAST_UPDATE_BY = "lastUpdateBy";
public static String PROP_BYTES = "bytes";
public static String PROP_CREATE_TIME = "createTime";
public static String PROP_PARENT = "parent";
public static String PROP_CREATE_BY = "createBy";
public static String PROP_LAST_UPDATE_TIME = "lastUpdateTime";
public static String PROP_BOARD = "board";
public static String PROP_BODY = "body";
public static String PROP_TITLE = "title";
public static String PROP_ID = "id";
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer _id;
// fields
private java.util.Date _lastUpdateTime;
private java.util.Date _createTime;
private java.lang.String _title;
private java.lang.Integer _hits;
private java.lang.Integer _articleType;
private java.lang.Integer _bytes;
private java.lang.String _body;
// many to one
private com.redsaga.hibnatesample.step1.synchronizer.User _createBy;
private com.redsaga.hibnatesample.step1.synchronizer.Article _parent;
private com.redsaga.hibnatesample.step1.synchronizer.Board _board;
private com.redsaga.hibnatesample.step1.synchronizer.User _lastUpdateBy;
// collections
private java.util.Set _set;
// constructors
public BaseArticle () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseArticle (java.lang.Integer _id) {
this.setId(_id);
initialize();
}
/**
* Constructor for required fields
*/
public BaseArticle (
java.lang.Integer _id,
com.redsaga.hibnatesample.step1.synchronizer.User _createBy,
com.redsaga.hibnatesample.step1.synchronizer.Article _parent,
com.redsaga.hibnatesample.step1.synchronizer.Board _board,
com.redsaga.hibnatesample.step1.synchronizer.User _lastUpdateBy,
java.util.Date _lastUpdateTime,
java.util.Date _createTime,
java.lang.String _title,
java.lang.Integer _hits,
java.lang.Integer _articleType) {
this.setId(_id);
this.setCreateBy(_createBy);
this.setParent(_parent);
this.setBoard(_board);
this.setLastUpdateBy(_lastUpdateBy);
this.setLastUpdateTime(_lastUpdateTime);
this.setCreateTime(_createTime);
this.setTitle(_title);
this.setHits(_hits);
this.setArticleType(_articleType);
initialize();
}
protected void initialize () {}
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="vm"
* column="id"
*/
public java.lang.Integer getId () {
return _id;
}
/**
* Set the unique identifier of this class
* @param _id the new ID
*/
public void setId (java.lang.Integer _id) {
this._id = _id;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: last_update_time
*/
public java.util.Date getLastUpdateTime () {
return _lastUpdateTime;
}
/**
* Set the value related to the column: last_update_time
* @param _lastUpdateTime the last_update_time value
*/
public void setLastUpdateTime (java.util.Date _lastUpdateTime) {
this._lastUpdateTime = _lastUpdateTime;
}
/**
* Return the value associated with the column: create_time
*/
public java.util.Date getCreateTime () {
return _createTime;
}
/**
* Set the value related to the column: create_time
* @param _createTime the create_time value
*/
public void setCreateTime (java.util.Date _createTime) {
this._createTime = _createTime;
}
/**
* 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: hits
*/
public java.lang.Integer getHits () {
return _hits;
}
/**
* Set the value related to the column: hits
* @param _hits the hits value
*/
public void setHits (java.lang.Integer _hits) {
this._hits = _hits;
}
/**
* Return the value associated with the column: article_type
*/
public java.lang.Integer getArticleType () {
return _articleType;
}
/**
* Set the value related to the column: article_type
* @param _articleType the article_type value
*/
public void setArticleType (java.lang.Integer _articleType) {
this._articleType = _articleType;
}
/**
* Return the value associated with the column: bytes
*/
public java.lang.Integer getBytes () {
return _bytes;
}
/**
* Set the value related to the column: bytes
* @param _bytes the bytes value
*/
public void setBytes (java.lang.Integer _bytes) {
this._bytes = _bytes;
}
/**
* Return the value associated with the column: body
*/
public java.lang.String getBody () {
return _body;
}
/**
* Set the value related to the column: body
* @param _body the body value
*/
public void setBody (java.lang.String _body) {
this._body = _body;
}
/**
* @hibernate.property
* column=create_by
* not-null=true
*/
public com.redsaga.hibnatesample.step1.synchronizer.User getCreateBy () {
return this._createBy;
}
/**
* Set the value related to the column: create_by
* @param _createBy the create_by value
*/
public void setCreateBy (com.redsaga.hibnatesample.step1.synchronizer.User _createBy) {
this._createBy = _createBy;
}
/**
* @hibernate.property
* column=parent_id
* not-null=true
*/
public com.redsaga.hibnatesample.step1.synchronizer.Article getParent () {
return this._parent;
}
/**
* Set the value related to the column: parent_id
* @param _parent the parent_id value
*/
public void setParent (com.redsaga.hibnatesample.step1.synchronizer.Article _parent) {
this._parent = _parent;
}
/**
* @hibernate.property
* column=board_id
* not-null=true
*/
public com.redsaga.hibnatesample.step1.synchronizer.Board getBoard () {
return this._board;
}
/**
* Set the value related to the column: board_id
* @param _board the board_id value
*/
public void setBoard (com.redsaga.hibnatesample.step1.synchronizer.Board _board) {
this._board = _board;
}
/**
* @hibernate.property
* column=last_update_by
* not-null=true
*/
public com.redsaga.hibnatesample.step1.synchronizer.User getLastUpdateBy () {
return this._lastUpdateBy;
}
/**
* Set the value related to the column: last_update_by
* @param _lastUpdateBy the last_update_by value
*/
public void setLastUpdateBy (com.redsaga.hibnatesample.step1.synchronizer.User _lastUpdateBy) {
this._lastUpdateBy = _lastUpdateBy;
}
/** * Return the value associated with the column: set */ public java.util.Set getSet () {
return this._set;
}
/**
* Set the value related to the column: set
* @param _set the set value
*/
public void setSet (java.util.Set _set) {
this._set = _set;
}
public void addToSet (Object obj) {
if (null == this._set) this._set = new java.util.HashSet();
this._set.add(obj);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.redsaga.hibnatesample.step1.synchronizer.base.BaseArticle)) return false;
else {
com.redsaga.hibnatesample.step1.synchronizer.base.BaseArticle mObj = (com.redsaga.hibnatesample.step1.synchronizer.base.BaseArticle) obj;
if (null == this.getId() || null == mObj.getId()) return false;
else return (this.getId().equals(mObj.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 + -