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.referential.location; 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 com.vividsolutions.jts.geom.MultiPolygon; 032import fr.ifremer.adagio.core.dao.Search; 033import fr.ifremer.adagio.core.dao.referential.Status; 034import fr.ifremer.adagio.core.dao.referential.ValidityStatus; 035import java.sql.Timestamp; 036import java.util.Collection; 037import java.util.Set; 038import org.andromda.spring.PaginationResult; 039 040/** 041 * Géomtérie polygonale (multi polygone) associée au lieu. 042 * A utiliser uniquement pour les lieux ayant une géométrie polygonale ou multi polygonale : n'avoir 043 * qu'un seul type de géométrie dans une table permet d'optimiser les index spatiaux d'Oracle, 044 * utilisés pour les requêtes spatiales. 045 * @see LocationArea 046 */ 047public interface LocationAreaDao 048{ 049 /** 050 * This constant is used as a transformation flag; entities can be converted automatically into value objects 051 * or other types, different methods in a class implementing this interface support this feature: look for 052 * an <code>int</code> parameter called <code>transform</code>. 053 * <p> 054 * This specific flag denotes no transformation will occur. 055 */ 056 public static final int TRANSFORM_NONE = 0; 057 058 059 /** 060 * Transforms the given results to a collection of {@link LocationArea} 061 * instances (this is useful when the returned results contains a row of data and you want just entities only). 062 * 063 * @param results the query results. 064 */ 065 public void toEntities(final Collection<?> results); 066 067 /** 068 * Gets an instance of LocationArea from the persistent store. 069 * @param id 070 * @return LocationArea 071 */ 072 public LocationArea get(Integer id); 073 074 /** 075 * <p> 076 * Does the same thing as {@link #get(Integer)} with an 077 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 078 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 079 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 080 * optionally transform the entity (into a value object for example). By default, transformation does 081 * not occur. 082 * </p> 083 * 084 * @param transform flag to determine transformation type. 085 * @param id the identifier of the entity to get. 086 * @return either the entity or the object transformed from the entity. 087 */ 088 public Object get(int transform, Integer id); 089 090 /** 091 * Loads an instance of LocationArea from the persistent store. 092 * @param id 093 * @return LocationArea 094 */ 095 public LocationArea load(Integer id); 096 097 /** 098 * <p> 099 * Does the same thing as {@link #load(Integer)} with an 100 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 101 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 102 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 103 * optionally transform the entity (into a value object for example). By default, transformation does 104 * not occur. 105 * </p> 106 * 107 * @param transform flag to determine transformation type. 108 * @param id the identifier of the entity to load. 109 * @return either the entity or the object transformed from the entity. 110 */ 111 public Object load(int transform, Integer id); 112 113 /** 114 * Loads all entities of type {@link LocationArea}. 115 * 116 * @return the loaded entities. 117 */ 118 public Collection<LocationArea> loadAll(); 119 120 /** 121 * <p> 122 * Does the same thing as {@link #loadAll()} with an 123 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 124 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 125 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 126 * transform the entity (into a value object for example). By default, transformation does 127 * not occur. 128 * </p> 129 * 130 * @param transform the flag indicating what transformation to use. 131 * @return the loaded entities. 132 */ 133 public Collection<?> loadAll(final int transform); 134 135 /** 136 * <p> 137 * Does the same thing as {@link #loadAll()} with an 138 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 139 * 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 140 * page retrieved. 141 * </p> 142 * 143 * @param pageNumber the page number to retrieve when paging results. 144 * @param pageSize the size of the page to retrieve when paging results. 145 * @return the loaded entities. 146 */ 147 public Collection<?> loadAll(final int pageNumber, final int pageSize); 148 149 /** 150 * <p> 151 * Does the same thing as {@link #loadAll(int)} with an 152 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 153 * 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 154 * page retrieved. 155 * </p> 156 * 157 * @param transform the flag indicating what transformation to use. 158 * @param pageNumber the page number to retrieve when paging results. 159 * @param pageSize the size of the page to retrieve when paging results. 160 * @return the loaded entities. 161 */ 162 public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize); 163 164 /** 165 * Creates an instance of LocationArea and adds it to the persistent store. 166 * @param locationArea 167 * @return LocationArea 168 */ 169 public LocationArea create(LocationArea locationArea); 170 171 /** 172 * <p> 173 * Does the same thing as {@link #create(LocationArea)} with an 174 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 175 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 176 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 177 * transform the entity (into a value object for example). By default, transformation does 178 * not occur. 179 * </p> 180 * @param transform 181 * @param locationArea 182 * @return Object 183 */ 184 public Object create(int transform, LocationArea locationArea); 185 186 /** 187 * Creates a new instance of LocationArea and adds 188 * from the passed in <code>entities</code> collection 189 * 190 * @param entities the collection of LocationArea 191 * instances to create. 192 * 193 * @return the created instances. 194 */ 195 public Collection<LocationArea> create(Collection<LocationArea> entities); 196 197 /** 198 * <p> 199 * Does the same thing as {@link #create(LocationArea)} with an 200 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 201 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 202 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 203 * transform the entities (into value objects for example). By default, transformation does 204 * not occur. 205 * </p> 206 * @param transform 207 * @param entities 208 * @return Collection 209 */ 210 public Collection<?> create(int transform, Collection<LocationArea> entities); 211 212 /** 213 * <p> 214 * Creates a new <code>LocationArea</code> 215 * instance from <strong>all</strong> attributes and adds it to 216 * the persistent store. 217 * </p> 218 * @param position 219 * @param positionUpdateDate 220 * @param label Code du lieuExemple : pour les ports : BR, SB 221 * @param name Libellé du lieu 222 * @param bathymetry Valeur de la bathymétrie sur le lieu (optionnel). La bathymétrie peut être positive ou négative. 223 * @param utFormat Format UT (Universal Time) de l'heure pour le lieu (0, +1, -4...). 224En France métropolitaine, par exemple : +1 (= heure Europe/Paris) 225 * @param daylightSavingTime Indique s'il faut opérer le changement d'heure hiver-été, vrai par défaut. 226En France métropolitaine, par exemple : Vrai. 227 * @param comments 228 * @param updateDate 229 * @return LocationArea 230 */ 231 public LocationArea create( 232 MultiPolygon position, 233 Timestamp positionUpdateDate, 234 String label, 235 String name, 236 Float bathymetry, 237 Short utFormat, 238 Boolean daylightSavingTime, 239 String comments, 240 Timestamp updateDate); 241 242 /** 243 * <p> 244 * Does the same thing as {@link #create(MultiPolygon, Timestamp, String, String, Float, Short, Boolean, String, Timestamp)} with an 245 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 246 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 247 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 248 * transform the entity (into a value object for example). By default, transformation does 249 * not occur. 250 * </p> 251 * @param transform 252 * @param position 253 * @param positionUpdateDate 254 * @param label Code du lieuExemple : pour les ports : BR, SB 255 * @param name Libellé du lieu 256 * @param bathymetry Valeur de la bathymétrie sur le lieu (optionnel). La bathymétrie peut être positive ou négative. 257 * @param utFormat Format UT (Universal Time) de l'heure pour le lieu (0, +1, -4...). 258En France métropolitaine, par exemple : +1 (= heure Europe/Paris) 259 * @param daylightSavingTime Indique s'il faut opérer le changement d'heure hiver-été, vrai par défaut. 260En France métropolitaine, par exemple : Vrai. 261 * @param comments 262 * @param updateDate 263 * @return LocationArea 264 */ 265 public Object create( 266 int transform, 267 MultiPolygon position, 268 Timestamp positionUpdateDate, 269 String label, 270 String name, 271 Float bathymetry, 272 Short utFormat, 273 Boolean daylightSavingTime, 274 String comments, 275 Timestamp updateDate); 276 277 /** 278 * <p> 279 * Creates a new <code>LocationArea</code> 280 * instance from only <strong>required</strong> properties (attributes 281 * and association ends) and adds it to the persistent store. 282 * </p> 283 * @param locationClassification 284 * @param locationLevel 285 * @param name 286 * @param status 287 * @param updateDate 288 * @param validityStatus 289 * @param position 290 * @return LocationArea 291 */ 292 public LocationArea create( 293 LocationClassification locationClassification, 294 LocationLevel locationLevel, 295 String name, 296 Status status, 297 Timestamp updateDate, 298 ValidityStatus validityStatus, 299 MultiPolygon position); 300 301 /** 302 * <p> 303 * Does the same thing as {@link #create(MultiPolygon, String, Timestamp)} with an 304 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 305 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 306 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 307 * transform the entity (into a value object for example). By default, transformation does 308 * not occur. 309 * </p> 310 * @param transform flag to determine transformation type. 311 * @param locationClassification 312 * @param locationLevel 313 * @param name 314 * @param status 315 * @param updateDate 316 * @param validityStatus 317 * @param position 318 * @return Object 319 */ 320 public Object create( 321 int transform, 322 LocationClassification locationClassification, 323 LocationLevel locationLevel, 324 String name, 325 Status status, 326 Timestamp updateDate, 327 ValidityStatus validityStatus, 328 MultiPolygon position); 329 330 /** 331 * Updates the <code>locationArea</code> instance in the persistent store. 332 * @param locationArea 333 */ 334 public void update(LocationArea locationArea); 335 336 /** 337 * Updates all instances in the <code>entities</code> collection in the persistent store. 338 * @param entities 339 */ 340 public void update(Collection<LocationArea> entities); 341 342 /** 343 * Removes the instance of LocationArea from the persistent store. 344 * @param locationArea 345 */ 346 public void remove(LocationArea locationArea); 347 348 /** 349 * Removes the instance of LocationArea having the given 350 * <code>identifier</code> from the persistent store. 351 * @param id 352 */ 353 public void remove(Integer id); 354 355 /** 356 * Removes all entities in the given <code>entities</code> collection. 357 * @param entities 358 */ 359 public void remove(Collection<LocationArea> entities); 360 361 362 /** 363 * Does the same thing as {@link #search(int, Search)} but with an 364 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 365 * limit your data to a specified page number and size. 366 * 367 * @param transform the transformation flag. 368 * @param pageNumber the page number in the data to retrieve 369 * @param pageSize the size of the page to retrieve. 370 * @param search the search object which provides the search parameters and pagination specification. 371 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 372 */ 373 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 374 375 /** 376 * Does the same thing as {@link #search(Search)} but with an 377 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 378 * limit your data to a specified page number and size. 379 * 380 * @param pageNumber the page number in the data to retrieve 381 * @param pageSize the size of the page to retrieve. 382 * @param search the search object which provides the search parameters and pagination specification. 383 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 384 */ 385 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 386 387 /** 388 * Does the same thing as {@link #search(Search)} but with an 389 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 390 * finder results will <strong>NOT</strong> be transformed during retrieval. 391 * If this flag is any of the other constants defined here 392 * then results <strong>WILL BE</strong> passed through an operation which can optionally 393 * transform the entities (into value objects for example). By default, transformation does 394 * not occur. 395 * 396 * @param transform the transformation flag. 397 * @param search the search object which provides the search parameters and pagination specification. 398 * @return any found results from the search. 399 */ 400 public Set<?> search(final int transform, final Search search); 401 402 /** 403 * Performs a search using the parameters specified in the given <code>search</code> object. 404 * 405 * @param search the search object which provides the search parameters and pagination specification. 406 * @return any found results from the search. 407 */ 408 public Set<LocationArea> search(final Search search); 409 410 /** 411 * Allows transformation of entities into value objects 412 * (or something else for that matter), when the <code>transform</code> 413 * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.referential.location.LocationAreaDao</code>, please note 414 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 415 * will be returned. 416 * 417 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 418 * 419 * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.referential.location.LocationAreaDao} 420 * @param entity an entity that was found 421 * @return the transformed entity (i.e. new value object, etc) 422 * @see #transformEntities(int,Collection) 423 */ 424 public Object transformEntity(final int transform, final LocationArea entity); 425 426 /** 427 * Transforms a collection of entities using the 428 * {@link #transformEntity(int,LocationArea)} 429 * method. This method does not instantiate a new collection. 430 * <p> 431 * This method is to be used internally only. 432 * 433 * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.referential.location.LocationAreaDao</code> 434 * @param entities the collection of entities to transform 435 * @see #transformEntity(int,LocationArea) 436 */ 437 public void transformEntities(final int transform, final Collection<?> entities); 438 439 // spring-dao merge-point 440}