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