Rev 25953 | Rev 31773 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.model;public class CartItem{private long quantity;private int itemId;private double sellingPrice;public CartItem(long quantity, int itemId) {super();this.quantity = quantity;this.itemId = itemId;}public CartItem() {super();}public long getQuantity() {return quantity;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + itemId;result = prime * result + (int) (quantity ^ (quantity >>> 32));long temp;temp = Double.doubleToLongBits(sellingPrice);result = prime * result + (int) (temp ^ (temp >>> 32));return result;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;CartItem other = (CartItem) obj;if (itemId != other.itemId)return false;if (quantity != other.quantity)return false;if (Double.doubleToLongBits(sellingPrice) != Double.doubleToLongBits(other.sellingPrice))return false;return true;}public double getSellingPrice() {return sellingPrice;}public void setSellingPrice(double sellingPrice) {this.sellingPrice = sellingPrice;}public void setQuantity(long quantity) {this.quantity = quantity;}public int getItemId() {return itemId;}public void setItemId(int itemId) {this.itemId = itemId;}@Overridepublic String toString() {return "CartItem [quantity=" + quantity + ", itemId=" + itemId + ", sellingPrice=" + sellingPrice + "]";}}