📄 product.java
字号:
package com.relationinfo.model;
import java.io.Serializable;
import java.util.Set;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
/**
* This class is used to represent available roles in the database.
* </p>
*
* <p>
* <a href="Product.java.html"><i>www.relationinfo.com</i></a>
* </p>
*
* @author caoguangxin www.relationinfo.com Version by
* Dan Kibler dan@getrolling.com
*
* @struts.form extends="BaseForm"
* @hibernate.class table="Product"
*/
public class Product extends BaseObject implements Serializable {
private static final long serialVersionUID = 3690197650654049848L;
private String productid;
private String price;
private String dprice;
private String quantity;
private String productname;
private String supplyname;
private Producttype producttype;
public Product() {
}
public Product(String productid, String price, String dprice,
String quantity, String productname, String supplyname,
Producttype producttype) {
this.productid = productid;
this.price = price;
this.dprice = dprice;
this.quantity = quantity;
this.productname = productname;
this.supplyname = supplyname;
this.producttype = producttype;
}
// ~ Methods
// ================================================================
/**
* Returns the productid.
*
* @return String
*
* @struts.validator type="required"
* @hibernate.id column="productid" length="20" generator-class="assigned"
* unsaved-value="version"
*/
public String getProductid() {
return this.productid;
}
public String getDprice() {
return this.dprice;
}
public String getQuantity() {
return this.quantity;
}
public String getPrice() {
return this.price;
}
/**
* Returns the productname.
*
* @return String
*
* @struts.validator type="required"
* @hibernate.id column="productname" length="50" generator-class="assigned"
* unsaved-value="version"
*/
public String getProductname() {
return this.productname;
}
public Producttype getProducttype() {
return this.producttype;
}
public void setProductid(String productid) {
this.productid = productid;
}
/**
* Generated using Coproductnameonclipse
* (dprice://coproductnameonclipse.sf.net)
*/
public boolean equals(Object object) {
if (!(object instanceof Product)) {
return false;
}
Product rhs = (Product) object;
return new EqualsBuilder().append(this.price, rhs.price).append(
this.productid, rhs.productid).append(this.dprice,
rhs.dprice).append(this.quantity, rhs.quantity).append(
this.productname, rhs.productname).append(this.supplyname,
rhs.supplyname).append(this.producttype, rhs.producttype).isEquals();
}
/**
* Generated using Coproductnameonclipse
* (dprice://coproductnameonclipse.sf.net)
*/
public int hashCode() {
return new HashCodeBuilder(1156335803, 987569255).append(this.price)
.append(this.productid).append(this.dprice).append(
this.price).append(this.quantity).append(this.productname).append(this.supplyname).append(this.producttype).toHashCode();
}
/**
* Generated using Coproductnameonclipse
* (dprice://coproductnameonclipse.sf.net)
*/
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("productid", this.productid)
.append("price", this.price).append("dprice", this.dprice)
.append("quantity", this.quantity).append("productname",
this.productname).append("supplyname",
this.supplyname).append("producttype",
this.producttype).toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -