MarketTreatmentPartDetail.java 4.58 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
package com.eksad.masterdata.domain;

import com.eksad.ddms.common.util.object.EntityObject;
import jakarta.persistence.*;

import java.util.Objects;

@Entity
@Table(name = "MST_MARKETTREATMENTPARTDETAIL")
public class MarketTreatmentPartDetail implements EntityObject<MarketTreatmentPartDetail> {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "mst_markettreatmentpartdetail_gen")
    @SequenceGenerator(name = "mst_markettreatmentpartdetail_gen", sequenceName = "mst_markettreatmentpartdetail_seq", allocationSize = 1)
    Integer id;

    private String marketTreatmentID;
    private String kodePart;
    private String deskripsi;
    private String marketTreatmentPartDetailID;
    private Integer qtyPart;
    @Embedded
    private CreationalSpecification marketTreatmentPartDetailCreational;

    public MarketTreatmentPartDetail() {
    }

    public MarketTreatmentPartDetail(Integer id, String marketTreatmentID, String kodePart, String deskripsi, String marketTreatmentPartDetailID, Integer qtyPart, CreationalSpecification marketTreatmentPartDetailCreational) {
        this.id = id;
        this.marketTreatmentID = marketTreatmentID;
        this.kodePart = kodePart;
        this.deskripsi = deskripsi;
        this.marketTreatmentPartDetailID = marketTreatmentPartDetailID;
        this.qtyPart = qtyPart;
        this.marketTreatmentPartDetailCreational = marketTreatmentPartDetailCreational;
    }

    public Integer getId() {
        return id;
    }

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

    public String getMarketTreatmentID() {
        return marketTreatmentID;
    }

    public void setMarketTreatmentID(String marketTreatmentID) {
        this.marketTreatmentID = marketTreatmentID;
    }

    public String getKodePart() {
        return kodePart;
    }

    public void setKodePart(String kodePart) {
        this.kodePart = kodePart;
    }

    public String getDeskripsi() {
        return deskripsi;
    }

    public void setDeskripsi(String deskripsi) {
        this.deskripsi = deskripsi;
    }

    public String getMarketTreatmentPartDetailID() {
        return marketTreatmentPartDetailID;
    }

    public void setMarketTreatmentPartDetailID(String marketTreatmentPartDetailID) {
        this.marketTreatmentPartDetailID = marketTreatmentPartDetailID;
    }

    public Integer getQtyPart() {
        return qtyPart;
    }

    public void setQtyPart(Integer qtyPart) {
        this.qtyPart = qtyPart;
    }

    public CreationalSpecification getMarketTreatmentPartDetailCreational() {
        return marketTreatmentPartDetailCreational;
    }

    public void setMarketTreatmentPartDetailCreational(CreationalSpecification marketTreatmentPartDetailCreational) {
        this.marketTreatmentPartDetailCreational = marketTreatmentPartDetailCreational;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 89 * hash + Objects.hashCode(this.id);
        hash = 89 * hash + Objects.hashCode(this.marketTreatmentID);
        hash = 89 * hash + Objects.hashCode(this.kodePart);
        hash = 89 * hash + Objects.hashCode(this.deskripsi);
        hash = 89 * hash + Objects.hashCode(this.marketTreatmentPartDetailID);
        hash = 89 * hash + Objects.hashCode(this.qtyPart);
        hash = 89 * hash + Objects.hashCode(this.marketTreatmentPartDetailCreational);
        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 MarketTreatmentPartDetail other = (MarketTreatmentPartDetail) obj;
        if (!Objects.equals(this.marketTreatmentID, other.marketTreatmentID)) {
            return false;
        }
        if (!Objects.equals(this.kodePart, other.kodePart)) {
            return false;
        }
        if (!Objects.equals(this.deskripsi, other.deskripsi)) {
            return false;
        }
        if (!Objects.equals(this.marketTreatmentPartDetailID, other.marketTreatmentPartDetailID)) {
            return false;
        }
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        if (!Objects.equals(this.qtyPart, other.qtyPart)) {
            return false;
        }
        if (!Objects.equals(this.marketTreatmentPartDetailCreational, other.marketTreatmentPartDetailCreational)) {
            return false;
        }
        return true;
    }

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