View Javadoc
1   package fr.ifremer.dali.ui.swing.content.manage.rule.pmfm;
2   
3   /*
4    * #%L
5    * Dali :: 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.dali.dto.DaliBeanFactory;
27  import fr.ifremer.dali.dto.configuration.control.RulePmfmDTO;
28  import fr.ifremer.quadrige3.ui.core.dto.referential.StatusDTO;
29  import fr.ifremer.dali.dto.referential.pmfm.PmfmDTO;
30  import fr.ifremer.dali.ui.swing.util.table.AbstractDaliRowUIModel;
31  import org.nuiton.util.beans.Binder;
32  import org.nuiton.util.beans.BinderFactory;
33  
34  import java.util.Date;
35  
36  /**
37   * <p>ControlPmfmRowModel class.</p>
38   *
39   * @author Antoine
40   */
41  public class ControlPmfmRowModel extends AbstractDaliRowUIModel<RulePmfmDTO, ControlPmfmRowModel> implements RulePmfmDTO {
42  
43      private static final Binder<RulePmfmDTO, ControlPmfmRowModel> FROM_BEAN_BINDER =
44              BinderFactory.newBinder(RulePmfmDTO.class, ControlPmfmRowModel.class);
45  
46      private static final Binder<ControlPmfmRowModel, RulePmfmDTO> TO_BEAN_BINDER =
47              BinderFactory.newBinder(ControlPmfmRowModel.class, RulePmfmDTO.class);
48  
49      /**
50       * <p>Constructor for ControlPmfmRowModel.</p>
51       */
52      public ControlPmfmRowModel() {
53          super(FROM_BEAN_BINDER, TO_BEAN_BINDER);
54      }
55  
56      /** {@inheritDoc} */
57      @Override
58      protected RulePmfmDTO newBean() {
59          return DaliBeanFactory.newRulePmfmDTO();
60      }
61  
62      /** {@inheritDoc} */
63      @Override
64      public String getName() {
65          return delegateObject.getName();
66      }
67  
68      /** {@inheritDoc} */
69      @Override
70      public void setName(String name) {
71          delegateObject.setName(name);
72      }
73  
74      @Override
75      public boolean isDirty() {
76          return delegateObject.isDirty();
77      }
78  
79      @Override
80      public void setDirty(boolean dirty) {
81          delegateObject.setDirty(dirty);
82      }
83  
84      @Override
85      public boolean isReadOnly() {
86          return delegateObject.isReadOnly();
87      }
88  
89      @Override
90      public void setReadOnly(boolean readOnly) {
91          delegateObject.setReadOnly(readOnly);
92      }
93  
94      @Override
95      public Date getCreationDate() {
96          return null;
97      }
98  
99      @Override
100     public void setCreationDate(Date date) {
101 
102     }
103 
104     @Override
105     public Date getUpdateDate() {
106         return null;
107     }
108 
109     @Override
110     public void setUpdateDate(Date date) {
111 
112     }
113 
114     /** {@inheritDoc} */
115     @Override
116     public StatusDTO getStatus() {
117         return delegateObject.getStatus();
118     }
119 
120     /** {@inheritDoc} */
121     @Override
122     public void setStatus(StatusDTO status) {
123         delegateObject.setStatus(status);
124     }
125 
126     @Override
127     public PmfmDTO getPmfm() {
128         return delegateObject.getPmfm();
129     }
130 
131     @Override
132     public void setPmfm(PmfmDTO pmfm) {
133         delegateObject.setPmfm(pmfm);
134     }
135 }