Rev 32903 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.model;import java.time.LocalDate;import java.util.Objects;public class VendorPriceCircularModel {private int id;;private int vendorId;private int catalogId;private float transferPrice;private float dealerPrice;private float mop;private LocalDate effectedOn;private String status;private float marginPercent;public VendorPriceCircularModel(int id, int vendorId, int catalogId, float transferPrice, float dealerPrice, float mop, LocalDate effectedOn, String status) {super();this.id = id;this.vendorId = vendorId;this.catalogId = catalogId;this.transferPrice = transferPrice;this.dealerPrice = dealerPrice;this.mop = mop;this.effectedOn = effectedOn;this.status = status;this.marginPercent = Float.parseFloat((String.format("%.2f", ((dealerPrice - transferPrice) / transferPrice))));}public int getId() {return id;}public void setId(int id) {this.id = id;}public int getVendorId() {return vendorId;}public void setVendorId(int vendorId) {this.vendorId = vendorId;}public int getCatalogId() {return catalogId;}public void setCatalogId(int catalogId) {this.catalogId = catalogId;}public float getTransferPrice() {return transferPrice;}public void setTransferPrice(float transferPrice) {this.transferPrice = transferPrice;}public float getDealerPrice() {return dealerPrice;}public void setDealerPrice(float dealerPrice) {this.dealerPrice = dealerPrice;}public float getMop() {return mop;}public void setMop(float mop) {this.mop = mop;}public LocalDate getEffectedOn() {return effectedOn;}public void setEffectedOn(LocalDate effectedOn) {this.effectedOn = effectedOn;}public String getStatus() {return status;}public void setStatus(String status) {this.status = status;}public float getMarginPercent() {return marginPercent;}public void setMarginPercent(float marginPercent) {this.marginPercent = marginPercent;}@Overridepublic boolean equals(Object o) {if (this == o) return true;if (o == null || getClass() != o.getClass()) return false;VendorPriceCircularModel that = (VendorPriceCircularModel) o;return id == that.id && vendorId == that.vendorId && catalogId == that.catalogId && Float.compare(transferPrice, that.transferPrice) == 0 && Float.compare(dealerPrice, that.dealerPrice) == 0 && Float.compare(mop, that.mop) == 0 && Float.compare(marginPercent, that.marginPercent) == 0 && Objects.equals(effectedOn, that.effectedOn) && Objects.equals(status, that.status);}@Overridepublic int hashCode() {return Objects.hash(id, vendorId, catalogId, transferPrice, dealerPrice, mop, effectedOn, status, marginPercent);}@Overridepublic String toString() {return "VendorPriceCircularModel{" +"id=" + id +", vendorId=" + vendorId +", catalogId=" + catalogId +", transferPrice=" + transferPrice +", dealerPrice=" + dealerPrice +", mop=" + mop +", effectedOn=" + effectedOn +", status='" + status + '\'' +", marginPercent=" + marginPercent +'}';}}