Created
April 30, 2015 05:07
-
-
Save martinusadyh/94d70b1baca98c8baee3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Domain class yang terkait | |
// domain | |
@MappedSuperclass | |
public class BaseEntity implements Serializable { | |
private static final long serialVersionUID = 1L; | |
@Id | |
@GeneratedValue(generator = "system-uuid") | |
@GenericGenerator(name = "system-uuid", strategy = "uuid2") | |
@Column(name = "sid") | |
private String sid; | |
@Temporal(TemporalType.TIMESTAMP) | |
@Column(name = "created_date") | |
private Date createdDate = new Date(); | |
.... | |
.... | |
} | |
@Entity | |
@Table(name = "ic_mas_testA") | |
public class TestA extends BaseEntity { | |
private String kode; | |
private String keterangan; | |
... | |
... | |
} | |
@Entity | |
@Table(name = "ic_trs_sod_tmp_dtl") | |
@org.hibernate.annotations.Table( | |
appliesTo = "ic_trs_sod_tmp_dtl", | |
indexes = { | |
@Index(name = "ic_trs_sod_tmp_dtl1_idx0", columnNames = {"catat_order_sid", "bu_sid", "cust_sid", "brg_bu_sid"}) | |
}) | |
public class SodTmpDetail extends BaseEntity { | |
private static final long serialVersionUID = 1L; | |
private String barangKode; | |
... | |
... | |
} | |
@Entity | |
@Table(name = "ic_mas_barang_bu", | |
uniqueConstraints = { | |
@UniqueConstraint(columnNames = { | |
"bu_kode", | |
"brg_kode" | |
}) | |
}) | |
@org.hibernate.annotations.Table( | |
appliesTo = "ic_mas_barang_bu", | |
indexes = { | |
@Index(name = "ic_mas_barang_bu_idx1", columnNames = {"bu_kode", "brg_kode", "kategori_kode"}) | |
}) | |
public class BarangBU extends BaseEntity { | |
private static final long serialVersionUID = 1L; | |
private String brgNama1; | |
... | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment