PickSlipDetailEV.java 4.96 KB
Newer Older
akbar fauzi's avatar
akbar fauzi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
package com.eksad.masterdata.domain;

import com.eksad.ddms.common.util.object.EntityObject;
import com.eksad.ddms.common.util.status.DataStatus;
import com.eksad.masterdata.common.listEnum.PickSlipDetailStatusType;
import jakarta.persistence.*;

import java.util.Objects;

@Entity
@Table(name = "TRX_PICKSLIPDETAILEV")
public class PickSlipDetailEV implements EntityObject<PickSlipDetailEV> {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "trx_pickslipdetail_gen")
    @SequenceGenerator(name = "trx_pickslipdetail_gen", sequenceName = "trx_pickslipdetail_seq", allocationSize = 1)
    Integer id;

    private String code;
    private String partID;
    private Integer locatorID;
    private Integer qty;
    private Integer actualQty;

    @Enumerated(EnumType.STRING)
    private PickSlipDetailStatusType pickSlipDetailStatusType;

    @Enumerated(EnumType.STRING)
    private DataStatus pickSlipDetailDataStatus;

    @Embedded
    private CreationalSpecification pickSlipDetailCreational;

    private Integer pickSlipNumber;

    private String serialNumber;


    public PickSlipDetailEV() {
    }

    public PickSlipDetailEV(String code, String partID, Integer locatorID, Integer qty, Integer actualQty, String serialNumber, PickSlipDetailStatusType pickSlipDetailStatusType, DataStatus pickSlipDetailDataStatus, CreationalSpecification pickSlipDetailCreational) {
        this.code = code;
        this.partID = partID;
        this.locatorID = locatorID;
        this.qty = qty;
        this.actualQty = actualQty;
        this.serialNumber = serialNumber;
        this.pickSlipDetailStatusType = pickSlipDetailStatusType;
        this.pickSlipDetailDataStatus = pickSlipDetailDataStatus;
        this.pickSlipDetailCreational = pickSlipDetailCreational;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPartID() {
        return partID;
    }

    public void setPartID(String partID) {
        this.partID = partID;
    }

    public Integer getLocatorID() {
        return locatorID;
    }

    public void setLocatorID(Integer locatorID) {
        this.locatorID = locatorID;
    }

    public Integer getActualQty() {
        return actualQty;
    }

    public void setActualQty(Integer actualQty) {
        this.actualQty = actualQty;
    }

    public DataStatus getPickSlipDetailDataStatus() {
        return pickSlipDetailDataStatus;
    }

    public void setPickSlipDetailDataStatus(DataStatus pickSlipDetailDataStatus) {
        this.pickSlipDetailDataStatus = pickSlipDetailDataStatus;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getQty() {
        return qty;
    }

    public void setQty(Integer qty) {
        this.qty = qty;
    }

    public CreationalSpecification getPickSlipDetailCreational() {
        return pickSlipDetailCreational;
    }

    public void setPickSlipDetailCreational(CreationalSpecification pickSlipDetailCreational) {
        this.pickSlipDetailCreational = pickSlipDetailCreational;
    }

    public PickSlipDetailStatusType getPickSlipDetailStatusType() {
        return pickSlipDetailStatusType;
    }

    public void setPickSlipDetailStatusType(PickSlipDetailStatusType pickSlipDetailStatusType) {
        this.pickSlipDetailStatusType = pickSlipDetailStatusType;
    }

    public Integer getPickSlipNumber() {
        return pickSlipNumber;
    }

    public void setPickSlipNumber(Integer pickSlipNumber) {
        this.pickSlipNumber = pickSlipNumber;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }


    @Override
    public int hashCode() {
        int hash = 7;
        hash = 37 * hash + Objects.hashCode(this.code);
        hash = 37 * hash + Objects.hashCode(this.partID);
        hash = 37 * hash + Objects.hashCode(this.locatorID);
        hash = 37 * hash + Objects.hashCode(this.qty);
        hash = 37 * hash + Objects.hashCode(this.actualQty);
        hash = 37 * hash + Objects.hashCode(this.serialNumber);
        hash = 37 * hash + Objects.hashCode(this.pickSlipDetailStatusType);
        hash = 37 * hash + Objects.hashCode(this.pickSlipDetailDataStatus);
        hash = 37 * hash + Objects.hashCode(this.pickSlipDetailCreational);
        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 PickSlipDetailEV other = (PickSlipDetailEV) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }

    @Override
    public boolean sameIdentityAs(PickSlipDetailEV other) {
        return this.equals(other);
    }
}