View Javadoc
1   package fr.ifremer.dali.ui.swing.content.manage.referential.menu;
2   
3   /*
4    * #%L
5    * Dali :: UI
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2016 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  
27  import fr.ifremer.dali.dto.DaliBeanFactory;
28  import fr.ifremer.dali.dto.configuration.filter.FilterCriteriaDTO;
29  import org.nuiton.util.beans.Binder;
30  import org.nuiton.util.beans.BinderFactory;
31  
32  /**
33   * Created by Ludovic on 23/03/2016.
34   */
35  public class DefaultReferentialMenuUIModel extends AbstractReferentialMenuUIModel<FilterCriteriaDTO, DefaultReferentialMenuUIModel> {
36  
37      private static final Binder<DefaultReferentialMenuUIModel, FilterCriteriaDTO> TO_BEAN_BINDER =
38              BinderFactory.newBinder(DefaultReferentialMenuUIModel.class, FilterCriteriaDTO.class);
39  
40      private static final Binder<FilterCriteriaDTO, DefaultReferentialMenuUIModel> FROM_BEAN_BINDER =
41              BinderFactory.newBinder(FilterCriteriaDTO.class, DefaultReferentialMenuUIModel.class);
42  
43      /**
44       * <p>Constructor for DefaultReferentialMenuUIModel.</p>
45       */
46      public DefaultReferentialMenuUIModel() {
47          super(FROM_BEAN_BINDER, TO_BEAN_BINDER);
48      }
49  
50      /** {@inheritDoc} */
51      @Override
52      protected FilterCriteriaDTO newBean() {
53          return DaliBeanFactory.newFilterCriteriaDTO();
54      }
55  
56      @Override
57      public boolean isDirty() {
58          return delegateObject.isDirty();
59      }
60  
61      @Override
62      public void setDirty(boolean dirty) {
63          delegateObject.setDirty(dirty);
64      }
65  
66      @Override
67      public boolean isReadOnly() {
68          return delegateObject.isReadOnly();
69      }
70  
71      @Override
72      public void setReadOnly(boolean readOnly) {
73          delegateObject.setReadOnly(readOnly);
74      }
75  }