📄 abstractorder.java
字号:
package com.ascent.bean;
import java.util.Set;
/**
* AbstractOrder generated by MyEclipse - Hibernate Tools
*/
public abstract class AbstractOrder implements java.io.Serializable {
/**
* The cached hash code value for this instance. Settting to 0 triggers
* re-calculation.
*/
private int hashValue = 0;
// Fields
private Integer orderId;
private Integer customerId;
private Double totalprice;
private Set orderItems;
public Set getOrderItems() {
return this.orderItems;
}
public void setOrderItems(Set orderItems) {
this.orderItems = orderItems;
}
// Constructors
/** default constructor */
public AbstractOrder() {
}
/** minimal constructor */
public AbstractOrder(Integer orderId, Integer customerId) {
this.orderId = orderId;
this.customerId = customerId;
}
/** full constructor */
public AbstractOrder(Integer orderId, Integer customerId, Double totalprice) {
this.orderId = orderId;
this.customerId = customerId;
this.totalprice = totalprice;
}
// Property accessors
public Integer getOrderId() {
return this.orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public Integer getCustomerId() {
return this.customerId;
}
public void setCustomerId(Integer customerId) {
this.customerId = customerId;
}
public Double getTotalprice() {
return this.totalprice;
}
public void setTotalprice(Double totalprice) {
this.totalprice = totalprice;
}
/**
* Implementation of the equals comparison on the basis of equality of the
* primary key values.
*
* @param rhs
* @return boolean
*/
public boolean equals(Object rhs) {
if (rhs == null)
return false;
if (!(rhs instanceof Order))
return false;
Order that = (Order) rhs;
if (this.getOrderId() == null || that.getOrderId() == null)
return false;
return (this.getOrderId().equals(that.getOrderId()));
}
/**
* Implementation of the hashCode method conforming to the Bloch pattern
* with the exception of array properties (these are very unlikely primary
* key types).
*
* @return int
*/
public int hashCode() {
if (this.hashValue == 0) {
int result = 17;
int orderIdValue = this.getOrderId() == null ? 0 : this
.getOrderId().hashCode();
result = result * 37 + orderIdValue;
this.hashValue = result;
}
return this.hashValue;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -