예제 #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   OrderProduct other = (OrderProduct) obj;
   if (finalPrice == null) {
     if (other.finalPrice != null) return false;
   } else if (!finalPrice.equals(other.finalPrice)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (order == null) {
     if (other.order != null) return false;
   } else if (!order.equals(other.order)) return false;
   if (product == null) {
     if (other.product != null) return false;
   } else if (!product.equals(other.product)) return false;
   if (productsModel == null) {
     if (other.productsModel != null) return false;
   } else if (!productsModel.equals(other.productsModel)) return false;
   if (productsName == null) {
     if (other.productsName != null) return false;
   } else if (!productsName.equals(other.productsName)) return false;
   if (productsPrice == null) {
     if (other.productsPrice != null) return false;
   } else if (!productsPrice.equals(other.productsPrice)) return false;
   if (productsQuantity != other.productsQuantity) return false;
   if (productsTax == null) {
     if (other.productsTax != null) return false;
   } else if (!productsTax.equals(other.productsTax)) return false;
   return true;
 }