Rev 28465 | Rev 30454 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.model;import com.spice.profitmandi.dao.entity.fofo.PartnerType;import com.spice.profitmandi.dao.enumuration.catalog.AmountType;import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;import java.time.LocalDateTime;import java.util.Set;public class CreateSchemeRequest {public LocalDateTime getStartDate() {return startDate;}public void setStartDate(LocalDateTime startDate) {this.startDate = startDate;}public LocalDateTime getEndDate() {return endDate;}public void setEndDate(LocalDateTime endDate) {this.endDate = endDate;}private String name;private String description;private SchemeType type;private AmountType amountType;private PartnerType partnerType;private boolean cashback;private Set<Integer> catalogIds;public boolean isCashback() {return cashback;}public void setCashback(boolean cashback) {this.cashback = cashback;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + Float.floatToIntBits(amount);result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());result = prime * result + (cashback ? 1231 : 1237);result = prime * result + ((description == null) ? 0 : description.hashCode());result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());result = prime * result + ((catalogIds == null) ? 0 : catalogIds.hashCode());result = prime * result + ((name == null) ? 0 : name.hashCode());result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());result = prime * result + ((type == null) ? 0 : type.hashCode());return result;}public PartnerType getPartnerType() {return partnerType;}public void setPartnerType(PartnerType partnerType) {this.partnerType = partnerType;}private float amount;private LocalDateTime startDate;private LocalDateTime endDate;@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;CreateSchemeRequest other = (CreateSchemeRequest) obj;if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))return false;if (amountType != other.amountType)return false;if (cashback != other.cashback)return false;if (description == null) {if (other.description != null)return false;} else if (!description.equals(other.description))return false;if (endDate == null) {if (other.endDate != null)return false;} else if (!endDate.equals(other.endDate))return false;if (catalogIds == null) {if (other.catalogIds != null)return false;} else if (!catalogIds.equals(other.catalogIds))return false;if (name == null) {if (other.name != null)return false;} else if (!name.equals(other.name))return false;if (partnerType != other.partnerType)return false;if (startDate == null) {if (other.startDate != null)return false;} else if (!startDate.equals(other.startDate))return false;if (type != other.type)return false;return true;}public String getName() {return name;}public SchemeType getType() {return type;}public void setType(SchemeType type) {this.type = type;}public AmountType getAmountType() {return amountType;}public void setAmountType(AmountType amountType) {this.amountType = amountType;}@Overridepublic String toString() {return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashback + ", amount=" + amount+ ", startDate=" + startDate + ", endDate=" + endDate + ", catalogIds=" + catalogIds + "]";}public void setName(String name) {this.name = name;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public float getAmount() {return amount;}public void setAmount(float amount) {this.amount = amount;}public Set<Integer> getCatalogIds() {return catalogIds;}public void setCatalogIds(Set<Integer> catalogIds) {this.catalogIds = catalogIds;}}