Rev 25503 | Rev 30123 | 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 java.time.LocalDateTime;import java.util.Set;import com.spice.profitmandi.dao.entity.fofo.PartnerType;import com.spice.profitmandi.dao.enumuration.catalog.AmountType;import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;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;@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 + ((itemIds == null) ? 0 : itemIds.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 boolean isCashBack() {return cashBack;}public void setCashBack(boolean cashBack) {this.cashBack = cashBack;}@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 (itemIds == null) {if (other.itemIds != null)return false;} else if (!itemIds.equals(other.itemIds))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 PartnerType getPartnerType() {return partnerType;}public void setPartnerType(PartnerType partnerType) {this.partnerType = partnerType;}private float amount;private LocalDateTime startDate;private LocalDateTime endDate;private Set<Integer> itemIds;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 + ", itemIds=" + itemIds + "]";}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> getItemIds() {return itemIds;}public void setItemIds(Set<Integer> itemIds) {this.itemIds = itemIds;}}