1 package fr.ifremer.reefdb.ui.swing.util.table; 2 3 /* 4 * #%L 5 * Reef DB :: 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.quadrige3.ui.swing.table.AbstractRowUIModel; 27 import fr.ifremer.quadrige3.ui.core.dto.QuadrigeBean; 28 import org.nuiton.util.beans.Binder; 29 30 /** 31 * <p>Abstract AbstractReefDbRowUIModel class.</p> 32 * 33 * @author Ludovic Pecquot <ludovic.pecquot@e-is.pro> 34 * @param <B> 35 * @param <M> 36 */ 37 public abstract class AbstractReefDbRowUIModel<B extends QuadrigeBean, M extends AbstractReefDbRowUIModel<B, M>> 38 extends AbstractRowUIModel<B, M> { 39 40 /** 41 * <p>Constructor for AbstractReefDbRowUIModel.</p> 42 * 43 * @param fromBeanBinder a {@link org.nuiton.util.beans.Binder} object. 44 * @param toBeanBinder a {@link org.nuiton.util.beans.Binder} object. 45 */ 46 public AbstractReefDbRowUIModel(Binder<B, M> fromBeanBinder, Binder<M, B> toBeanBinder) { 47 super(fromBeanBinder, toBeanBinder); 48 } 49 50 /** 51 * <p>isCreate.</p> 52 * 53 * @return a boolean. 54 */ 55 public boolean isCreate() { 56 return delegateObject.getId() == null; 57 } 58 59 /** 60 * <p>getId.</p> 61 * 62 * @return a {@link java.lang.Integer} object. 63 */ 64 public Integer getId() { 65 return delegateObject.getId(); 66 } 67 68 /** 69 * <p>setId.</p> 70 * 71 * @param id a {@link java.lang.Integer} object. 72 */ 73 public void setId(Integer id) { 74 delegateObject.setId(id); 75 } 76 77 }