View Javadoc
1   package fr.ifremer.tutti.service.genericformat.csv;
2   
3   /*
4    * #%L
5    * Tutti :: Service
6    * %%
7    * Copyright (C) 2012 - 2014 Ifremer
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 fr.ifremer.tutti.persistence.entities.referential.GearWithOriginalRankOrder;
26  import fr.ifremer.tutti.persistence.entities.referential.Person;
27  import fr.ifremer.tutti.persistence.entities.referential.TuttiLocation;
28  import fr.ifremer.tutti.persistence.entities.referential.Vessel;
29  
30  import java.util.Date;
31  import java.util.List;
32  
33  /**
34   * A row in a survey export.
35   *
36   * @author Tony Chemit - chemit@codelutin.com
37   * @since 1.3
38   */
39  public class SurveyRow extends RowWithCruiseContextSupport {
40  
41      private static final long serialVersionUID = 1L;
42  
43      public static final String PROPERTY_COUNTRY = "country";
44  
45      public static final String PROPERTY_ID_SISMER = "idSismer";
46  
47      public static final String PROPERTY_OBJECT_ID = "objectId";
48  
49      public static SurveyRow newEmptyInstance() {
50          SurveyRow row = new SurveyRow();
51          row.forImport();
52          return row;
53      }
54  
55      protected TuttiLocation country;
56  
57      private Integer objectId;
58  
59      public void setCountry(TuttiLocation country) {
60          this.country = country;
61      }
62  
63      public void setObjectId(Integer id) {
64          this.objectId = id;
65      }
66  
67      public void setDepartureLocation(TuttiLocation departureLocation) {
68          getCruise().setDepartureLocation(departureLocation);
69      }
70  
71      public void setReturnLocation(TuttiLocation returnLocation) {
72          getCruise().setReturnLocation(returnLocation);
73      }
74  
75      public void setName(String name) {
76          getCruise().setName(name);
77      }
78  
79      public void setHeadOfMission(List<Person> headOfMission) {
80          getCruise().setHeadOfMission(headOfMission);
81      }
82  
83      public void setMultirigNumber(Integer multirigNumber) {
84          getCruise().setMultirigNumber(multirigNumber);
85      }
86  
87      public void setHeadOfSortRoom(List<Person> headOfSortRoom) {
88          getCruise().setHeadOfSortRoom(headOfSortRoom);
89      }
90  
91      public void setEndDate(Date endDate) {
92          getCruise().setEndDate(endDate);
93      }
94  
95      public void setGear(List<GearWithOriginalRankOrder> gear) {
96          getCruise().setGear(gear);
97      }
98  
99      public void setComment(String comment) {
100         getCruise().setComment(comment);
101     }
102 
103     public void setVessel(Vessel vessel) {
104         getCruise().setVessel(vessel);
105     }
106 
107     public TuttiLocation getZone() {
108         return getCruise().getProgram().getZone();
109     }
110 
111     public Vessel getVessel() {
112         return getCruise().getVessel();
113     }
114 
115     public TuttiLocation getCountry() {
116         return country;
117     }
118 
119     public Integer getObjectId() {
120         return objectId;
121     }
122 
123     public String getName() {
124         return getCruise().getName();
125     }
126 
127     public List<GearWithOriginalRankOrder> getGear() {
128         return getCruise().getGear();
129     }
130 
131     public TuttiLocation getDepartureLocation() {
132         return getCruise().getDepartureLocation();
133     }
134 
135     public Date getEndDate() {
136         return getCruise().getEndDate();
137     }
138 
139     public TuttiLocation getReturnLocation() {
140         return getCruise().getReturnLocation();
141     }
142 
143     public String getComment() {
144         return getCruise().getComment();
145     }
146 
147     public List<Person> getHeadOfMission() {
148         return getCruise().getHeadOfMission();
149     }
150 
151     public List<Person> getHeadOfSortRoom() {
152         return getCruise().getHeadOfSortRoom();
153     }
154 
155     public Integer getMultirigNumber() {
156         return getCruise().getMultirigNumber();
157     }
158 
159     // see http://forge.codelutin.com/issues/2877
160     public String getIdSismer() {
161         return "";
162     }
163 }