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