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

📄 baseowner.java

📁 Hibernate的一个实例
💻 JAVA
字号:
package bo.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 owner table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="owner"
 */
public abstract class BaseOwner  implements Serializable {

	public static String PROP_ADDRESS = "Address";
	public static String PROP_OWNERID = "Ownerid";
	public static String PROP_NAME = "Name";
	public static String PROP_PHONE = "Phone";


	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String _phone;
	private java.lang.String _address;
	private java.lang.String _name;

	// collections
	private java.util.Set _petSet;


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

	/**
	 * Constructor for primary key
	 */
	public BaseOwner (java.lang.Integer _ownerid) {
		this.setOwnerid(_ownerid);
		initialize();
	}

	protected void initialize () {}



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="vm"
     *  column="ownerid"
     */
	public java.lang.Integer getOwnerid () {
		return _ownerid;
	}

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


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

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


	/**
	 * 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: PetSet
	 */
	public java.util.Set getPetSet () {
          if (null == this._petSet) this._petSet = new java.util.HashSet();
		return this._petSet;
	}

	/**
	 * Set the value related to the column: PetSet
	 * @param _petSet the PetSet value
	 */
	public void setPetSet (java.util.Set _petSet) {
		this._petSet = _petSet;
	}

	public void addToPetSet (Object obj) {
		if (null == this._petSet) this._petSet = new java.util.HashSet();
		this._petSet.add(obj);
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof bo.base.BaseOwner)) return false;
		else {
			bo.base.BaseOwner mObj = (bo.base.BaseOwner) obj;
			if (null == this.getOwnerid() || null == mObj.getOwnerid()) return false;
			else return (this.getOwnerid().equals(mObj.getOwnerid()));
		}
	}


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


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

}

⌨️ 快捷键说明

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