001// license-header java merge-point 002// 003// Attention: Generated code! Do not modify by hand! 004// Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge. 005// 006package fr.ifremer.adagio.core.dao.playground; 007 008/* 009 * #%L 010 * SIH-Adagio :: Core 011 * $Id:$ 012 * $HeadURL:$ 013 * %% 014 * Copyright (C) 2012 - 2014 Ifremer 015 * %% 016 * This program is free software: you can redistribute it and/or modify 017 * it under the terms of the GNU Affero General Public License as published by 018 * the Free Software Foundation, either version 3 of the License, or 019 * (at your option) any later version. 020 * 021 * This program is distributed in the hope that it will be useful, 022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 024 * GNU General Public License for more details. 025 * 026 * You should have received a copy of the GNU Affero General Public License 027 * along with this program. If not, see <http://www.gnu.org/licenses/>. 028 * #L% 029 */ 030 031import java.io.Serializable; 032import java.sql.Timestamp; 033 034/** 035 * (Classe mise en oeuvre pour quel besoin ?) 036 */ 037// HibernateEntity.vsl annotations merge-point 038public abstract class PlaygroundTaxonGroupSampling 039 implements Serializable, Comparable<PlaygroundTaxonGroupSampling> 040{ 041 /** 042 * The serial version UID of this class. Needed for serialization. 043 */ 044 private static final long serialVersionUID = 2091273688217204848L; 045 046 // Generate 5 attributes 047 private Integer taxonGroup; 048 049 /** 050 * 051 * @return this.taxonGroup Integer 052 */ 053 public Integer getTaxonGroup() 054 { 055 return this.taxonGroup; 056 } 057 058 /** 059 * 060 * @param taxonGroupIn Integer 061 */ 062 public void setTaxonGroup(Integer taxonGroupIn) 063 { 064 this.taxonGroup = taxonGroupIn; 065 } 066 067 private Boolean accidental; 068 069 /** 070 * Is the taxon group related to accidental catch. 071 * @return this.accidental Boolean 072 */ 073 public Boolean isAccidental() 074 { 075 return this.accidental; 076 } 077 078 /** 079 * Is the taxon group related to accidental catch. 080 * @param accidentalIn Boolean 081 */ 082 public void setAccidental(Boolean accidentalIn) 083 { 084 this.accidental = accidentalIn; 085 } 086 087 private Boolean length; 088 089 /** 090 * Is the taxon group must have length measured. 091 * @return this.length Boolean 092 */ 093 public Boolean isLength() 094 { 095 return this.length; 096 } 097 098 /** 099 * Is the taxon group must have length measured. 100 * @param lengthIn Boolean 101 */ 102 public void setLength(Boolean lengthIn) 103 { 104 this.length = lengthIn; 105 } 106 107 private Boolean sex; 108 109 /** 110 * Is the taxon group must have sex observed. 111 * @return this.sex Boolean 112 */ 113 public Boolean isSex() 114 { 115 return this.sex; 116 } 117 118 /** 119 * Is the taxon group must have sex observed. 120 * @param sexIn Boolean 121 */ 122 public void setSex(Boolean sexIn) 123 { 124 this.sex = sexIn; 125 } 126 127 private Timestamp updateDate; 128 129 /** 130 * 131 * @return this.updateDate Timestamp 132 */ 133 public Timestamp getUpdateDate() 134 { 135 return this.updateDate; 136 } 137 138 /** 139 * 140 * @param updateDateIn Timestamp 141 */ 142 public void setUpdateDate(Timestamp updateDateIn) 143 { 144 this.updateDate = updateDateIn; 145 } 146 147 // Generate 0 associations 148 /** 149 * Returns <code>true</code> if the argument is an PlaygroundTaxonGroupSampling instance and all identifiers for this entity 150 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise. 151 */ 152 @Override 153 public boolean equals(Object object) 154 { 155 if (this == object) 156 { 157 return true; 158 } 159 if (!(object instanceof PlaygroundTaxonGroupSampling)) 160 { 161 return false; 162 } 163 final PlaygroundTaxonGroupSampling that = (PlaygroundTaxonGroupSampling)object; 164 if (this.taxonGroup == null || that.getTaxonGroup() == null || !this.taxonGroup.equals(that.getTaxonGroup())) 165 { 166 return false; 167 } 168 return true; 169 } 170 171 /** 172 * Returns a hash code based on this entity's identifiers. 173 */ 174 @Override 175 public int hashCode() 176 { 177 int hashCode = 0; 178 hashCode = 29 * hashCode + (this.taxonGroup == null ? 0 : this.taxonGroup.hashCode()); 179 180 return hashCode; 181 } 182 183 /** 184 * Constructs new instances of {@link PlaygroundTaxonGroupSampling}. 185 */ 186 public static final class Factory 187 { 188 /** 189 * Constructs a new instance of {@link PlaygroundTaxonGroupSampling}. 190 * @return new PlaygroundTaxonGroupSamplingImpl() 191 */ 192 public static PlaygroundTaxonGroupSampling newInstance() 193 { 194 return new PlaygroundTaxonGroupSamplingImpl(); 195 } 196 197 198 /** 199 * Constructs a new instance of {@link PlaygroundTaxonGroupSampling}, taking all possible properties 200 * (except the identifier(s))as arguments. 201 * @param accidental Boolean 202 * @param length Boolean 203 * @param sex Boolean 204 * @param updateDate Timestamp 205 * @return newInstance PlaygroundTaxonGroupSampling 206 */ 207 public static PlaygroundTaxonGroupSampling newInstance(Boolean accidental, Boolean length, Boolean sex, Timestamp updateDate) 208 { 209 final PlaygroundTaxonGroupSampling entity = new PlaygroundTaxonGroupSamplingImpl(); 210 entity.setAccidental(accidental); 211 entity.setLength(length); 212 entity.setSex(sex); 213 entity.setUpdateDate(updateDate); 214 return entity; 215 } 216 } 217 218 /** 219 * @see Comparable#compareTo 220 */ 221 public int compareTo(PlaygroundTaxonGroupSampling o) 222 { 223 int cmp = 0; 224 if (this.getTaxonGroup() != null) 225 { 226 cmp = this.getTaxonGroup().compareTo(o.getTaxonGroup()); 227 } 228 else 229 { 230 if (this.isAccidental() != null) 231 { 232 cmp = (cmp != 0 ? cmp : this.isAccidental().compareTo(o.isAccidental())); 233 } 234 if (this.isLength() != null) 235 { 236 cmp = (cmp != 0 ? cmp : this.isLength().compareTo(o.isLength())); 237 } 238 if (this.isSex() != null) 239 { 240 cmp = (cmp != 0 ? cmp : this.isSex().compareTo(o.isSex())); 241 } 242 if (this.getUpdateDate() != null) 243 { 244 cmp = (cmp != 0 ? cmp : this.getUpdateDate().compareTo(o.getUpdateDate())); 245 } 246 } 247 return cmp; 248 } 249// HibernateEntity.vsl merge-point 250// PlaygroundTaxonGroupSampling.java merge-point 251}