cartid.java
来自「一个java写的网上购物系统」· Java 代码 · 共 73 行
JAVA
73 行
package com.hb.myshop.po;
/**
* CartId generated by MyEclipse Persistence Tools
*/
public class CartId implements java.io.Serializable {
// Fields
private String cartid;
private Ware ware;
// Constructors
/** default constructor */
public CartId() {
}
/** full constructor */
public CartId(String cartid, Ware ware) {
this.cartid = cartid;
this.ware = ware;
}
// Property accessors
public String getCartid() {
return this.cartid;
}
public void setCartid(String cartid) {
this.cartid = cartid;
}
public Ware getWare() {
return this.ware;
}
public void setWare(Ware ware) {
this.ware = ware;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof CartId))
return false;
CartId castOther = (CartId) other;
return ((this.getCartid() == castOther.getCartid()) || (this
.getCartid() != null
&& castOther.getCartid() != null && this.getCartid().equals(
castOther.getCartid())))
&& ((this.getWare() == castOther.getWare()) || (this.getWare() != null
&& castOther.getWare() != null && this.getWare()
.equals(castOther.getWare())));
}
public int hashCode() {
int result = 17;
result = 37 * result
+ (getCartid() == null ? 0 : this.getCartid().hashCode());
result = 37 * result
+ (getWare() == null ? 0 : this.getWare().hashCode());
return result;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?