Merge branch 'dev/master/unit-kerja' into prod/base
This commit is contained in:
commit
4cdd73fba3
@ -1,17 +1,16 @@
|
||||
package com.jasamedika.medifirst2000.dao;
|
||||
|
||||
import com.jasamedika.medifirst2000.entities.SubUnitKerjaPegawai;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.jasamedika.medifirst2000.entities.SubUnitKerjaPegawai;
|
||||
|
||||
@Repository
|
||||
public interface SubUnitKerjaDao extends PagingAndSortingRepository<SubUnitKerjaPegawai, Integer> {
|
||||
@Repository("subUnitKerjaDao")
|
||||
public interface SubUnitKerjaDao extends JpaRepository<SubUnitKerjaPegawai, Integer> {
|
||||
|
||||
@Query("select model from SubUnitKerjaPegawai model where model.statusEnabled is true and model.id != 0 order by model.name")
|
||||
List<SubUnitKerjaPegawai> getAllSubUnitKerja();
|
||||
|
||||
@ -1,26 +1,24 @@
|
||||
package com.jasamedika.medifirst2000.entities;
|
||||
|
||||
import com.jasamedika.medifirst2000.base.BaseMaster;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.jasamedika.medifirst2000.base.BaseMaster;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
|
||||
@MappedSuperclass
|
||||
public class BaseKeyValueMaster extends BaseMaster {
|
||||
|
||||
|
||||
@NotNull(message="Name tidak boleh kosong")
|
||||
public class BaseKeyValueMaster extends BaseMaster {
|
||||
@NotNull(message = "Name tidak boleh kosong")
|
||||
@Column(name = "Name", nullable = false, length = 100)
|
||||
@Caption(value = "Name")
|
||||
private String name;
|
||||
public void setName(String name)
|
||||
{
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
@ -1,95 +1,53 @@
|
||||
package com.jasamedika.medifirst2000.entities;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
import static javax.persistence.FetchType.LAZY;
|
||||
import static javax.persistence.GenerationType.SEQUENCE;
|
||||
|
||||
@Entity
|
||||
@Table(name="SubUnitkerja_M")
|
||||
public class SubUnitKerjaPegawai extends BaseKeyValueMaster{
|
||||
public SubUnitKerjaPegawai()
|
||||
{}
|
||||
|
||||
public SubUnitKerjaPegawai(Integer id, String name)
|
||||
{
|
||||
@Table(name = "SubUnitkerja_M", uniqueConstraints = {
|
||||
@UniqueConstraint(columnNames = { "objectUnitKerjaPegawaifk", "Name" }), })
|
||||
@NoArgsConstructor
|
||||
@Getter
|
||||
@Setter
|
||||
public class SubUnitKerjaPegawai extends BaseKeyValueMaster {
|
||||
|
||||
public SubUnitKerjaPegawai(Integer id, String name) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.setName(name);
|
||||
}
|
||||
|
||||
|
||||
public SubUnitKerjaPegawai(Integer id) {
|
||||
super();
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.subunitkerjapegawai_m_id_seq")
|
||||
@javax.persistence.SequenceGenerator(name = "public.subunitkerjapegawai_m_id_seq", sequenceName = "public.subunitkerjapegawai_m_id_seq", allocationSize = 1)
|
||||
@GeneratedValue(strategy = SEQUENCE, generator = "public.subunitkerjapegawai_m_id_seq")
|
||||
@SequenceGenerator(name = "public.subunitkerjapegawai_m_id_seq", sequenceName = "public.subunitkerjapegawai_m_id_seq", allocationSize = 1)
|
||||
@Column(name = "id")
|
||||
protected Integer id;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "objectUnitKerjaPegawaifk")
|
||||
@Caption(value = "Object UnitKerjaPegawai ")
|
||||
private UnitKerjaPegawai unitKerja;
|
||||
|
||||
|
||||
@Column(name = "objectUnitKerjaPegawaifk", insertable = false, updatable = false)
|
||||
private Integer unitKerjaId;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "objectJabatanKepalafk")
|
||||
@Caption(value = "Object Jabatan Kepala ")
|
||||
private Jabatan jabatanKepala;
|
||||
|
||||
|
||||
@Column(name = "objectJabatanKepalafk", insertable = false, updatable = false)
|
||||
private Integer jabatanKepalaId;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public UnitKerjaPegawai getUnitKerja() {
|
||||
return unitKerja;
|
||||
}
|
||||
|
||||
public void setUnitKerja(UnitKerjaPegawai unitKerja) {
|
||||
this.unitKerja = unitKerja;
|
||||
}
|
||||
|
||||
public Integer getUnitKerjaId() {
|
||||
return unitKerjaId;
|
||||
}
|
||||
|
||||
public void setUnitKerjaId(Integer unitKerjaId) {
|
||||
this.unitKerjaId = unitKerjaId;
|
||||
}
|
||||
|
||||
public Jabatan getJabatanKepala() {
|
||||
return jabatanKepala;
|
||||
}
|
||||
|
||||
public void setJabatanKepala(Jabatan jabatanKepala) {
|
||||
this.jabatanKepala = jabatanKepala;
|
||||
}
|
||||
|
||||
public Integer getJabatanKepalaId() {
|
||||
return jabatanKepalaId;
|
||||
}
|
||||
|
||||
public void setJabatanKepalaId(Integer jabatanKepalaId) {
|
||||
this.jabatanKepalaId = jabatanKepalaId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,26 +1,22 @@
|
||||
package com.jasamedika.medifirst2000.vo;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
|
||||
|
||||
public class BaseKeyValueMasterVO extends BaseMasterVO {
|
||||
|
||||
|
||||
@NotNull(message="Name tidak boleh kosong")
|
||||
public class BaseKeyValueMasterVO extends BaseMasterVO {
|
||||
@NotNull(message = "Name tidak boleh kosong")
|
||||
@Column(name = "Name", nullable = false, length = 100)
|
||||
@Caption(value = "Name")
|
||||
private String name;
|
||||
public void setName(String name)
|
||||
{
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
@ -1,25 +1,11 @@
|
||||
package com.jasamedika.medifirst2000.vo;
|
||||
|
||||
public class SubUnitKerjaPegawaiVO extends BaseKeyValueMasterVO{
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class SubUnitKerjaPegawaiVO extends BaseKeyValueMasterVO {
|
||||
private UnitKerjaPegawaiVO unitKerja;
|
||||
|
||||
private Integer unitKerjaId;
|
||||
|
||||
public UnitKerjaPegawaiVO getUnitKerja() {
|
||||
return unitKerja;
|
||||
}
|
||||
|
||||
public void setUnitKerja(UnitKerjaPegawaiVO unitKerja) {
|
||||
this.unitKerja = unitKerja;
|
||||
}
|
||||
|
||||
public Integer getUnitKerjaId() {
|
||||
return unitKerjaId;
|
||||
}
|
||||
|
||||
public void setUnitKerjaId(Integer unitKerjaId) {
|
||||
this.unitKerjaId = unitKerjaId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user