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.Date; import java.util.Objects; @Entity @Table(name = "MST_UNITCUSTOMER") public class UnitCustomer implements EntityObject { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "mst_unitcustomer_gen") @SequenceGenerator(name = "mst_unitcustomer_gen", sequenceName = "mst_unitcustomer_seq", allocationSize = 1) Integer id; @Column(unique = true) @NotNull(message = "unitCustomerID cannot be null") private String unitCustomerID; @NotNull(message = "customerName cannot be null") private String customerName; private String sexID; private String customerTypeID; private String noKtp; private String noStnk; private String policeNumber; private String machineNumber; private String unitTypeID; private String chasisNumber; private String phone; private String ktpAddress; private String lastAddress; private String email; private String city; private String kecamatan; private String kelurahan; private String postalCode; private String religion; private String unitTypeColor; private String refObjectID; private String custOccupation; private String h1CustomerID; private Date tanggalPembelian; private Integer tahunPerakitan; private String provinceName; private String provinceID; private String kabkotID; private String kecamatanID; private String kelurahanID; private String noNpwp; private String dealerID; private String serialNumberEV; private String oldSerialNumberEV; private Integer socBattery; @Enumerated(EnumType.STRING) @NotNull(message = "unitCustomerStatus cannot be null") private DataStatus unitCustomerStatus; @Embedded private CreationalSpecification unitCustomerCreational; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUnitCustomerID() { return unitCustomerID; } public void setUnitCustomerID(String unitCustomerID) { this.unitCustomerID = unitCustomerID; } public String getCustomerName() { return customerName; } public void setCustomerName(String customerName) { this.customerName = customerName; } public String getSexID() { return sexID; } public void setSexID(String sexID) { this.sexID = sexID; } public String getCustomerTypeID() { return customerTypeID; } public void setCustomerTypeID(String customerTypeID) { this.customerTypeID = customerTypeID; } public String getNoKtp() { return noKtp; } public void setNoKtp(String noKtp) { this.noKtp = noKtp; } public String getNoStnk() { return noStnk; } public void setNoStnk(String noStnk) { this.noStnk = noStnk; } public String getPoliceNumber() { return policeNumber; } public void setPoliceNumber(String policeNumber) { this.policeNumber = policeNumber; } public String getMachineNumber() { return machineNumber; } public void setMachineNumber(String machineNumber) { this.machineNumber = machineNumber; } public String getUnitTypeID() { return unitTypeID; } public void setUnitTypeID(String unitTypeID) { this.unitTypeID = unitTypeID; } public String getChasisNumber() { return chasisNumber; } public void setChasisNumber(String chasisNumber) { this.chasisNumber = chasisNumber; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getKtpAddress() { return ktpAddress; } public void setKtpAddress(String ktpAddress) { this.ktpAddress = ktpAddress; } public String getLastAddress() { return lastAddress; } public void setLastAddress(String lastAddress) { this.lastAddress = lastAddress; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getKecamatan() { return kecamatan; } public void setKecamatan(String kecamatan) { this.kecamatan = kecamatan; } public String getKelurahan() { return kelurahan; } public void setKelurahan(String kelurahan) { this.kelurahan = kelurahan; } public String getPostalCode() { return postalCode; } public void setPostalCode(String postalCode) { this.postalCode = postalCode; } public String getReligion() { return religion; } public void setReligion(String religion) { this.religion = religion; } public DataStatus getUnitCustomerStatus() { return unitCustomerStatus; } public void setUnitCustomerStatus(DataStatus unitCustomerStatus) { this.unitCustomerStatus = unitCustomerStatus; } public CreationalSpecification getUnitCustomerCreational() { return unitCustomerCreational; } public void setUnitCustomerCreational(CreationalSpecification unitCustomerCreational) { this.unitCustomerCreational = unitCustomerCreational; } public String getUnitTypeColor() { return unitTypeColor; } public void setUnitTypeColor(String unitTypeColor) { this.unitTypeColor = unitTypeColor; } public String getRefObjectID() { return refObjectID; } public void setRefObjectID(String refObjectID) { this.refObjectID = refObjectID; } public String getH1CustomerID() { return h1CustomerID; } public void setH1CustomerID(String h1CustomerID) { this.h1CustomerID = h1CustomerID; } public String getCustOccupation() { return custOccupation; } public void setCustOccupation(String custOccupation) { this.custOccupation = custOccupation; } public Date getTanggalPembelian() { return tanggalPembelian; } public void setTanggalPembelian(Date tanggalPembelian) { this.tanggalPembelian = tanggalPembelian; } public Integer getTahunPerakitan() { return tahunPerakitan; } public void setTahunPerakitan(Integer tahunPerakitan) { this.tahunPerakitan = tahunPerakitan; } public String getProvinceName() { return provinceName; } public void setProvinceName(String provinceName) { this.provinceName = provinceName; } public String getProvinceID() { return provinceID; } public void setProvinceID(String provinceID) { this.provinceID = provinceID; } public String getKabkotID() { return kabkotID; } public void setKabkotID(String kabkotID) { this.kabkotID = kabkotID; } public String getKecamatanID() { return kecamatanID; } public void setKecamatanID(String kecamatanID) { this.kecamatanID = kecamatanID; } public String getKelurahanID() { return kelurahanID; } public void setKelurahanID(String kelurahanID) { this.kelurahanID = kelurahanID; } public String getNoNpwp() { return noNpwp; } public void setNoNpwp(String noNpwp) { this.noNpwp = noNpwp; } public UnitCustomer() { } public String getDealerID() { return dealerID; } public void setDealerID(String dealerID) { this.dealerID = dealerID; } public String getSerialNumberEV() { return serialNumberEV; } public void setSerialNumberEV(String serialNumberEV) { this.serialNumberEV = serialNumberEV; } public Integer getSocBattery() { return socBattery; } public void setSocBattery(Integer socBattery) { this.socBattery = socBattery; } public String getOldSerialNumberEV() { return oldSerialNumberEV; } public void setOldSerialNumberEV(String oldSerialNumberEV) { this.oldSerialNumberEV = oldSerialNumberEV; } public UnitCustomer(String unitCustomerID, String customerName, String sexID, String customerTypeID, String noKtp, String noStnk, String policeNumber, String machineNumber, String unitTypeID, String chasisNumber, String phone, String ktpAddress, String lastAddress, String email, String city, String kecamatan, String kelurahan, String postalCode, String religion, String unitTypeColor, String refObjectID, String custOccupation, String h1CustomerID, Date tanggalPembelian, Integer tahunPerakitan, DataStatus unitCustomerStatus, CreationalSpecification unitCustomerCreational, String noNpwp, String dealerID, String serialNumberEV, String oldSerialNumberEV, Integer socBattery) { this.unitCustomerID = unitCustomerID; this.customerName = customerName; this.sexID = sexID; this.customerTypeID = customerTypeID; this.noKtp = noKtp; this.noStnk = noStnk; this.policeNumber = policeNumber; this.machineNumber = machineNumber; this.unitTypeID = unitTypeID; this.chasisNumber = chasisNumber; this.phone = phone; this.ktpAddress = ktpAddress; this.lastAddress = lastAddress; this.email = email; this.city = city; this.kecamatan = kecamatan; this.kelurahan = kelurahan; this.postalCode = postalCode; this.religion = religion; this.unitTypeColor = unitTypeColor; this.refObjectID = refObjectID; this.custOccupation = custOccupation; this.h1CustomerID = h1CustomerID; this.tanggalPembelian = tanggalPembelian; this.tahunPerakitan = tahunPerakitan; this.unitCustomerStatus = unitCustomerStatus; this.unitCustomerCreational = unitCustomerCreational; this.noNpwp = noNpwp; this.dealerID = dealerID; this.serialNumberEV = serialNumberEV; this.oldSerialNumberEV = oldSerialNumberEV; this.socBattery = socBattery; } public UnitCustomer(String unitCustomerID, String customerName, String sexID, String customerTypeID, String noKtp, String noStnk, String policeNumber, String machineNumber, String unitTypeID, String chasisNumber, String phone, String ktpAddress, String lastAddress, String email, String city, String kecamatan, String kelurahan, String postalCode, String religion, String unitTypeColor, String refObjectID, String custOccupation, String h1CustomerID, Date tanggalPembelian, Integer tahunPerakitan, DataStatus unitCustomerStatus, CreationalSpecification unitCustomerCreational, String noNpwp) { this.unitCustomerID = unitCustomerID; this.customerName = customerName; this.sexID = sexID; this.customerTypeID = customerTypeID; this.noKtp = noKtp; this.noStnk = noStnk; this.policeNumber = policeNumber; this.machineNumber = machineNumber; this.unitTypeID = unitTypeID; this.chasisNumber = chasisNumber; this.phone = phone; this.ktpAddress = ktpAddress; this.lastAddress = lastAddress; this.email = email; this.city = city; this.kecamatan = kecamatan; this.kelurahan = kelurahan; this.postalCode = postalCode; this.religion = religion; this.unitTypeColor = unitTypeColor; this.refObjectID = refObjectID; this.custOccupation = custOccupation; this.h1CustomerID = h1CustomerID; this.tanggalPembelian = tanggalPembelian; this.tahunPerakitan = tahunPerakitan; this.unitCustomerStatus = unitCustomerStatus; this.unitCustomerCreational = unitCustomerCreational; this.noNpwp = noNpwp; } public UnitCustomer(String unitCustomerID, String customerName, String sexID, String customerTypeID, String noKtp, String noStnk, String policeNumber, String machineNumber, String unitTypeID, String chasisNumber, String phone, String ktpAddress, String lastAddress, String email, String city, String kecamatan, String kelurahan, String postalCode, String religion, String unitTypeColor, String refObjectID, String custOccupation, String h1CustomerID, Date tanggalPembelian, Integer tahunPerakitan, String provinceName, String provinceID, String kabkotID, String kecamatanID, String kelurahanID, DataStatus unitCustomerStatus, CreationalSpecification unitCustomerCreational, String noNpwp) { this.unitCustomerID = unitCustomerID; this.customerName = customerName; this.sexID = sexID; this.customerTypeID = customerTypeID; this.noKtp = noKtp; this.noStnk = noStnk; this.policeNumber = policeNumber; this.machineNumber = machineNumber; this.unitTypeID = unitTypeID; this.chasisNumber = chasisNumber; this.phone = phone; this.ktpAddress = ktpAddress; this.lastAddress = lastAddress; this.email = email; this.city = city; this.kecamatan = kecamatan; this.kelurahan = kelurahan; this.postalCode = postalCode; this.religion = religion; this.unitTypeColor = unitTypeColor; this.refObjectID = refObjectID; this.custOccupation = custOccupation; this.h1CustomerID = h1CustomerID; this.tanggalPembelian = tanggalPembelian; this.tahunPerakitan = tahunPerakitan; this.provinceName = provinceName; this.provinceID = provinceID; this.kabkotID = kabkotID; this.kecamatanID = kecamatanID; this.kelurahanID = kelurahanID; this.unitCustomerStatus = unitCustomerStatus; this.unitCustomerCreational = unitCustomerCreational; this.noNpwp = noNpwp; } public UnitCustomer(String unitCustomerID, String customerName, String sexID, String customerTypeID, String noKtp, String noStnk, String policeNumber, String machineNumber, String unitTypeID, String chasisNumber, String phone, String ktpAddress, String lastAddress, String email, String city, String kecamatan, String kelurahan, String postalCode, String religion, String unitTypeColor, String refObjectID, String custOccupation, String h1CustomerID, Date tanggalPembelian, Integer tahunPerakitan, String provinceName, String provinceID, String kabkotID, String kecamatanID, String kelurahanID, DataStatus unitCustomerStatus, CreationalSpecification unitCustomerCreational, String noNpwp, String dealerID) { this.unitCustomerID = unitCustomerID; this.customerName = customerName; this.sexID = sexID; this.customerTypeID = customerTypeID; this.noKtp = noKtp; this.noStnk = noStnk; this.policeNumber = policeNumber; this.machineNumber = machineNumber; this.unitTypeID = unitTypeID; this.chasisNumber = chasisNumber; this.phone = phone; this.ktpAddress = ktpAddress; this.lastAddress = lastAddress; this.email = email; this.city = city; this.kecamatan = kecamatan; this.kelurahan = kelurahan; this.postalCode = postalCode; this.religion = religion; this.unitTypeColor = unitTypeColor; this.refObjectID = refObjectID; this.custOccupation = custOccupation; this.h1CustomerID = h1CustomerID; this.tanggalPembelian = tanggalPembelian; this.tahunPerakitan = tahunPerakitan; this.provinceName = provinceName; this.provinceID = provinceID; this.kabkotID = kabkotID; this.kecamatanID = kecamatanID; this.kelurahanID = kelurahanID; this.unitCustomerStatus = unitCustomerStatus; this.unitCustomerCreational = unitCustomerCreational; this.noNpwp = noNpwp; this.dealerID = dealerID; } @Override public int hashCode() { int hash = 7; hash = 29 * hash + Objects.hashCode(this.id); hash = 29 * hash + Objects.hashCode(this.unitCustomerID); hash = 29 * hash + Objects.hashCode(this.customerName); hash = 29 * hash + Objects.hashCode(this.sexID); hash = 29 * hash + Objects.hashCode(this.customerTypeID); hash = 29 * hash + Objects.hashCode(this.noKtp); hash = 29 * hash + Objects.hashCode(this.noStnk); hash = 29 * hash + Objects.hashCode(this.policeNumber); hash = 29 * hash + Objects.hashCode(this.machineNumber); hash = 29 * hash + Objects.hashCode(this.unitTypeID); hash = 29 * hash + Objects.hashCode(this.chasisNumber); hash = 29 * hash + Objects.hashCode(this.phone); hash = 29 * hash + Objects.hashCode(this.ktpAddress); hash = 29 * hash + Objects.hashCode(this.lastAddress); hash = 29 * hash + Objects.hashCode(this.email); hash = 29 * hash + Objects.hashCode(this.city); hash = 29 * hash + Objects.hashCode(this.kecamatan); hash = 29 * hash + Objects.hashCode(this.kelurahan); hash = 29 * hash + Objects.hashCode(this.postalCode); hash = 29 * hash + Objects.hashCode(this.religion); hash = 29 * hash + Objects.hashCode(this.unitTypeColor); hash = 29 * hash + Objects.hashCode(this.refObjectID); hash = 29 * hash + Objects.hashCode(this.custOccupation); hash = 29 * hash + Objects.hashCode(this.h1CustomerID); hash = 29 * hash + Objects.hashCode(this.tanggalPembelian); hash = 29 * hash + Objects.hashCode(this.tahunPerakitan); hash = 29 * hash + Objects.hashCode(this.provinceName); hash = 29 * hash + Objects.hashCode(this.provinceID); hash = 29 * hash + Objects.hashCode(this.kabkotID); hash = 29 * hash + Objects.hashCode(this.kecamatanID); hash = 29 * hash + Objects.hashCode(this.kelurahanID); hash = 29 * hash + Objects.hashCode(this.unitCustomerStatus); hash = 29 * hash + Objects.hashCode(this.unitCustomerCreational); hash = 29 * hash + Objects.hashCode(this.noNpwp); hash = 29 * hash + Objects.hashCode(this.dealerID); hash = 29 * hash + Objects.hashCode(this.serialNumberEV); hash = 29 * hash + Objects.hashCode(this.oldSerialNumberEV); hash = 29 * hash + Objects.hashCode(this.socBattery); 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 UnitCustomer other = (UnitCustomer) obj; if (!Objects.equals(this.unitCustomerID, other.unitCustomerID)) { return false; } if (!Objects.equals(this.customerName, other.customerName)) { return false; } if (!Objects.equals(this.sexID, other.sexID)) { return false; } if (!Objects.equals(this.customerTypeID, other.customerTypeID)) { return false; } if (!Objects.equals(this.noKtp, other.noKtp)) { return false; } if (!Objects.equals(this.noStnk, other.noStnk)) { return false; } if (!Objects.equals(this.policeNumber, other.policeNumber)) { return false; } if (!Objects.equals(this.machineNumber, other.machineNumber)) { return false; } if (!Objects.equals(this.unitTypeID, other.unitTypeID)) { return false; } if (!Objects.equals(this.chasisNumber, other.chasisNumber)) { return false; } if (!Objects.equals(this.phone, other.phone)) { return false; } if (!Objects.equals(this.ktpAddress, other.ktpAddress)) { return false; } if (!Objects.equals(this.lastAddress, other.lastAddress)) { return false; } if (!Objects.equals(this.email, other.email)) { return false; } if (!Objects.equals(this.city, other.city)) { return false; } if (!Objects.equals(this.kecamatan, other.kecamatan)) { return false; } if (!Objects.equals(this.kelurahan, other.kelurahan)) { return false; } if (!Objects.equals(this.postalCode, other.postalCode)) { return false; } if (!Objects.equals(this.religion, other.religion)) { return false; } if (!Objects.equals(this.unitTypeColor, other.unitTypeColor)) { return false; } if (!Objects.equals(this.refObjectID, other.refObjectID)) { return false; } if (!Objects.equals(this.custOccupation, other.custOccupation)) { return false; } if (!Objects.equals(this.h1CustomerID, other.h1CustomerID)) { return false; } if (!Objects.equals(this.provinceName, other.provinceName)) { return false; } if (!Objects.equals(this.provinceID, other.provinceID)) { return false; } if (!Objects.equals(this.kabkotID, other.kabkotID)) { return false; } if (!Objects.equals(this.kecamatanID, other.kecamatanID)) { return false; } if (!Objects.equals(this.kelurahanID, other.kelurahanID)) { return false; } if (!Objects.equals(this.tanggalPembelian, other.tanggalPembelian)) { return false; } if (!Objects.equals(this.tahunPerakitan, other.tahunPerakitan)) { return false; } if (this.unitCustomerStatus != other.unitCustomerStatus) { return false; } if (!Objects.equals(this.unitCustomerCreational, other.unitCustomerCreational)) { return false; } if (!Objects.equals(this.noNpwp, other.noNpwp)) { return false; } if (!Objects.equals(this.dealerID, other.dealerID)) { return false; } return true; } public boolean sameIdentityAs(UnitCustomer t) { return this.equals(t); } }