001// license-header java merge-point 002// 003// Attention: Generated code! Do not modify by hand! 004// Generated by: SpringDao.vsl in andromda-spring-cartridge. 005// 006package fr.ifremer.adagio.core.dao.data.vessel; 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.Search; 032import fr.ifremer.adagio.core.dao.referential.QualityFlag; 033import fr.ifremer.adagio.core.dao.referential.location.Location; 034import java.util.Collection; 035import java.util.Date; 036import java.util.Set; 037import org.andromda.spring.PaginationResult; 038 039/** 040 * Définit le lieu d'immatriculation d'un navire statistique et la période associée. 041 * Nombre de lignes : 72700 042 * @see VesselRegistrationPeriod 043 */ 044public interface VesselRegistrationPeriodDao 045{ 046 /** 047 * This constant is used as a transformation flag; entities can be converted automatically into value objects 048 * or other types, different methods in a class implementing this interface support this feature: look for 049 * an <code>int</code> parameter called <code>transform</code>. 050 * <p> 051 * This specific flag denotes no transformation will occur. 052 */ 053 public static final int TRANSFORM_NONE = 0; 054 055 056 /** 057 * Transforms the given results to a collection of {@link VesselRegistrationPeriod} 058 * instances (this is useful when the returned results contains a row of data and you want just entities only). 059 * 060 * @param results the query results. 061 */ 062 public void toEntities(final Collection<?> results); 063 064 /** 065 * Gets an instance of VesselRegistrationPeriod from the persistent store. 066 * @param vesselRegistrationPeriodPk 067 * @return VesselRegistrationPeriod 068 */ 069 public VesselRegistrationPeriod get(VesselRegistrationPeriodPK vesselRegistrationPeriodPk); 070 071 /** 072 * <p> 073 * Does the same thing as {@link #get(VesselRegistrationPeriodPK)} with an 074 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 075 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 076 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 077 * optionally transform the entity (into a value object for example). By default, transformation does 078 * not occur. 079 * </p> 080 * 081 * @param transform flag to determine transformation type. 082 * @param vesselRegistrationPeriodPk the identifier of the entity to get. 083 * @return either the entity or the object transformed from the entity. 084 */ 085 public Object get(int transform, VesselRegistrationPeriodPK vesselRegistrationPeriodPk); 086 087 /** 088 * Loads an instance of VesselRegistrationPeriod from the persistent store. 089 * @param vesselRegistrationPeriodPk 090 * @return VesselRegistrationPeriod 091 */ 092 public VesselRegistrationPeriod load(VesselRegistrationPeriodPK vesselRegistrationPeriodPk); 093 094 /** 095 * <p> 096 * Does the same thing as {@link #load(VesselRegistrationPeriodPK)} with an 097 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 098 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 099 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 100 * optionally transform the entity (into a value object for example). By default, transformation does 101 * not occur. 102 * </p> 103 * 104 * @param transform flag to determine transformation type. 105 * @param vesselRegistrationPeriodPk the identifier of the entity to load. 106 * @return either the entity or the object transformed from the entity. 107 */ 108 public Object load(int transform, VesselRegistrationPeriodPK vesselRegistrationPeriodPk); 109 110 /** 111 * Loads all entities of type {@link VesselRegistrationPeriod}. 112 * 113 * @return the loaded entities. 114 */ 115 public Collection<VesselRegistrationPeriod> loadAll(); 116 117 /** 118 * <p> 119 * Does the same thing as {@link #loadAll()} with an 120 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 121 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 122 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 123 * transform the entity (into a value object for example). By default, transformation does 124 * not occur. 125 * </p> 126 * 127 * @param transform the flag indicating what transformation to use. 128 * @return the loaded entities. 129 */ 130 public Collection<?> loadAll(final int transform); 131 132 /** 133 * <p> 134 * Does the same thing as {@link #loadAll()} with an 135 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 136 * argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the 137 * page retrieved. 138 * </p> 139 * 140 * @param pageNumber the page number to retrieve when paging results. 141 * @param pageSize the size of the page to retrieve when paging results. 142 * @return the loaded entities. 143 */ 144 public Collection<?> loadAll(final int pageNumber, final int pageSize); 145 146 /** 147 * <p> 148 * Does the same thing as {@link #loadAll(int)} with an 149 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 150 * argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the 151 * page retrieved. 152 * </p> 153 * 154 * @param transform the flag indicating what transformation to use. 155 * @param pageNumber the page number to retrieve when paging results. 156 * @param pageSize the size of the page to retrieve when paging results. 157 * @return the loaded entities. 158 */ 159 public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize); 160 161 /** 162 * Creates an instance of VesselRegistrationPeriod and adds it to the persistent store. 163 * @param vesselRegistrationPeriod 164 * @return VesselRegistrationPeriod 165 */ 166 public VesselRegistrationPeriod create(VesselRegistrationPeriod vesselRegistrationPeriod); 167 168 /** 169 * <p> 170 * Does the same thing as {@link #create(VesselRegistrationPeriod)} with an 171 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 172 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 173 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 174 * transform the entity (into a value object for example). By default, transformation does 175 * not occur. 176 * </p> 177 * @param transform 178 * @param vesselRegistrationPeriod 179 * @return Object 180 */ 181 public Object create(int transform, VesselRegistrationPeriod vesselRegistrationPeriod); 182 183 /** 184 * Creates a new instance of VesselRegistrationPeriod and adds 185 * from the passed in <code>entities</code> collection 186 * 187 * @param entities the collection of VesselRegistrationPeriod 188 * instances to create. 189 * 190 * @return the created instances. 191 */ 192 public Collection<VesselRegistrationPeriod> create(Collection<VesselRegistrationPeriod> entities); 193 194 /** 195 * <p> 196 * Does the same thing as {@link #create(VesselRegistrationPeriod)} with an 197 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 198 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 199 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 200 * transform the entities (into value objects for example). By default, transformation does 201 * not occur. 202 * </p> 203 * @param transform 204 * @param entities 205 * @return Collection 206 */ 207 public Collection<?> create(int transform, Collection<VesselRegistrationPeriod> entities); 208 209 /** 210 * <p> 211 * Creates a new <code>VesselRegistrationPeriod</code> 212 * instance from <strong>all</strong> attributes and adds it to 213 * the persistent store. 214 * </p> 215 * @param startDateTime 216 * @param endDateTime 217 * @param registrationCode <html> 218<head> 219<style> 220p {padding:0px; margin:0px;} 221</style> 222</head> 223<body> 224<p> 225Code d'immatriculation du navire, dans le lieu dans lequel il est 226enregistré. 227</p> 228<p> 229Il s'agit dans la plupart des cas de l'immatriculation <b>nationale</b> 230du navire, qui peut varier en cas de changement de pays. 231</p> 232</body> 233</html> 234 * @param internationalRegistrationCode Code d'immatriculation international. 235Rempli à partir de l'information la plus stable : IMO code si disponible, ou CFR code ("Community 236Fishing-Fleet Register"). 237 * @param rankOrder Ajout pour gérer les regsitre de navires (hors registre consolidé) ou des doublons peuvent exister. 238mantis #14112 239 * @return VesselRegistrationPeriod 240 */ 241 public VesselRegistrationPeriod create( 242 Date startDateTime, 243 Date endDateTime, 244 String registrationCode, 245 String internationalRegistrationCode, 246 Short rankOrder); 247 248 /** 249 * <p> 250 * Does the same thing as {@link #create(Date, String, String, Short)} with an 251 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 252 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 253 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 254 * transform the entity (into a value object for example). By default, transformation does 255 * not occur. 256 * </p> 257 * @param transform 258 * @param startDateTime 259 * @param endDateTime 260 * @param registrationCode <html> 261<head> 262<style> 263p {padding:0px; margin:0px;} 264</style> 265</head> 266<body> 267<p> 268Code d'immatriculation du navire, dans le lieu dans lequel il est 269enregistré. 270</p> 271<p> 272Il s'agit dans la plupart des cas de l'immatriculation <b>nationale</b> 273du navire, qui peut varier en cas de changement de pays. 274</p> 275</body> 276</html> 277 * @param internationalRegistrationCode Code d'immatriculation international. 278Rempli à partir de l'information la plus stable : IMO code si disponible, ou CFR code ("Community 279Fishing-Fleet Register"). 280 * @param rankOrder Ajout pour gérer les regsitre de navires (hors registre consolidé) ou des doublons peuvent exister. 281mantis #14112 282 * @return VesselRegistrationPeriod 283 */ 284 public Object create( 285 int transform, 286 Date startDateTime, 287 Date endDateTime, 288 String registrationCode, 289 String internationalRegistrationCode, 290 Short rankOrder); 291 292 /** 293 * <p> 294 * Creates a new <code>VesselRegistrationPeriod</code> 295 * instance from only <strong>required</strong> properties (attributes 296 * and association ends) and adds it to the persistent store. 297 * </p> 298 * @param qualityFlag 299 * @param rankOrder 300 * @param registrationLocation 301 * @param vessel 302 * @return VesselRegistrationPeriod 303 */ 304 public VesselRegistrationPeriod create( 305 QualityFlag qualityFlag, 306 Short rankOrder, 307 Location registrationLocation, 308 Vessel vessel); 309 310 /** 311 * <p> 312 * Does the same thing as {@link #create(Short)} with an 313 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 314 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 315 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 316 * transform the entity (into a value object for example). By default, transformation does 317 * not occur. 318 * </p> 319 * @param transform flag to determine transformation type. 320 * @param qualityFlag 321 * @param rankOrder 322 * @param registrationLocation 323 * @param vessel 324 * @return Object 325 */ 326 public Object create( 327 int transform, 328 QualityFlag qualityFlag, 329 Short rankOrder, 330 Location registrationLocation, 331 Vessel vessel); 332 333 /** 334 * Updates the <code>vesselRegistrationPeriod</code> instance in the persistent store. 335 * @param vesselRegistrationPeriod 336 */ 337 public void update(VesselRegistrationPeriod vesselRegistrationPeriod); 338 339 /** 340 * Updates all instances in the <code>entities</code> collection in the persistent store. 341 * @param entities 342 */ 343 public void update(Collection<VesselRegistrationPeriod> entities); 344 345 /** 346 * Removes the instance of VesselRegistrationPeriod from the persistent store. 347 * @param vesselRegistrationPeriod 348 */ 349 public void remove(VesselRegistrationPeriod vesselRegistrationPeriod); 350 351 /** 352 * Removes the instance of VesselRegistrationPeriod having the given 353 * <code>identifier</code> from the persistent store. 354 * @param vesselRegistrationPeriodPk 355 */ 356 public void remove(VesselRegistrationPeriodPK vesselRegistrationPeriodPk); 357 358 /** 359 * Removes all entities in the given <code>entities</code> collection. 360 * @param entities 361 */ 362 public void remove(Collection<VesselRegistrationPeriod> entities); 363 364 365 /** 366 * Does the same thing as {@link #search(int, Search)} but with an 367 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 368 * limit your data to a specified page number and size. 369 * 370 * @param transform the transformation flag. 371 * @param pageNumber the page number in the data to retrieve 372 * @param pageSize the size of the page to retrieve. 373 * @param search the search object which provides the search parameters and pagination specification. 374 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 375 */ 376 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 377 378 /** 379 * Does the same thing as {@link #search(Search)} but with an 380 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 381 * limit your data to a specified page number and size. 382 * 383 * @param pageNumber the page number in the data to retrieve 384 * @param pageSize the size of the page to retrieve. 385 * @param search the search object which provides the search parameters and pagination specification. 386 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 387 */ 388 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 389 390 /** 391 * Does the same thing as {@link #search(Search)} but with an 392 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 393 * finder results will <strong>NOT</strong> be transformed during retrieval. 394 * If this flag is any of the other constants defined here 395 * then results <strong>WILL BE</strong> passed through an operation which can optionally 396 * transform the entities (into value objects for example). By default, transformation does 397 * not occur. 398 * 399 * @param transform the transformation flag. 400 * @param search the search object which provides the search parameters and pagination specification. 401 * @return any found results from the search. 402 */ 403 public Set<?> search(final int transform, final Search search); 404 405 /** 406 * Performs a search using the parameters specified in the given <code>search</code> object. 407 * 408 * @param search the search object which provides the search parameters and pagination specification. 409 * @return any found results from the search. 410 */ 411 public Set<VesselRegistrationPeriod> search(final Search search); 412 413 /** 414 * Allows transformation of entities into value objects 415 * (or something else for that matter), when the <code>transform</code> 416 * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.data.vessel.VesselRegistrationPeriodDao</code>, please note 417 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 418 * will be returned. 419 * 420 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 421 * 422 * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.data.vessel.VesselRegistrationPeriodDao} 423 * @param entity an entity that was found 424 * @return the transformed entity (i.e. new value object, etc) 425 * @see #transformEntities(int,Collection) 426 */ 427 public Object transformEntity(final int transform, final VesselRegistrationPeriod entity); 428 429 /** 430 * Transforms a collection of entities using the 431 * {@link #transformEntity(int,VesselRegistrationPeriod)} 432 * method. This method does not instantiate a new collection. 433 * <p> 434 * This method is to be used internally only. 435 * 436 * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.data.vessel.VesselRegistrationPeriodDao</code> 437 * @param entities the collection of entities to transform 438 * @see #transformEntity(int,VesselRegistrationPeriod) 439 */ 440 public void transformEntities(final int transform, final Collection<?> entities); 441 442 // spring-dao merge-point 443}