1 // license-header java merge-point 2 // 3 // Attention: Generated code! Do not modify by hand! 4 // Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge. 5 // 6 package fr.ifremer.quadrige2.core.dao.referential.pmfm; 7 8 /*- 9 * #%L 10 * Quadrige2 Core :: Server API 11 * %% 12 * Copyright (C) 2017 Ifremer 13 * %% 14 * This program is free software: you can redistribute it and/or modify 15 * it under the terms of the GNU Affero General Public License as published by 16 * the Free Software Foundation, either version 3 of the License, or 17 * (at your option) any later version. 18 * 19 * This program is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU General Public License for more details. 23 * 24 * You should have received a copy of the GNU Affero General Public License 25 * along with this program. If not, see <http://www.gnu.org/licenses/>. 26 * #L% 27 */ 28 29 import java.io.Serializable; 30 import java.sql.Timestamp; 31 32 /** 33 * Liste des valeurs qualitatives pour un PSFM. 34 * Sous-liste des valeurs qualitatives d'un paramètre 35 */ 36 // HibernateEntity.vsl annotations merge-point 37 public abstract class PmfmQualValue 38 implements Serializable, Comparable<PmfmQualValue> 39 { 40 /** 41 * The serial version UID of this class. Needed for serialization. 42 */ 43 private static final long serialVersionUID = -6004491336635439074L; 44 45 private PmfmQualValuePK pmfmQualValuePk; 46 47 /** 48 * Get the composite primary key identifier class 49 * @return pmfmQualValuePk 50 */ 51 public PmfmQualValuePK getPmfmQualValuePk() 52 { 53 return this.pmfmQualValuePk; 54 } 55 56 /** 57 * Set the composite primary key identifier class 58 * @param pmfmQualValuePkIn 59 */ 60 public void setPmfmQualValuePk(PmfmQualValuePK pmfmQualValuePkIn) { 61 this.pmfmQualValuePk = pmfmQualValuePkIn; 62 } 63 64 // Generate 1 attributes 65 private Timestamp updateDt; 66 67 /** 68 * Date de modification de l'objet, mise à jour par le système 69 * @return this.updateDt Timestamp 70 */ 71 public Timestamp getUpdateDt() 72 { 73 return this.updateDt; 74 } 75 76 /** 77 * Date de modification de l'objet, mise à jour par le système 78 * @param updateDtIn Timestamp 79 */ 80 public void setUpdateDt(Timestamp updateDtIn) 81 { 82 this.updateDt = updateDtIn; 83 } 84 85 // Generate 2 associations 86 private QualitativeValue qualitativeValue; 87 88 /** 89 * Liste des valeurs qualitatives associées aux paramètres. 90 * @return this.qualitativeValue QualitativeValue 91 */ 92 public QualitativeValue getQualitativeValue() 93 { 94 return this.qualitativeValue; 95 } 96 97 /** 98 * Liste des valeurs qualitatives associées aux paramètres. 99 * @param qualitativeValueIn QualitativeValue 100 */ 101 public void setQualitativeValue(QualitativeValue qualitativeValueIn) 102 { 103 this.qualitativeValue = qualitativeValueIn; 104 } 105 106 private Pmfm pmfm; 107 108 /** 109 * Liste les quadruplets paramètre, méthode, support, fraction. 110 * @return this.pmfm Pmfm 111 */ 112 public Pmfm getPmfm() 113 { 114 return this.pmfm; 115 } 116 117 /** 118 * Liste les quadruplets paramètre, méthode, support, fraction. 119 * @param pmfmIn Pmfm 120 */ 121 public void setPmfm(Pmfm pmfmIn) 122 { 123 this.pmfm = pmfmIn; 124 } 125 126 /** 127 * This entity does not have any identifiers 128 * and is not extending any other entity, 129 * so this method will only return <code>true</code> if the argument reference and <code>this</code> 130 * refer to the same object. 131 */ 132 @Override 133 public boolean equals(Object object) 134 { 135 return super.equals(object); 136 } 137 138 /** 139 * This entity does not have any identifiers 140 * and is not extending any other entity, 141 * so this method will only take the identifiers of this entity into account when calculating the hash code. 142 */ 143 @Override 144 public int hashCode() 145 { 146 return super.hashCode(); 147 } 148 149 /** 150 * Constructs new instances of {@link PmfmQualValue}. 151 */ 152 public static final class Factory 153 { 154 /** 155 * Constructs a new instance of {@link PmfmQualValue}. 156 * @return new PmfmQualValueImpl() 157 */ 158 public static PmfmQualValue newInstance() 159 { 160 return new PmfmQualValueImpl(); 161 } 162 163 164 /** 165 * Constructs a new instance of {@link PmfmQualValue}, taking all possible properties 166 * (except the identifier(s))as arguments. 167 * @param updateDt Timestamp 168 * @param qualitativeValue QualitativeValue 169 * @param pmfm Pmfm 170 * @return newInstance PmfmQualValue 171 */ 172 public static PmfmQualValue newInstance(Timestamp updateDt, QualitativeValue qualitativeValue, Pmfm pmfm) 173 { 174 final PmfmQualValue entity = new PmfmQualValueImpl(); 175 entity.setUpdateDt(updateDt); 176 entity.setQualitativeValue(qualitativeValue); 177 entity.setPmfm(pmfm); 178 return entity; 179 } 180 } 181 182 /** 183 * @see Comparable#compareTo 184 */ 185 public int compareTo(PmfmQualValue o) 186 { 187 int cmp = 0; 188 if (this.getPmfmQualValuePk() != null) 189 { 190 cmp = this.getPmfmQualValuePk().compareTo(o.getPmfmQualValuePk()); 191 } 192 if (this.getUpdateDt() != null) 193 { 194 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt())); 195 } 196 return cmp; 197 } 198 // HibernateEntity.vsl merge-point 199 // PmfmQualValue.java merge-point 200 }