View Javadoc
1   package fr.ifremer.tutti.persistence.service.referential;
2   
3   /*
4    * #%L
5    * Tutti :: Persistence
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 com.google.common.base.Predicate;
28  import fr.ifremer.tutti.persistence.TuttiPersistenceServiceImplementor;
29  import fr.ifremer.tutti.persistence.entities.data.SampleCategoryModel;
30  import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch;
31  import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
32  import org.springframework.cache.annotation.Cacheable;
33  import org.springframework.transaction.annotation.Transactional;
34  
35  import java.util.List;
36  
37  /**
38   * Created on 11/3/14.
39   *
40   * @author Tony Chemit - chemit@codelutin.com
41   * @since 3.8
42   */
43  @Transactional(readOnly = true)
44  public interface CaracteristicPersistenceService extends TuttiPersistenceServiceImplementor {
45  
46      /**
47       * @return all caracteristics of the system.
48       * @since 1.0
49       */
50      @Cacheable(value = "pmfms")
51      List<Caracteristic> getAllCaracteristic();
52  
53      /**
54       * @return all caracteristics of the system with the ones which are kind of protected.
55       * @since 2.3
56       */
57      @Cacheable(value = "pmfmsWithProtected")
58      List<Caracteristic> getAllCaracteristicWithProtected();
59  
60      /**
61       * @return all caracteristics of the system useable for {@link SampleCategoryModel}.
62       * @since 2.4
63       */
64      List<Caracteristic> getAllCaracteristicForSampleCategory();
65  
66      /**
67       * @return all numeric caracteristics of the system.
68       * @since 1.0.2
69       */
70      List<Caracteristic> getAllNumericCaracteristic();
71  
72      Caracteristic getSizeCategoryCaracteristic();
73  
74      Caracteristic getSexCaracteristic();
75  
76      Caracteristic getSortedUnsortedCaracteristic();
77  
78      Caracteristic getMaturityCaracteristic();
79  
80      Caracteristic getAgeCaracteristic();
81  
82      Caracteristic getMarineLitterCategoryCaracteristic();
83  
84      Caracteristic getMarineLitterSizeCategoryCaracteristic();
85  
86      Caracteristic getVerticalOpeningCaracteristic();
87  
88      Caracteristic getHorizontalOpeningWingsCaracteristic();
89  
90      Caracteristic getHorizontalOpeningDoorCaracteristic();
91  
92      Caracteristic getDeadOrAliveCaracteristic();
93  
94      Caracteristic getCalcifiedStructureCaracteristic();
95  
96      Caracteristic getPmfmIdCaracteristic();
97  
98      Caracteristic getWeightMeasuredCaracteristic();
99  
100     Caracteristic getCopyIndividualObservationModeCaracteristic();
101 
102     Caracteristic getSampleCodeCaracteristic();
103 
104     @Cacheable(value = "pmfmById", key = "#pmfmId")
105     Caracteristic getCaracteristic(Integer pmfmId);
106 
107     Predicate<SpeciesBatch> getVracBatchPredicate();
108 
109     boolean isVracBatch(SpeciesBatch speciesBatch);
110 
111     boolean isHorsVracBatch(SpeciesBatch speciesBatch);
112 
113 }