package com.eksad.masterdata.domain; import com.eksad.ddms.common.util.object.EntityObject; import com.eksad.ddms.common.util.status.DataStatus; import jakarta.persistence.*; import javax.validation.constraints.NotNull; import java.util.Objects; @Entity @Table(name = "MST_PROMOPOS") public class PromoPos implements EntityObject { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) Integer id; private String posServiceID; private String posServiceName; @NotNull(message = "promo pos id cannot be null") private String promoPosID; ; @Enumerated(EnumType.STRING) private DataStatus promoPosStatus; @NotNull(message = "promo id cannot be null") private String promoID; private String ahassID; @Embedded private CreationalSpecification promoPosCreational; public PromoPos() { } public PromoPos(String posServiceID, String posServiceName, String promoPosID, DataStatus promoPosStatus, String promoID, String ahassID, CreationalSpecification promoPosCreational) { this.posServiceID = posServiceID; this.posServiceName = posServiceName; this.promoPosID = promoPosID; this.promoPosStatus = promoPosStatus; this.promoID = promoID; this.ahassID = ahassID; this.promoPosCreational = promoPosCreational; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getPosServiceID() { return posServiceID; } public void setPosServiceID(String posServiceID) { this.posServiceID = posServiceID; } public String getPosServiceName() { return posServiceName; } public void setPosServiceName(String posServiceName) { this.posServiceName = posServiceName; } public String getPromoPosID() { return promoPosID; } public void setPromoPosID(String promoPosID) { this.promoPosID = promoPosID; } public DataStatus getPromoPosStatus() { return promoPosStatus; } public void setPromoPosStatus(DataStatus promoPosStatus) { this.promoPosStatus = promoPosStatus; } public String getPromoID() { return promoID; } public void setPromoID(String promoID) { this.promoID = promoID; } public String getAhassID() { return ahassID; } public void setAhassID(String ahassID) { this.ahassID = ahassID; } public CreationalSpecification getPromoPosCreational() { return promoPosCreational; } public void setPromoPosCreational(CreationalSpecification promoPosCreational) { this.promoPosCreational = promoPosCreational; } @Override public int hashCode() { int hash = 5; hash = 37 * hash + Objects.hashCode(this.id); hash = 37 * hash + Objects.hashCode(this.posServiceID); hash = 37 * hash + Objects.hashCode(this.posServiceName); hash = 37 * hash + Objects.hashCode(this.promoPosID); hash = 37 * hash + Objects.hashCode(this.promoPosStatus); hash = 37 * hash + Objects.hashCode(this.promoID); hash = 37 * hash + Objects.hashCode(this.ahassID); hash = 37 * hash + Objects.hashCode(this.promoPosCreational); return hash; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final PromoPos other = (PromoPos) obj; if (!Objects.equals(this.posServiceName, other.posServiceName)) { return false; } if (!Objects.equals(this.promoPosID, other.promoPosID)) { return false; } if (!Objects.equals(this.promoID, other.promoID)) { return false; } if (!Objects.equals(this.ahassID, other.ahassID)) { return false; } if (!Objects.equals(this.id, other.id)) { return false; } if (!Objects.equals(this.posServiceID, other.posServiceID)) { return false; } if (this.promoPosStatus != other.promoPosStatus) { return false; } if (!Objects.equals(this.promoPosCreational, other.promoPosCreational)) { return false; } return true; } @Override public boolean sameIdentityAs(PromoPos other) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }