View Javadoc
1   package fr.ifremer.tutti.service.pupitri.report;
2   
3   /*
4    * #%L
5    * Tutti :: Service
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2012 - 2014 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU General Public License as
13   * published by the Free Software Foundation, either version 3 of the
14   * License, or (at your option) any later version.
15   * 
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   * 
21   * You should have received a copy of the GNU General Public
22   * License along with this program.  If not, see
23   * <http://www.gnu.org/licenses/gpl-3.0.html>.
24   * #L%
25   */
26  
27  import fr.ifremer.tutti.service.pupitri.PupitriSignContext;
28  
29  /**
30   * Created on 11/22/14.
31   *
32   * @author Tony Chemit - chemit@codelutin.com
33   * @since 3.11
34   */
35  public class PupitriImportReportRow {
36  
37      private boolean sorted;
38  
39      private String speciesCode;
40  
41      private String speciesName;
42  
43      private String speciesVernucalCode;
44  
45      private String sign;
46  
47      private float sortedWeight;
48  
49      private int nbBox;
50  
51      private int nbSmallBox;
52  
53      private int nbBigBox;
54  
55      public static PupitriImportReportRow newRow(String code,
56                                                  String name,
57                                                  String vernacularCode,
58                                                  boolean sorted,
59                                                  PupitriSignContext signContext) {
60          PupitriImportReportRow result = new PupitriImportReportRow();
61          result.speciesCode = code;
62          result.speciesName = name;
63          result.speciesVernucalCode = vernacularCode;
64          result.sorted = sorted;
65          result.sign = signContext.getSigns().getSign();
66          result.sortedWeight = signContext.getWeight();
67          result.nbBox = signContext.getNbBox();
68          result.nbSmallBox = signContext.getNbSmallBox();
69          result.nbBigBox = signContext.getNbBigBox();
70          return result;
71      }
72  
73      public String getSpeciesCode() {
74          return speciesCode;
75      }
76  
77      public String getSpeciesName() {
78          return speciesName;
79      }
80  
81      public String getSpeciesVernucalCode() {
82          return speciesVernucalCode;
83      }
84  
85      public boolean isSorted() {
86          return sorted;
87      }
88  
89      public float getSortedWeight() {
90          return sortedWeight;
91      }
92  
93      public String getSign() {
94          return sign;
95      }
96  
97      public int getNbBox() {
98          return nbBox;
99      }
100 
101     public int getNbSmallBox() {
102         return nbSmallBox;
103     }
104 
105     public int getNbBigBox() {
106         return nbBigBox;
107     }
108 }