1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sumaris.core.model.technical.extraction;
24
25 import lombok.Data;
26 import lombok.experimental.FieldNameConstants;
27 import net.sumaris.core.model.referential.IItemReferentialEntity;
28 import net.sumaris.core.model.referential.Status;
29
30 import javax.persistence.*;
31 import java.util.Date;
32
33 @Data
34 @FieldNameConstants
35 @Entity
36 @Cacheable
37 @Table(name = "extraction_product_strata")
38 public class ExtractionProductStrata implements IItemReferentialEntity {
39
40 @Id
41 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "EXTRACTION_PRODUCT_STRATA_SEQ")
42 @SequenceGenerator(name = "EXTRACTION_PRODUCT_STRATA_SEQ", sequenceName="EXTRACTION_PRODUCT_STRATA_SEQ")
43 private Integer id;
44
45 @Column(nullable = false, length = IItemReferentialEntity.LENGTH_LABEL)
46 private String label;
47
48 @Column(length = IItemReferentialEntity.LENGTH_NAME)
49 private String name;
50
51 @ManyToOne(fetch = FetchType.LAZY)
52 @JoinColumn(name = "status_fk", nullable = false)
53 private Status status;
54
55 @Column(name = "creation_date", nullable = false)
56 @Temporal(TemporalType.TIMESTAMP)
57 private Date creationDate;
58
59 @Column(name = "update_date")
60 @Temporal(TemporalType.TIMESTAMP)
61 private Date updateDate;
62
63 @Column(name = "is_default")
64 private Boolean isDefault;
65
66 @ManyToOne(fetch = FetchType.LAZY)
67 @JoinColumn(name = "extraction_product_fk", nullable = false)
68 private ExtractionProduct product;
69
70 @ManyToOne(fetch = FetchType.LAZY)
71 @JoinColumn(name = "extraction_table_fk")
72 private ExtractionProductTable table;
73
74 @ManyToOne(fetch = FetchType.LAZY)
75 @JoinColumn(name = "time_extraction_column_fk")
76 private ExtractionProductColumn timeColumn;
77
78 @ManyToOne(fetch = FetchType.LAZY)
79 @JoinColumn(name = "space_extraction_column_fk")
80 private ExtractionProductColumn spaceColumn;
81
82 @ManyToOne(fetch = FetchType.LAZY)
83 @JoinColumn(name = "agg_extraction_column_fk")
84 private ExtractionProductColumn aggColumn;
85
86 @ManyToOne(fetch = FetchType.LAZY)
87 @JoinColumn(name = "tech_extraction_column_fk")
88 private ExtractionProductColumn techColumn;
89
90 @Column(name = "agg_function", length = 30)
91 private String aggFunction;
92
93 }