View Javadoc
1   package fr.ifremer.reefdb.ui.swing.content.observation.survey;
2   
3   /*
4    * #%L
5    * Reef DB :: UI
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2015 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU Affero General Public License as published by
13   * the Free Software Foundation, either version 3 of the License, or
14   * (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 Affero General Public License
22   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23   * #L%
24   */
25  
26  import fr.ifremer.reefdb.dto.CoordinateDTO;
27  import fr.ifremer.reefdb.dto.ErrorDTO;
28  import fr.ifremer.reefdb.dto.ReefDbBeanFactory;
29  import fr.ifremer.reefdb.dto.SynchronizationStatusDTO;
30  import fr.ifremer.reefdb.dto.configuration.programStrategy.ProgramDTO;
31  import fr.ifremer.reefdb.dto.data.CoordinateAware;
32  import fr.ifremer.reefdb.dto.data.LocationCoordinateAware;
33  import fr.ifremer.reefdb.dto.data.PositioningPrecisionAware;
34  import fr.ifremer.reefdb.dto.data.measurement.MeasurementDTO;
35  import fr.ifremer.reefdb.dto.data.photo.PhotoDTO;
36  import fr.ifremer.reefdb.dto.data.sampling.SamplingOperationDTO;
37  import fr.ifremer.reefdb.dto.data.survey.CampaignDTO;
38  import fr.ifremer.reefdb.dto.data.survey.OccasionDTO;
39  import fr.ifremer.reefdb.dto.data.survey.SurveyDTO;
40  import fr.ifremer.reefdb.dto.referential.*;
41  import fr.ifremer.reefdb.dto.referential.pmfm.PmfmDTO;
42  import fr.ifremer.reefdb.ui.swing.util.AbstractReefDbBeanUIModel;
43  import org.nuiton.jaxx.application.swing.tab.TabContentModel;
44  import org.nuiton.util.beans.Binder;
45  import org.nuiton.util.beans.BinderFactory;
46  
47  import java.time.LocalDate;
48  import java.util.Collection;
49  import java.util.Date;
50  import java.util.List;
51  
52  import static org.nuiton.i18n.I18n.n;
53  
54  /**
55   * Modele pour l onglet observation general.
56   */
57  public class SurveyDetailsTabUIModel extends AbstractReefDbBeanUIModel<SurveyDTO, SurveyDetailsTabUIModel>
58          implements SurveyDTO, TabContentModel, PositioningPrecisionAware, CoordinateAware, LocationCoordinateAware {
59  
60      /** Constant <code>PROPERTY_OBSERVATION_MODEL="observationModel"</code> */
61      public static final String PROPERTY_OBSERVATION_MODEL = "observationModel";
62      /** Constant <code>PROPERTY_EDITABLE="editable"</code> */
63      public static final String PROPERTY_EDITABLE = "editable";
64      private static final Binder<SurveyDetailsTabUIModel, SurveyDTO> TO_BEAN_BINDER
65              = BinderFactory.newBinder(SurveyDetailsTabUIModel.class, SurveyDTO.class);
66      private static final Binder<SurveyDTO, SurveyDetailsTabUIModel> FROM_BEAN_BINDER
67              = BinderFactory.newBinder(SurveyDTO.class, SurveyDetailsTabUIModel.class);
68      private SurveyDTO observationModel;
69      private boolean adjusting;
70      private boolean editable;
71      private List<PersonDTO> selectedObservers;
72  
73      /**
74       * Constructor.
75       */
76      public SurveyDetailsTabUIModel() {
77          super(FROM_BEAN_BINDER, TO_BEAN_BINDER);
78      }
79  
80      /**
81       * <p>isEditable.</p>
82       *
83       * @return a boolean.
84       */
85      public boolean isEditable() {
86          return editable;
87      }
88  
89      /**
90       * <p>Setter for the field <code>editable</code>.</p>
91       *
92       * @param editable a boolean.
93       */
94      public void setEditable(boolean editable) {
95          this.editable = editable;
96          firePropertyChange(PROPERTY_EDITABLE, null, editable);
97      }
98  
99      /**
100      * <p>Getter for the field <code>selectedObservers</code>.</p>
101      *
102      * @return a {@link java.util.List} object.
103      */
104     public List<PersonDTO> getSelectedObservers() {
105         return selectedObservers;
106     }
107 
108     /**
109      * <p>Setter for the field <code>selectedObservers</code>.</p>
110      *
111      * @param selectedObservers a {@link java.util.List} object.
112      */
113     public void setSelectedObservers(List<PersonDTO> selectedObservers) {
114         this.selectedObservers = selectedObservers;
115         setModify(true);
116     }
117 
118     /**
119      * <p>Getter for the field <code>observationModel</code>.</p>
120      *
121      * @return a {@link fr.ifremer.reefdb.dto.data.survey.SurveyDTO} object.
122      */
123     public SurveyDTO getObservationModel() {
124         return observationModel;
125     }
126 
127     /**
128      * <p>Setter for the field <code>observationModel</code>.</p>
129      *
130      * @param observationModel a {@link fr.ifremer.reefdb.dto.data.survey.SurveyDTO} object.
131      */
132     public void setObservationModel(SurveyDTO observationModel) {
133         this.observationModel = observationModel;
134         firePropertyChange(PROPERTY_OBSERVATION_MODEL, null, observationModel);
135     }
136 
137     /**
138      * <p>isAdjusting.</p>
139      *
140      * @return a boolean.
141      */
142     public boolean isAdjusting() {
143         return adjusting;
144     }
145 
146     /**
147      * <p>Setter for the field <code>adjusting</code>.</p>
148      *
149      * @param adjusting a boolean.
150      */
151     public void setAdjusting(boolean adjusting) {
152         this.adjusting = adjusting;
153     }
154 
155     /** {@inheritDoc} */
156     @Override
157     public boolean isEmpty() {
158         return false; //isCreate();
159     }
160 
161     /** {@inheritDoc} */
162     @Override
163     public String getTitle() {
164         return n("reefdb.survey.general.title");
165     }
166 
167     /** {@inheritDoc} */
168     @Override
169     public String getIcon() {
170         return null;
171     }
172 
173     /** {@inheritDoc} */
174     @Override
175     public boolean isCloseable() {
176         return false;
177     }
178 
179     /** {@inheritDoc} */
180     @Override
181     protected SurveyDTO newBean() {
182         return ReefDbBeanFactory.newSurveyDTO();
183     }
184 
185     private CoordinateDTO getSurveyCoordinateToModify() {
186         if (getCoordinate() == null) {
187             setCoordinate(ReefDbBeanFactory.newCoordinateDTO());
188         }
189         return getCoordinate();
190     }
191 
192     /** {@inheritDoc} */
193     @Override
194     public Double getLatitude() {
195         return getSurveyCoordinateToModify().getMinLatitude();
196     }
197 
198     /** {@inheritDoc} */
199     @Override
200     public void setLatitude(final Double latitude) {
201         Double oldValue = getLatitude();
202         getSurveyCoordinateToModify().setMinLatitude(latitude);
203         firePropertyChange(PROPERTY_LATITUDE, oldValue, latitude);
204         setModify(true);
205     }
206 
207     /** {@inheritDoc} */
208     @Override
209     public Double getLongitude() {
210         return getSurveyCoordinateToModify().getMinLongitude();
211     }
212 
213     /** {@inheritDoc} */
214     @Override
215     public void setLongitude(final Double longitude) {
216         Double oldValue = getLongitude();
217         getSurveyCoordinateToModify().setMinLongitude(longitude);
218         firePropertyChange(PROPERTY_LONGITUDE, oldValue, longitude);
219         setModify(true);
220     }
221 
222     /** {@inheritDoc} */
223     @Override
224     public Double getLocationMinLatitude() {
225         return getLocation() == null || getLocation().getCoordinate() == null ? null : getLocation().getCoordinate().getMinLatitude();
226     }
227 
228     /**
229      * <p>setLocationMinLatitude.</p>
230      *
231      * @param dummy a {@link java.lang.Double} object.
232      */
233     public void setLocationMinLatitude(Double dummy) {
234     }
235 
236     /** {@inheritDoc} */
237     @Override
238     public Double getLocationMaxLatitude() {
239         return getLocation() == null || getLocation().getCoordinate() == null ? null : getLocation().getCoordinate().getMaxLatitude();
240     }
241 
242     /**
243      * <p>setLocationMaxLatitude.</p>
244      *
245      * @param dummy a {@link java.lang.Double} object.
246      */
247     public void setLocationMaxLatitude(Double dummy) {
248     }
249 
250     /** {@inheritDoc} */
251     @Override
252     public Double getLocationMinLongitude() {
253         return getLocation() == null || getLocation().getCoordinate() == null ? null : getLocation().getCoordinate().getMinLongitude();
254     }
255 
256     /**
257      * <p>setLocationMinLongitude.</p>
258      *
259      * @param dummy a {@link java.lang.Double} object.
260      */
261     public void setLocationMinLongitude(Double dummy) {
262     }
263 
264     /** {@inheritDoc} */
265     @Override
266     public Double getLocationMaxLongitude() {
267         return getLocation() == null || getLocation().getCoordinate() == null ? null : getLocation().getCoordinate().getMaxLongitude();
268     }
269 
270     /**
271      * <p>setLocationMaxLongitude.</p>
272      *
273      * @param dummy a {@link java.lang.Double} object.
274      */
275     public void setLocationMaxLongitude(Double dummy) {
276     }
277 
278     /** {@inheritDoc} */
279     @Override
280     public String getPositioningPrecision() {
281         return getPositioning() == null ? null : getPositioning().getPrecision();
282     }
283 
284     /**
285      * <p>setPositioningPrecision.</p>
286      *
287      * @param dummy a {@link java.lang.String} object.
288      */
289     public void setPositioningPrecision(String dummy) {
290     }
291 
292     /* DELEGATE METHODS */
293 
294     /** {@inheritDoc} */
295     @Override
296     public String getName() {
297         return delegateObject.getName();
298     }
299 
300     /** {@inheritDoc} */
301     @Override
302     public void setName(String name) {
303         delegateObject.setName(name);
304     }
305 
306     /** {@inheritDoc} */
307     @Override
308     public LocalDate getDate() {
309         return delegateObject.getDate();
310     }
311 
312     /** {@inheritDoc} */
313     @Override
314     public void setDate(LocalDate date) {
315         delegateObject.setDate(date);
316     }
317 
318     /** {@inheritDoc} */
319     @Override
320     public Integer getTime() {
321         return delegateObject.getTime();
322     }
323 
324     /** {@inheritDoc} */
325     @Override
326     public void setTime(Integer time) {
327         delegateObject.setTime(time);
328     }
329 
330     /** {@inheritDoc} */
331     @Override
332     public Double getPreciseDepth() {
333         return delegateObject.getPreciseDepth();
334     }
335 
336     /** {@inheritDoc} */
337     @Override
338     public void setPreciseDepth(Double preciseDepth) {
339         delegateObject.setPreciseDepth(preciseDepth);
340     }
341 
342     /** {@inheritDoc} */
343     @Override
344     public String getComment() {
345         return delegateObject.getComment();
346     }
347 
348     /** {@inheritDoc} */
349     @Override
350     public void setComment(String comment) {
351         delegateObject.setComment(comment);
352     }
353 
354     /** {@inheritDoc} */
355     @Override
356     public String getPositioningComment() {
357         return delegateObject.getPositioningComment();
358     }
359 
360     /** {@inheritDoc} */
361     @Override
362     public void setPositioningComment(String positioningComment) {
363         delegateObject.setPositioningComment(positioningComment);
364     }
365 
366     /** {@inheritDoc} */
367     @Override
368     public String getQualificationComment() {
369         return delegateObject.getQualificationComment();
370     }
371 
372     /** {@inheritDoc} */
373     @Override
374     public void setQualificationComment(String qualificationComment) {
375         delegateObject.setQualificationComment(qualificationComment);
376     }
377 
378     /** {@inheritDoc} */
379     @Override
380     public Date getUpdateDate() {
381         return delegateObject.getUpdateDate();
382     }
383 
384     /** {@inheritDoc} */
385     @Override
386     public void setUpdateDate(Date updateDate) {
387         delegateObject.setUpdateDate(updateDate);
388     }
389 
390     /** {@inheritDoc} */
391     @Override
392     public Date getControlDate() {
393         return delegateObject.getControlDate();
394     }
395 
396     /** {@inheritDoc} */
397     @Override
398     public void setControlDate(Date controlDate) {
399         delegateObject.setControlDate(controlDate);
400     }
401 
402     /** {@inheritDoc} */
403     @Override
404     public Date getValidationDate() {
405         return delegateObject.getValidationDate();
406     }
407 
408     /** {@inheritDoc} */
409     @Override
410     public void setValidationDate(Date validationDate) {
411         delegateObject.setValidationDate(validationDate);
412     }
413 
414     @Override
415     public String getValidationComment() {
416         return delegateObject.getValidationComment();
417     }
418 
419     @Override
420     public void setValidationComment(String validationComment) {
421         delegateObject.setValidationComment(validationComment);
422     }
423 
424     /** {@inheritDoc} */
425     @Override
426     public Date getQualificationDate() {
427         return delegateObject.getQualificationDate();
428     }
429 
430     /** {@inheritDoc} */
431     @Override
432     public void setQualificationDate(Date validationDate) {
433         delegateObject.setQualificationDate(validationDate);
434     }
435 
436     /** {@inheritDoc} */
437     @Override
438     public boolean isSamplingOperationsLoaded() {
439         return delegateObject.isSamplingOperationsLoaded();
440     }
441 
442     /** {@inheritDoc} */
443     @Override
444     public void setSamplingOperationsLoaded(boolean samplingOperationsLoaded) {
445         delegateObject.setSamplingOperationsLoaded(samplingOperationsLoaded);
446     }
447 
448     /** {@inheritDoc} */
449     @Override
450     public boolean isObserversLoaded() {
451         return delegateObject.isObserversLoaded();
452     }
453 
454     /** {@inheritDoc} */
455     @Override
456     public void setObserversLoaded(boolean observersLoaded) {
457         delegateObject.setObserversLoaded(observersLoaded);
458     }
459 
460     /** {@inheritDoc} */
461     @Override
462     public boolean isMeasurementsLoaded() {
463         return delegateObject.isMeasurementsLoaded();
464     }
465 
466     /** {@inheritDoc} */
467     @Override
468     public void setMeasurementsLoaded(boolean measurementsLoaded) {
469         delegateObject.setMeasurementsLoaded(measurementsLoaded);
470     }
471 
472     /** {@inheritDoc} */
473     @Override
474     public boolean isPhotosLoaded() {
475         return delegateObject.isPhotosLoaded();
476     }
477 
478     /** {@inheritDoc} */
479     @Override
480     public void setPhotosLoaded(boolean photosLoaded) {
481         delegateObject.setPhotosLoaded(photosLoaded);
482     }
483 
484     /** {@inheritDoc} */
485     @Override
486     public boolean isDirty() {
487         return delegateObject.isDirty();
488     }
489 
490     /** {@inheritDoc} */
491     @Override
492     public void setDirty(boolean dirty) {
493         delegateObject.setDirty(dirty);
494     }
495 
496     /** {@inheritDoc} */
497     @Override
498     public DepartmentDTO getRecorderDepartment() {
499         return delegateObject.getRecorderDepartment();
500     }
501 
502     /** {@inheritDoc} */
503     @Override
504     public void setRecorderDepartment(DepartmentDTO department) {
505         delegateObject.setRecorderDepartment(department);
506     }
507 
508     /** {@inheritDoc} */
509     @Override
510     public DepthDTO getDepth() {
511         return delegateObject.getDepth();
512     }
513 
514     /** {@inheritDoc} */
515     @Override
516     public void setDepth(DepthDTO depth) {
517         delegateObject.setDepth(depth);
518     }
519 
520     /** {@inheritDoc} */
521     @Override
522     public CoordinateDTO getCoordinate() {
523         return delegateObject.getCoordinate();
524     }
525 
526     /** {@inheritDoc} */
527     @Override
528     public void setCoordinate(CoordinateDTO coordinate) {
529         delegateObject.setCoordinate(coordinate);
530     }
531 
532     /** {@inheritDoc} */
533     @Override
534     public PositioningSystemDTO getPositioning() {
535         return delegateObject.getPositioning();
536     }
537 
538     /** {@inheritDoc} */
539     @Override
540     public void setPositioning(PositioningSystemDTO positioning) {
541         delegateObject.setPositioning(positioning);
542     }
543 
544     /** {@inheritDoc} */
545     @Override
546     public CampaignDTO getCampaign() {
547         return delegateObject.getCampaign();
548     }
549 
550     /** {@inheritDoc} */
551     @Override
552     public void setCampaign(CampaignDTO campaign) {
553         delegateObject.setCampaign(campaign);
554     }
555 
556     /** {@inheritDoc} */
557     @Override
558     public OccasionDTO getOccasion() {
559         return delegateObject.getOccasion();
560     }
561 
562     /** {@inheritDoc} */
563     @Override
564     public void setOccasion(OccasionDTO occasion) {
565         delegateObject.setOccasion(occasion);
566     }
567 
568     /** {@inheritDoc} */
569     @Override
570     public LocationDTO getLocation() {
571         return delegateObject.getLocation();
572     }
573 
574     /** {@inheritDoc} */
575     @Override
576     public void setLocation(LocationDTO location) {
577         delegateObject.setLocation(location);
578     }
579 
580     @Override
581     public DepartmentDTO getDepthAnalyst() {
582         return delegateObject.getDepthAnalyst();
583     }
584 
585     @Override
586     public void setDepthAnalyst(DepartmentDTO depthAnalyst) {
587         delegateObject.setDepthAnalyst(depthAnalyst);
588     }
589 
590     /** {@inheritDoc} */
591     @Override
592     public PmfmDTO getIndividualPmfms(int index) {
593         return delegateObject.getIndividualPmfms(index);
594     }
595 
596     /** {@inheritDoc} */
597     @Override
598     public boolean isIndividualPmfmsEmpty() {
599         return delegateObject.isIndividualPmfmsEmpty();
600     }
601 
602     /** {@inheritDoc} */
603     @Override
604     public int sizeIndividualPmfms() {
605         return delegateObject.sizeIndividualPmfms();
606     }
607 
608     /** {@inheritDoc} */
609     @Override
610     public void addIndividualPmfms(PmfmDTO individualPmfms) {
611         delegateObject.addIndividualPmfms(individualPmfms);
612     }
613 
614     /** {@inheritDoc} */
615     @Override
616     public void addAllIndividualPmfms(Collection<PmfmDTO> individualPmfms) {
617         delegateObject.addAllIndividualPmfms(individualPmfms);
618     }
619 
620     /** {@inheritDoc} */
621     @Override
622     public boolean removeIndividualPmfms(PmfmDTO individualPmfms) {
623         return delegateObject.removeIndividualPmfms(individualPmfms);
624     }
625 
626     /** {@inheritDoc} */
627     @Override
628     public boolean removeAllIndividualPmfms(Collection<PmfmDTO> individualPmfms) {
629         return delegateObject.removeAllIndividualPmfms(individualPmfms);
630     }
631 
632     /** {@inheritDoc} */
633     @Override
634     public boolean containsIndividualPmfms(PmfmDTO individualPmfms) {
635         return delegateObject.containsIndividualPmfms(individualPmfms);
636     }
637 
638     /** {@inheritDoc} */
639     @Override
640     public boolean containsAllIndividualPmfms(Collection<PmfmDTO> individualPmfms) {
641         return delegateObject.containsAllIndividualPmfms(individualPmfms);
642     }
643 
644     /** {@inheritDoc} */
645     @Override
646     public List<PmfmDTO> getIndividualPmfms() {
647         return delegateObject.getIndividualPmfms();
648     }
649 
650     /** {@inheritDoc} */
651     @Override
652     public void setIndividualPmfms(List<PmfmDTO> individualPmfms) {
653         delegateObject.setIndividualPmfms(individualPmfms);
654     }
655 
656     /** {@inheritDoc} */
657     @Override
658     public PmfmDTO getPmfms(int index) {
659         return delegateObject.getPmfms(index);
660     }
661 
662     /** {@inheritDoc} */
663     @Override
664     public boolean isPmfmsEmpty() {
665         return delegateObject.isPmfmsEmpty();
666     }
667 
668     /** {@inheritDoc} */
669     @Override
670     public int sizePmfms() {
671         return delegateObject.sizePmfms();
672     }
673 
674     /** {@inheritDoc} */
675     @Override
676     public void addPmfms(PmfmDTO pmfms) {
677         delegateObject.addPmfms(pmfms);
678     }
679 
680     /** {@inheritDoc} */
681     @Override
682     public void addAllPmfms(Collection<PmfmDTO> pmfms) {
683         delegateObject.addAllPmfms(pmfms);
684     }
685 
686     /** {@inheritDoc} */
687     @Override
688     public boolean removePmfms(PmfmDTO pmfms) {
689         return delegateObject.removePmfms(pmfms);
690     }
691 
692     /** {@inheritDoc} */
693     @Override
694     public boolean removeAllPmfms(Collection<PmfmDTO> pmfms) {
695         return delegateObject.removeAllPmfms(pmfms);
696     }
697 
698     /** {@inheritDoc} */
699     @Override
700     public boolean containsPmfms(PmfmDTO pmfms) {
701         return delegateObject.containsPmfms(pmfms);
702     }
703 
704     /** {@inheritDoc} */
705     @Override
706     public boolean containsAllPmfms(Collection<PmfmDTO> pmfms) {
707         return delegateObject.containsAllPmfms(pmfms);
708     }
709 
710     /** {@inheritDoc} */
711     @Override
712     public List<PmfmDTO> getPmfms() {
713         return delegateObject.getPmfms();
714     }
715 
716     /** {@inheritDoc} */
717     @Override
718     public void setPmfms(List<PmfmDTO> pmfms) {
719         delegateObject.setPmfms(pmfms);
720     }
721 
722     /** {@inheritDoc} */
723     @Override
724     public SamplingOperationDTO getSamplingOperations(int index) {
725         return delegateObject.getSamplingOperations(index);
726     }
727 
728     /** {@inheritDoc} */
729     @Override
730     public boolean isSamplingOperationsEmpty() {
731         return delegateObject.isSamplingOperationsEmpty();
732     }
733 
734     /** {@inheritDoc} */
735     @Override
736     public int sizeSamplingOperations() {
737         return delegateObject.sizeSamplingOperations();
738     }
739 
740     /** {@inheritDoc} */
741     @Override
742     public void addSamplingOperations(SamplingOperationDTO samplingOperations) {
743         delegateObject.addSamplingOperations(samplingOperations);
744     }
745 
746     /** {@inheritDoc} */
747     @Override
748     public void addAllSamplingOperations(Collection<SamplingOperationDTO> samplingOperations) {
749         delegateObject.addAllSamplingOperations(samplingOperations);
750     }
751 
752     /** {@inheritDoc} */
753     @Override
754     public boolean removeSamplingOperations(SamplingOperationDTO samplingOperations) {
755         return delegateObject.removeSamplingOperations(samplingOperations);
756     }
757 
758     /** {@inheritDoc} */
759     @Override
760     public boolean removeAllSamplingOperations(Collection<SamplingOperationDTO> samplingOperations) {
761         return delegateObject.removeAllSamplingOperations(samplingOperations);
762     }
763 
764     /** {@inheritDoc} */
765     @Override
766     public boolean containsSamplingOperations(SamplingOperationDTO samplingOperations) {
767         return delegateObject.containsSamplingOperations(samplingOperations);
768     }
769 
770     /** {@inheritDoc} */
771     @Override
772     public boolean containsAllSamplingOperations(Collection<SamplingOperationDTO> samplingOperations) {
773         return delegateObject.containsAllSamplingOperations(samplingOperations);
774     }
775 
776     /** {@inheritDoc} */
777     @Override
778     public Collection<SamplingOperationDTO> getSamplingOperations() {
779         return delegateObject.getSamplingOperations();
780     }
781 
782     /** {@inheritDoc} */
783     @Override
784     public void setSamplingOperations(Collection<SamplingOperationDTO> samplingOperations) {
785         delegateObject.setSamplingOperations(samplingOperations);
786     }
787 
788     /** {@inheritDoc} */
789     @Override
790     public PhotoDTO getPhotos(int index) {
791         return delegateObject.getPhotos(index);
792     }
793 
794     /** {@inheritDoc} */
795     @Override
796     public boolean isPhotosEmpty() {
797         return delegateObject.isPhotosEmpty();
798     }
799 
800     /** {@inheritDoc} */
801     @Override
802     public int sizePhotos() {
803         return delegateObject.sizePhotos();
804     }
805 
806     /** {@inheritDoc} */
807     @Override
808     public void addPhotos(PhotoDTO photo) {
809         delegateObject.addPhotos(photo);
810     }
811 
812     /** {@inheritDoc} */
813     @Override
814     public void addAllPhotos(Collection<PhotoDTO> photo) {
815         delegateObject.addAllPhotos(photo);
816     }
817 
818     /** {@inheritDoc} */
819     @Override
820     public boolean removePhotos(PhotoDTO photo) {
821         return delegateObject.removePhotos(photo);
822     }
823 
824     /** {@inheritDoc} */
825     @Override
826     public boolean removeAllPhotos(Collection<PhotoDTO> photo) {
827         return delegateObject.removeAllPhotos(photo);
828     }
829 
830     /** {@inheritDoc} */
831     @Override
832     public boolean containsPhotos(PhotoDTO photo) {
833         return delegateObject.containsPhotos(photo);
834     }
835 
836     /** {@inheritDoc} */
837     @Override
838     public boolean containsAllPhotos(Collection<PhotoDTO> photo) {
839         return delegateObject.containsAllPhotos(photo);
840     }
841 
842     /** {@inheritDoc} */
843     @Override
844     public List<PhotoDTO> getPhotos() {
845         return delegateObject.getPhotos();
846     }
847 
848     /** {@inheritDoc} */
849     @Override
850     public void setPhotos(List<PhotoDTO> photo) {
851         delegateObject.setPhotos(photo);
852     }
853 
854     /** {@inheritDoc} */
855     @Override
856     public ProgramDTO getProgram() {
857         return delegateObject.getProgram();
858     }
859 
860     /** {@inheritDoc} */
861     @Override
862     public void setProgram(ProgramDTO program) {
863         delegateObject.setProgram(program);
864     }
865 
866     /** {@inheritDoc} */
867     @Override
868     public MeasurementDTO getMeasurements(int index) {
869         return delegateObject.getMeasurements(index);
870     }
871 
872     /** {@inheritDoc} */
873     @Override
874     public boolean isMeasurementsEmpty() {
875         return delegateObject.isMeasurementsEmpty();
876     }
877 
878     /** {@inheritDoc} */
879     @Override
880     public int sizeMeasurements() {
881         return delegateObject.sizeMeasurements();
882     }
883 
884     /** {@inheritDoc} */
885     @Override
886     public void addMeasurements(MeasurementDTO measurements) {
887         delegateObject.addMeasurements(measurements);
888     }
889 
890     /** {@inheritDoc} */
891     @Override
892     public void addAllMeasurements(Collection<MeasurementDTO> measurements) {
893         delegateObject.addAllMeasurements(measurements);
894     }
895 
896     /** {@inheritDoc} */
897     @Override
898     public boolean removeMeasurements(MeasurementDTO measurements) {
899         return delegateObject.removeMeasurements(measurements);
900     }
901 
902     /** {@inheritDoc} */
903     @Override
904     public boolean removeAllMeasurements(Collection<MeasurementDTO> measurements) {
905         return delegateObject.removeAllMeasurements(measurements);
906     }
907 
908     /** {@inheritDoc} */
909     @Override
910     public boolean containsMeasurements(MeasurementDTO measurements) {
911         return delegateObject.containsMeasurements(measurements);
912     }
913 
914     /** {@inheritDoc} */
915     @Override
916     public boolean containsAllMeasurements(Collection<MeasurementDTO> measurements) {
917         return delegateObject.containsAllMeasurements(measurements);
918     }
919 
920     /** {@inheritDoc} */
921     @Override
922     public List<MeasurementDTO> getMeasurements() {
923         return delegateObject.getMeasurements();
924     }
925 
926     /** {@inheritDoc} */
927     @Override
928     public void setMeasurements(List<MeasurementDTO> measurements) {
929         delegateObject.setMeasurements(measurements);
930     }
931 
932     /** {@inheritDoc} */
933     @Override
934     public PersonDTO getObservers(int index) {
935         return delegateObject.getObservers(index);
936     }
937 
938     /** {@inheritDoc} */
939     @Override
940     public boolean isObserversEmpty() {
941         return delegateObject.isObserversEmpty();
942     }
943 
944     /** {@inheritDoc} */
945     @Override
946     public int sizeObservers() {
947         return delegateObject.sizeObservers();
948     }
949 
950     /** {@inheritDoc} */
951     @Override
952     public void addObservers(PersonDTO observers) {
953         delegateObject.addObservers(observers);
954     }
955 
956     /** {@inheritDoc} */
957     @Override
958     public void addAllObservers(Collection<PersonDTO> observers) {
959         delegateObject.addAllObservers(observers);
960     }
961 
962     /** {@inheritDoc} */
963     @Override
964     public boolean removeObservers(PersonDTO observers) {
965         return delegateObject.removeObservers(observers);
966     }
967 
968     /** {@inheritDoc} */
969     @Override
970     public boolean removeAllObservers(Collection<PersonDTO> observers) {
971         return delegateObject.removeAllObservers(observers);
972     }
973 
974     /** {@inheritDoc} */
975     @Override
976     public boolean containsObservers(PersonDTO observers) {
977         return delegateObject.containsObservers(observers);
978     }
979 
980     /** {@inheritDoc} */
981     @Override
982     public boolean containsAllObservers(Collection<PersonDTO> observers) {
983         return delegateObject.containsAllObservers(observers);
984     }
985 
986     /** {@inheritDoc} */
987     @Override
988     public Collection<PersonDTO> getObservers() {
989         return delegateObject.getObservers();
990     }
991 
992     /** {@inheritDoc} */
993     @Override
994     public void setObservers(Collection<PersonDTO> observers) {
995         delegateObject.setObservers(observers);
996     }
997 
998     /** {@inheritDoc} */
999     @Override
1000     public SynchronizationStatusDTO getSynchronizationStatus() {
1001         return delegateObject.getSynchronizationStatus();
1002     }
1003 
1004     /** {@inheritDoc} */
1005     @Override
1006     public void setSynchronizationStatus(SynchronizationStatusDTO synchronizationStatus) {
1007         delegateObject.setSynchronizationStatus(synchronizationStatus);
1008     }
1009 
1010     /** {@inheritDoc} */
1011     @Override
1012     public ErrorDTO getErrors(int index) {
1013         return delegateObject.getErrors(index);
1014     }
1015 
1016     /** {@inheritDoc} */
1017     @Override
1018     public boolean isErrorsEmpty() {
1019         return delegateObject.isErrorsEmpty();
1020     }
1021 
1022     /** {@inheritDoc} */
1023     @Override
1024     public int sizeErrors() {
1025         return delegateObject.sizeErrors();
1026     }
1027 
1028     /** {@inheritDoc} */
1029     @Override
1030     public void addErrors(ErrorDTO error) {
1031         delegateObject.addErrors(error);
1032     }
1033 
1034     /** {@inheritDoc} */
1035     @Override
1036     public void addAllErrors(Collection<ErrorDTO> error) {
1037         delegateObject.addAllErrors(error);
1038     }
1039 
1040     /** {@inheritDoc} */
1041     @Override
1042     public boolean removeErrors(ErrorDTO error) {
1043         return delegateObject.removeErrors(error);
1044     }
1045 
1046     /** {@inheritDoc} */
1047     @Override
1048     public boolean removeAllErrors(Collection<ErrorDTO> error) {
1049         return delegateObject.removeAllErrors(error);
1050     }
1051 
1052     /** {@inheritDoc} */
1053     @Override
1054     public boolean containsErrors(ErrorDTO error) {
1055         return delegateObject.containsErrors(error);
1056     }
1057 
1058     /** {@inheritDoc} */
1059     @Override
1060     public boolean containsAllErrors(Collection<ErrorDTO> error) {
1061         return delegateObject.containsAllErrors(error);
1062     }
1063 
1064     /** {@inheritDoc} */
1065     @Override
1066     public Collection<ErrorDTO> getErrors() {
1067         return delegateObject.getErrors();
1068     }
1069 
1070     /** {@inheritDoc} */
1071     @Override
1072     public void setErrors(Collection<ErrorDTO> error) {
1073         delegateObject.setErrors(error);
1074     }
1075 
1076     /** {@inheritDoc} */
1077     @Override
1078     public MeasurementDTO getIndividualMeasurements(int index) {
1079         return delegateObject.getIndividualMeasurements(index);
1080     }
1081 
1082     /** {@inheritDoc} */
1083     @Override
1084     public boolean isIndividualMeasurementsEmpty() {
1085         return delegateObject.isIndividualMeasurementsEmpty();
1086     }
1087 
1088     /** {@inheritDoc} */
1089     @Override
1090     public int sizeIndividualMeasurements() {
1091         return delegateObject.sizeIndividualMeasurements();
1092     }
1093 
1094     /** {@inheritDoc} */
1095     @Override
1096     public void addIndividualMeasurements(MeasurementDTO individualMeasurements) {
1097         delegateObject.addIndividualMeasurements(individualMeasurements);
1098     }
1099 
1100     /** {@inheritDoc} */
1101     @Override
1102     public void addAllIndividualMeasurements(Collection<MeasurementDTO> individualMeasurements) {
1103         delegateObject.addAllIndividualMeasurements(individualMeasurements);
1104     }
1105 
1106     /** {@inheritDoc} */
1107     @Override
1108     public boolean removeIndividualMeasurements(MeasurementDTO individualMeasurements) {
1109         return delegateObject.removeIndividualMeasurements(individualMeasurements);
1110     }
1111 
1112     /** {@inheritDoc} */
1113     @Override
1114     public boolean removeAllIndividualMeasurements(Collection<MeasurementDTO> individualMeasurements) {
1115         return delegateObject.removeAllIndividualMeasurements(individualMeasurements);
1116     }
1117 
1118     /** {@inheritDoc} */
1119     @Override
1120     public boolean containsIndividualMeasurements(MeasurementDTO individualMeasurements) {
1121         return delegateObject.containsIndividualMeasurements(individualMeasurements);
1122     }
1123 
1124     /** {@inheritDoc} */
1125     @Override
1126     public boolean containsAllIndividualMeasurements(Collection<MeasurementDTO> individualMeasurements) {
1127         return delegateObject.containsAllIndividualMeasurements(individualMeasurements);
1128     }
1129 
1130     /** {@inheritDoc} */
1131     @Override
1132     public List<MeasurementDTO> getIndividualMeasurements() {
1133         return delegateObject.getIndividualMeasurements();
1134     }
1135 
1136     /** {@inheritDoc} */
1137     @Override
1138     public void setIndividualMeasurements(List<MeasurementDTO> individualMeasurements) {
1139         delegateObject.setIndividualMeasurements(individualMeasurements);
1140     }
1141 
1142     /**
1143      * <p>getCampaignId.</p>
1144      *
1145      * @return a {@link java.lang.Integer} object.
1146      */
1147     public Integer getCampaignId() {
1148         return getCampaign() == null ? null : getCampaign().getId();
1149     }
1150 
1151     /**
1152      * <p>getLocationId.</p>
1153      *
1154      * @return a {@link java.lang.Integer} object.
1155      */
1156     public Integer getLocationId() {
1157         return getLocation() == null ? null : getLocation().getId();
1158     }
1159 
1160     /**
1161      * <p>getProgramCode.</p>
1162      *
1163      * @return a {@link java.lang.String} object.
1164      */
1165     public String getProgramCode() {
1166         return getProgram() == null ? null : getProgram().getCode();
1167     }
1168 }