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

📄 baseorders.java

📁 struts+Spring+Hibernate经典入门源码
💻 JAVA
字号:
package com.softeem.customer.pojo.base;

import java.io.Serializable;


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

public abstract class BaseOrders  implements Serializable {

	public static String REF = "Orders";
	public static String PROP_SHIPPED_TIME = "shippedTime";
	public static String PROP_CUSTOMER_ID = "customerId";
	public static String PROP_ORDER_TIME = "orderTime";
	public static String PROP_REQUIRED_TIME = "requiredTime";
	public static String PROP_ID = "id";


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

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

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.util.Date orderTime;
	private java.util.Date requiredTime;
	private java.util.Date shippedTime;

	// many to one
	private com.softeem.customer.pojo.Customers customerId;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  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: orderTime
	 */
	public java.util.Date getOrderTime () {
		return orderTime;
	}

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



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

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



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

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



	/**
	 * Return the value associated with the column: customerId
	 */
	public com.softeem.customer.pojo.Customers getCustomerId () {
		return customerId;
	}

	/**
	 * Set the value related to the column: customerId
	 * @param customerId the customerId value
	 */
	public void setCustomerId (com.softeem.customer.pojo.Customers customerId) {
		this.customerId = customerId;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.softeem.customer.pojo.Orders)) return false;
		else {
			com.softeem.customer.pojo.Orders orders = (com.softeem.customer.pojo.Orders) obj;
			if (null == this.getId() || null == orders.getId()) return false;
			else return (this.getId().equals(orders.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 + -