View Javadoc
1   package fr.ifremer.tutti.persistence.entities.protocol;
2   
3   /*
4    * #%L
5    * Tutti :: Persistence
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2012 - 2017 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.persistence.entities.TuttiEntityBean;
28  import java.util.Collection;
29  import java.util.LinkedList;
30  import javax.annotation.Generated;
31  
32  @Generated(value = "org.nuiton.eugene.java.SimpleJavaBeanTransformer", date = "Fri Jan 06 18:31:47 CET 2017")
33  public abstract class AbstractMaturityCaracteristicBean extends TuttiEntityBean implements MaturityCaracteristic {
34  
35      private static final long serialVersionUID = 3918754240824436016L;
36  
37      protected String id;
38  
39      protected Collection<String> matureStateIds;
40  
41      @Override
42      public String getId() {
43          return id;
44      }
45  
46      @Override
47      public void setId(String id) {
48          this.id = id;
49      }
50  
51      @Override
52      public String getMatureStateIds(int index) {
53          String o = getChild(matureStateIds, index);
54          return o;
55      }
56  
57      @Override
58      public boolean isMatureStateIdsEmpty() {
59          return matureStateIds == null || matureStateIds.isEmpty();
60      }
61  
62      @Override
63      public int sizeMatureStateIds() {
64          return matureStateIds == null ? 0 : matureStateIds.size();
65      }
66  
67      @Override
68      public void addMatureStateIds(String matureStateIds) {
69          getMatureStateIds().add(matureStateIds);
70      }
71  
72      @Override
73      public void addAllMatureStateIds(Collection<String> matureStateIds) {
74          getMatureStateIds().addAll(matureStateIds);
75      }
76  
77      @Override
78      public boolean removeMatureStateIds(String matureStateIds) {
79          boolean removed = getMatureStateIds().remove(matureStateIds);
80          return removed;
81      }
82  
83      @Override
84      public boolean removeAllMatureStateIds(Collection<String> matureStateIds) {
85          boolean  removed = getMatureStateIds().removeAll(matureStateIds);
86          return removed;
87      }
88  
89      @Override
90      public boolean containsMatureStateIds(String matureStateIds) {
91          boolean contains = getMatureStateIds().contains(matureStateIds);
92          return contains;
93      }
94  
95      @Override
96      public boolean containsAllMatureStateIds(Collection<String> matureStateIds) {
97          boolean  contains = getMatureStateIds().containsAll(matureStateIds);
98          return contains;
99      }
100 
101     @Override
102     public Collection<String> getMatureStateIds() {
103     if (matureStateIds == null) {
104         matureStateIds = new LinkedList<String>();
105     }
106     return matureStateIds;
107 }
108 
109     @Override
110     public void setMatureStateIds(Collection<String> matureStateIds) {
111         this.matureStateIds = matureStateIds;
112     }
113 
114 } //AbstractMaturityCaracteristicBean