📄 abstractorderitem.java
字号:
package com.ascent.bean;
/**
* AbstractOrderitem generated by MyEclipse - Hibernate Tools
*/
public abstract class AbstractOrderitem 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 orderItemId;
private Integer quantity;
private Integer orderId;
private Integer bookId;
private Order order;
// Constructors
public Order getOrder() {
return order;
}
public void setOrder(Order order) {
this.order = order;
}
/** default constructor */
public AbstractOrderitem() {
}
/** minimal constructor */
public AbstractOrderitem(Integer orderItemId) {
this.orderItemId = orderItemId;
}
/** full constructor */
public AbstractOrderitem(Integer orderItemId, Integer quantity,
Integer orderId, Integer bookId) {
this.orderItemId = orderItemId;
this.quantity = quantity;
this.orderId = orderId;
this.bookId = bookId;
}
// Property accessors
public Integer getOrderItemId() {
return this.orderItemId;
}
public void setOrderItemId(Integer orderItemId) {
this.orderItemId = orderItemId;
}
public Integer getQuantity() {
return this.quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public Integer getOrderId() {
return this.orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public Integer getBookId() {
return this.bookId;
}
public void setBookId(Integer bookId) {
this.bookId = bookId;
}
/**
* 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 Orderitem))
return false;
Orderitem that = (Orderitem) rhs;
if (this.getOrderItemId() == null || that.getOrderItemId() == null)
return false;
return (this.getOrderItemId().equals(that.getOrderItemId()));
}
/**
* 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 orderitemIdValue = this.getOrderItemId() == null ? 0 : this
.getOrderItemId().hashCode();
result = result * 37 + orderitemIdValue;
this.hashValue = result;
}
return this.hashValue;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -