1 package net.sumaris.core.model.technical.extraction.rdb;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import lombok.Data;
26 import lombok.experimental.FieldNameConstants;
27 import net.sumaris.core.dao.technical.model.IEntity;
28 import net.sumaris.core.dao.technical.schema.DatabaseTableEnum;
29
30 import javax.persistence.*;
31 import java.io.Serializable;
32
33 @Data
34 @FieldNameConstants
35 @Entity
36 @Table(name = "p01_rdb_station")
37 public class ProductRdbStation implements Serializable, IEntity<Integer> {
38
39 public static final DatabaseTableEnum TABLE = DatabaseTableEnum.P01_RDB_STATION;
40
41 public static final String COLUMN_SAMPLING_TYPE = ProductRdbTrip.COLUMN_SAMPLING_TYPE;
42 public static final String COLUMN_VESSEL_FLAG_COUNTRY = ProductRdbTrip.COLUMN_VESSEL_FLAG_COUNTRY;
43 public static final String COLUMN_LANDING_COUNTRY = ProductRdbTrip.COLUMN_LANDING_COUNTRY;
44 public static final String COLUMN_YEAR = ProductRdbTrip.COLUMN_YEAR;
45 public static final String COLUMN_PROJECT = ProductRdbTrip.COLUMN_PROJECT;
46 public static final String COLUMN_TRIP_CODE = ProductRdbTrip.COLUMN_TRIP_CODE;
47
48 public static final String COLUMN_STATION_NUMBER = "station_number";
49 public static final String COLUMN_FISHING_VALIDITY = "fishing_validity";
50 public static final String COLUMN_AGGREGATION_LEVEL = "aggregation_level";
51 public static final String COLUMN_CATCH_REGISTRATION = "catch_registration";
52 public static final String COLUMN_SPECIES_REGISTRATION = "species_registration";
53 public static final String COLUMN_DATE = "date";
54 public static final String COLUMN_TIME = "time";
55 public static final String COLUMN_FISHING_TIME = "fishing_time";
56 public static final String COLUMN_POS_START_LAT = "pos_start_lat";
57 public static final String COLUMN_POS_START_LON = "pos_start_lon";
58 public static final String COLUMN_POS_END_LAT = "pos_end_lat";
59 public static final String COLUMN_POS_END_LON = "pos_end_lon";
60 public static final String COLUMN_AREA = "area";
61 public static final String COLUMN_STATISTICAL_RECTANGLE = "statistical_rectangle";
62 public static final String COLUMN_SUB_POLYGON = "sub_polygon";
63 public static final String COLUMN_MAIN_FISHING_DEPTH = "main_fishing_depth";
64 public static final String COLUMN_MAIN_WATER_DEPTH = "main_water_depth";
65 public static final String COLUMN_NATIONAL_METIER = "national_metier";
66 public static final String COLUMN_EU_METIER_LEVEL5 = "eu_metier_level5";
67 public static final String COLUMN_EU_METIER_LEVEL6 = "eu_metier_level6";
68 public static final String COLUMN_GEAR_TYPE = "gear_type";
69 public static final String COLUMN_MESH_SIZE = "mesh_size";
70 public static final String COLUMN_SELECTION_DEVICE = "selection_device";
71 public static final String COLUMN_MESH_SIZE_SELECTION_DEVICE = "mesh_size_selection_device";
72
73 @Id
74 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "p01_rdb_station_seq")
75 @SequenceGenerator(name = "p01_rdb_station_seq", sequenceName="p01_rdb_station_seq")
76 private Integer id;
77
78 @Column(nullable = false, length = 2, name = COLUMN_SAMPLING_TYPE)
79 private String samplingType;
80
81 @Column(nullable = false, length = 3, name = COLUMN_LANDING_COUNTRY)
82 private String landingCountry;
83
84 @Column(nullable = false, length = 3, name = COLUMN_VESSEL_FLAG_COUNTRY)
85 private String vesselFlagCountry;
86
87 @Column(nullable = false, scale = 4, name = COLUMN_YEAR)
88 private Integer year;
89
90 @Column(nullable = false, name = COLUMN_PROJECT)
91 private String project;
92
93 @Column(nullable = false, name = COLUMN_TRIP_CODE, length = 50)
94 private String tripCode;
95
96 @Column(name = COLUMN_STATION_NUMBER, scale=6)
97 private Integer stationNumber;
98
99 @Column(name = COLUMN_FISHING_VALIDITY, length=1)
100 private String fishingValidity;
101
102 @Column(name = COLUMN_AGGREGATION_LEVEL, length=1)
103 private String aggregationLevel;
104
105 @Column(nullable = false, length= 3, name = COLUMN_CATCH_REGISTRATION)
106 private String catchRegistration;
107
108 @Column(name = COLUMN_SPECIES_REGISTRATION, length = 25)
109 private String speciesRegistration;
110
111 @Column(name = COLUMN_DATE, length = 10)
112 private String date;
113
114 @Column(name = COLUMN_TIME, length = 8)
115 private String time;
116
117 @Column(name = COLUMN_FISHING_TIME, scale=6)
118 private Integer fishingTime;
119
120 @Column(scale=9, precision=7, name = COLUMN_POS_START_LAT)
121 private Double positionStartLatitude;
122
123 @Column(scale=10, precision=7, name = COLUMN_POS_START_LON)
124 private Double positionStartLongitude;
125
126 @Column(scale=9, precision=7, name = COLUMN_POS_END_LAT)
127 private Double positionEndLatitude;
128
129 @Column(scale=10, precision=7, name = COLUMN_POS_END_LON)
130 private Double positionEndLongitude;
131
132 @Column(nullable = false, length = 25, name = COLUMN_AREA)
133 private String area;
134
135 @Column(length = 25, name = COLUMN_STATISTICAL_RECTANGLE)
136 private String statisticalRectangle;
137
138 @Column(length = 25, name = COLUMN_SUB_POLYGON)
139 private String subPolygon;
140
141 @Column(scale = 5, name = COLUMN_MAIN_FISHING_DEPTH)
142 private Integer mainFishingDepth;
143
144 @Column(scale = 5, name = COLUMN_MAIN_WATER_DEPTH)
145 private Integer mainWaterDepth;
146
147 @Column(length = 25, name = COLUMN_NATIONAL_METIER)
148 private String nationalMetier;
149
150 @Column(length = 25, name = COLUMN_EU_METIER_LEVEL5)
151 private String metierLevel5;
152
153 @Column(nullable = false, length = 25, name = COLUMN_EU_METIER_LEVEL6)
154 private String metierLevel6;
155
156 @Column(nullable = false, length = 5, name = COLUMN_GEAR_TYPE)
157 private String gearType;
158
159 @Column(scale = 5, name = COLUMN_MESH_SIZE)
160 private Integer meshSize;
161
162 @Column(scale = 5, name = COLUMN_SELECTION_DEVICE)
163 private Integer selectionDevice;
164
165 @Column(scale = 5, name = COLUMN_MESH_SIZE_SELECTION_DEVICE)
166 private Integer meshSizeSelectionDevice;
167 }