package com.jasamedika.medifirst2000.entities; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; import com.fasterxml.jackson.annotation.JsonManagedReference; import com.jasamedika.medifirst2000.base.BaseTransaction; import com.jasamedika.medifirst2000.helper.Caption; @Entity @Table(name = "MappingCycle_T") public class MappingCycle extends BaseTransaction { private static final long serialVersionUID = -6406697454261779640L; @ManyToOne @JoinColumn(name = "ObjectJenisLinenFk") private JenisLinen jenisLinen; @Column(name = "ObjectJenisLinenFk", nullable = true, insertable = false, updatable = false) private Integer jenisLinenId; @ManyToOne @JoinColumn(name = "ObjectMesinFk") private Mesin mesin; @Column(name = "ObjectMesinFk", nullable = true, insertable = false, updatable = false) private Integer mesinId; @ManyToOne @JoinColumn(name = "ObjectProsesCuciFk") private ProsesCuci prosesCuci; @Column(name = "ObjectProsesCuciFk", nullable = true, insertable = false, updatable = false) private Integer prosesCuciId; @JsonManagedReference @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "mappingCycle") @Caption(value = "mapCycle") private Set mapCycle = new HashSet(); //private Set mappingCycleLaundry = new HashSet(); public JenisLinen getJenisLinen() { return jenisLinen; } public void setJenisLinen(JenisLinen jenisLinen) { this.jenisLinen = jenisLinen; } public Mesin getMesin() { return mesin; } public void setMesin(Mesin mesin) { this.mesin = mesin; } public ProsesCuci getProsesCuci() { return prosesCuci; } public void setProsesCuci(ProsesCuci prosesCuci) { this.prosesCuci = prosesCuci; } /* public Set getMappingCycleLaundry() { return mappingCycleLaundry; } public void setMappingCycleLaundry(Set mappingCycleLaundry) { this.mappingCycleLaundry = mappingCycleLaundry; } */ public Set getMapCycle() { return mapCycle; } public void setMapCycle(Set mapCycle) { this.mapCycle = mapCycle; } }