View Javadoc
1   package net.sumaris.core.vo.technical.extraction;
2   
3   /*-
4    * #%L
5    * SUMARiS:: Core
6    * %%
7    * Copyright (C) 2018 SUMARiS Consortium
8    * %%
9    * This program is free software: you can redistribute it and/or modify
10   * it under the terms of the GNU General Public License as
11   * published by the Free Software Foundation, either version 3 of the
12   * License, or (at your option) any later version.
13   * 
14   * This program is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   * GNU General Public License for more details.
18   * 
19   * You should have received a copy of the GNU General Public
20   * License along with this program.  If not, see
21   * <http://www.gnu.org/licenses/gpl-3.0.html>.
22   * #L%
23   */
24  
25  import lombok.Builder;
26  import lombok.Data;
27  
28  @Data
29  @Builder
30  public class ProductFetchOptions {
31  
32      public static ProductFetchOptions MINIMAL = builder()
33              .withRecorderDepartment(false)
34              .withRecorderPerson(false)
35              .withTables(true)
36              .withStratum(true)
37              .withColumns(false)
38              .withColumnValues(false)
39              .build();
40      public static ProductFetchOptions FOR_UPDATE = builder()
41              .withRecorderDepartment(true)
42              .withRecorderPerson(true)
43              .withTables(true)
44              .withStratum(true)
45              .withColumns(false)
46              .withColumnValues(false)
47              .build();
48      public static ProductFetchOptions MINIMAL_WITH_TABLES = builder()
49              .withRecorderDepartment(false)
50              .withRecorderPerson(false)
51              .withTables(true)
52              .withStratum(true)
53              .withColumns(false)
54              .withColumnValues(false)
55              .build();
56      public static ProductFetchOptions NO_COLUMNS = builder()
57              .withColumns(false)
58              .withColumnValues(false)
59              .build();
60  
61      private boolean withRecorderDepartment = true;
62      private boolean withRecorderPerson = true;
63      private boolean withTables = true;
64      private boolean withColumns = false;
65      private boolean withColumnValues = false;
66      private boolean withStratum = false;
67  
68  }