1 package net.sumaris.core.dao.technical.schema;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 import com.google.common.collect.Lists;
27
28 import java.util.List;
29
30
31
32
33
34
35
36 public enum DatabaseTableEnum {
37
38
39 P01_RDB_LANDING,
40 P01_RDB_TRIP,
41 P01_RDB_STATION,
42 P01_RDB_SPECIES_LIST,
43 P01_RDB_SPECIES_LENGTH
44 ;
45
46 private final boolean association;
47
48 DatabaseTableEnum() {
49 this(false);
50 }
51
52 DatabaseTableEnum(boolean association) {
53 this.association = association;
54 }
55
56 public boolean isAssociation() {
57 return association;
58 }
59
60 public static DatabaseTableEnum[] getTables() {
61 List<DatabaseTableEnum> result = Lists.newArrayList();
62 for (DatabaseTableEnum table : values()) {
63 if (!table.isAssociation()) {
64 result.add(table);
65 }
66 }
67 return result.toArray(new DatabaseTableEnum[result.size()]);
68 }
69
70 }