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.data.samplingScheme; 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 fr.ifremer.adagio.core.dao.referential.regulation.Fishery; 032import java.io.Serializable; 033 034/** 035 * <html> 036 * <head> 037 * <style> 038 * p {padding:0px; margin:0px;} 039 * </style> 040 * </head> 041 * <body> 042 * <p> 043 * Permet de lier une strate d'échantillonnage à la pêcherie ou au stock. 044 * </p> 045 * <p> 046 * </p> 047 * <p> 048 * Demande initiale de E.Bodere du 18/07/2012 : 049 * </p> 050 * <p> 051 * Ajout de la table SamplingStrata2Fishery. Pour la reprise des données 052 * Arpège, Joël veut que l’on recréé des plans avec comme strate le stock 053 * arpège (espèce commerciale * grand secteur Arpège). Cette solution 054 * permettrait d’avoir un lien vers des pêcheries ultérieurement 055 * </p> 056 * </body> 057 * </html> 058 */ 059// HibernateEntity.vsl annotations merge-point 060public abstract class SamplingStrata2Fishery 061 implements Serializable, Comparable<SamplingStrata2Fishery> 062{ 063 /** 064 * The serial version UID of this class. Needed for serialization. 065 */ 066 private static final long serialVersionUID = -7920775948918526969L; 067 068 private SamplingStrata2FisheryPK samplingStrata2FisheryPk; 069 070 /** 071 * Get the composite primary key identifier class 072 * @return samplingStrata2FisheryPk 073 */ 074 public SamplingStrata2FisheryPK getSamplingStrata2FisheryPk() 075 { 076 return this.samplingStrata2FisheryPk; 077 } 078 079 /** 080 * Set the composite primary key identifier class 081 * @param samplingStrata2FisheryPkIn 082 */ 083 public void setSamplingStrata2FisheryPk(SamplingStrata2FisheryPK samplingStrata2FisheryPkIn) { 084 this.samplingStrata2FisheryPk = samplingStrata2FisheryPkIn; 085 } 086 087 // Generate 0 attributes 088 // Generate 2 associations 089 private Fishery fishery; 090 091 /** 092 * <html> 093 * <head> 094 * </head> 095 * <body> 096 * Un pecherie, peut etre, si elle n'a pas d'engin, similaire à un 097 * stock.<br><br><u>Définition 098 * </u>:<br>A unit determined by an authority or other entity that isengaged 099 * in raising and/or harvesting fish. Typically, the unit is defined in terms 100 * of some or all of the following: people involved, species or type of fish, 101 * area of water or seabed, method of fishing, class of boats and purpose of 102 * the activities.<br><br><font size="-2">Fletcher, W.J., Chesson, J. Fisher, 103 * M., Sainsbury K.J., Hundloe, T. Smith A.D.M., and B. Whitworth (2002): 104 * National ESD reporting framework for Australian fisheries: The "How To" 105 * guide for wild capture fisheries. FRDC Project 2000/145. Canberra, 106 * Australia</font> 107 * </body> 108 * </html> 109 * @return this.fishery Fishery 110 */ 111 public Fishery getFishery() 112 { 113 return this.fishery; 114 } 115 116 /** 117 * <html> 118 * <head> 119 * </head> 120 * <body> 121 * Un pecherie, peut etre, si elle n'a pas d'engin, similaire à un 122 * stock.<br><br><u>Définition 123 * </u>:<br>A unit determined by an authority or other entity that isengaged 124 * in raising and/or harvesting fish. Typically, the unit is defined in terms 125 * of some or all of the following: people involved, species or type of fish, 126 * area of water or seabed, method of fishing, class of boats and purpose of 127 * the activities.<br><br><font size="-2">Fletcher, W.J., Chesson, J. Fisher, 128 * M., Sainsbury K.J., Hundloe, T. Smith A.D.M., and B. Whitworth (2002): 129 * National ESD reporting framework for Australian fisheries: The "How To" 130 * guide for wild capture fisheries. FRDC Project 2000/145. Canberra, 131 * Australia</font> 132 * </body> 133 * </html> 134 * @param fisheryIn Fishery 135 */ 136 public void setFishery(Fishery fisheryIn) 137 { 138 this.fishery = fisheryIn; 139 } 140 141 private SamplingStrata samplingStrata; 142 143 /** 144 * Représente une ligne du plan d'échantillonnage. 145 * @since v3.2.0 146 * @return this.samplingStrata SamplingStrata 147 */ 148 public SamplingStrata getSamplingStrata() 149 { 150 return this.samplingStrata; 151 } 152 153 /** 154 * Représente une ligne du plan d'échantillonnage. 155 * @since v3.2.0 156 * @param samplingStrataIn SamplingStrata 157 */ 158 public void setSamplingStrata(SamplingStrata samplingStrataIn) 159 { 160 this.samplingStrata = samplingStrataIn; 161 } 162 163 /** 164 * This entity does not have any identifiers 165 * and is not extending any other entity, 166 * so this method will only return <code>true</code> if the argument reference and <code>this</code> 167 * refer to the same object. 168 */ 169 @Override 170 public boolean equals(Object object) 171 { 172 return super.equals(object); 173 } 174 175 /** 176 * This entity does not have any identifiers 177 * and is not extending any other entity, 178 * so this method will only take the identifiers of this entity into account when calculating the hash code. 179 */ 180 @Override 181 public int hashCode() 182 { 183 return super.hashCode(); 184 } 185 186 /** 187 * Constructs new instances of {@link SamplingStrata2Fishery}. 188 */ 189 public static final class Factory 190 { 191 /** 192 * Constructs a new instance of {@link SamplingStrata2Fishery}. 193 * @return new SamplingStrata2FisheryImpl() 194 */ 195 public static SamplingStrata2Fishery newInstance() 196 { 197 return new SamplingStrata2FisheryImpl(); 198 } 199 200 201 /** 202 * Constructs a new instance of {@link SamplingStrata2Fishery}, taking all possible properties 203 * (except the identifier(s))as arguments. 204 * @param fishery Fishery 205 * @param samplingStrata SamplingStrata 206 * @return newInstance SamplingStrata2Fishery 207 */ 208 public static SamplingStrata2Fishery newInstance(Fishery fishery, SamplingStrata samplingStrata) 209 { 210 final SamplingStrata2Fishery entity = new SamplingStrata2FisheryImpl(); 211 entity.setFishery(fishery); 212 entity.setSamplingStrata(samplingStrata); 213 return entity; 214 } 215 } 216 217 /** 218 * @see Comparable#compareTo 219 */ 220 public int compareTo(SamplingStrata2Fishery o) 221 { 222 int cmp = 0; 223 if (this.getSamplingStrata2FisheryPk() != null) 224 { 225 cmp = this.getSamplingStrata2FisheryPk().compareTo(o.getSamplingStrata2FisheryPk()); 226 } 227 return cmp; 228 } 229// HibernateEntity.vsl merge-point 230// SamplingStrata2Fishery.java merge-point 231}