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.administration.user; 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.administration.programStrategy.Program; 033import fr.ifremer.adagio.core.dao.data.vessel.Vessel; 034import fr.ifremer.adagio.core.dao.referential.ObjectType; 035import java.sql.Timestamp; 036import java.util.Collection; 037import java.util.Set; 038import org.andromda.spring.PaginationResult; 039 040/** 041 * Droits calculés pour un utilisateur à partir d'autres entités implémentant la gestion des droits. 042 * Le but est l'amélioration des performances de synchronisation entre bases locale et distante. Les 043 * droits sont calculés en début d'importation des données et n'ont pas à être recalculés pour 044 * chaque donnée pour laquelle des droits sont appliqués. 045 * Créé d'après l'étude sur l'amélioration des performances V3 (cf. mantis 10528). 046 * Remplie à partir de la procédure PL/SQL F_FILL_PERSON_SESSION 047 * @see PersonSessionVessel 048 */ 049public interface PersonSessionVesselDao 050{ 051 /** 052 * This constant is used as a transformation flag; entities can be converted automatically into value objects 053 * or other types, different methods in a class implementing this interface support this feature: look for 054 * an <code>int</code> parameter called <code>transform</code>. 055 * <p> 056 * This specific flag denotes no transformation will occur. 057 */ 058 public static final int TRANSFORM_NONE = 0; 059 060 061 /** 062 * Transforms the given results to a collection of {@link PersonSessionVessel} 063 * instances (this is useful when the returned results contains a row of data and you want just entities only). 064 * 065 * @param results the query results. 066 */ 067 public void toEntities(final Collection<?> results); 068 069 /** 070 * Gets an instance of PersonSessionVessel from the persistent store. 071 * @param id 072 * @return PersonSessionVessel 073 */ 074 public PersonSessionVessel get(Long id); 075 076 /** 077 * <p> 078 * Does the same thing as {@link #get(Long)} with an 079 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 080 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 081 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 082 * optionally transform the entity (into a value object for example). By default, transformation does 083 * not occur. 084 * </p> 085 * 086 * @param transform flag to determine transformation type. 087 * @param id the identifier of the entity to get. 088 * @return either the entity or the object transformed from the entity. 089 */ 090 public Object get(int transform, Long id); 091 092 /** 093 * Loads an instance of PersonSessionVessel from the persistent store. 094 * @param id 095 * @return PersonSessionVessel 096 */ 097 public PersonSessionVessel load(Long id); 098 099 /** 100 * <p> 101 * Does the same thing as {@link #load(Long)} with an 102 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 103 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 104 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 105 * optionally transform the entity (into a value object for example). By default, transformation does 106 * not occur. 107 * </p> 108 * 109 * @param transform flag to determine transformation type. 110 * @param id the identifier of the entity to load. 111 * @return either the entity or the object transformed from the entity. 112 */ 113 public Object load(int transform, Long id); 114 115 /** 116 * Loads all entities of type {@link PersonSessionVessel}. 117 * 118 * @return the loaded entities. 119 */ 120 public Collection<PersonSessionVessel> loadAll(); 121 122 /** 123 * <p> 124 * Does the same thing as {@link #loadAll()} with an 125 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 126 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 127 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 128 * transform the entity (into a value object for example). By default, transformation does 129 * not occur. 130 * </p> 131 * 132 * @param transform the flag indicating what transformation to use. 133 * @return the loaded entities. 134 */ 135 public Collection<?> loadAll(final int transform); 136 137 /** 138 * <p> 139 * Does the same thing as {@link #loadAll()} with an 140 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 141 * 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 142 * page retrieved. 143 * </p> 144 * 145 * @param pageNumber the page number to retrieve when paging results. 146 * @param pageSize the size of the page to retrieve when paging results. 147 * @return the loaded entities. 148 */ 149 public Collection<?> loadAll(final int pageNumber, final int pageSize); 150 151 /** 152 * <p> 153 * Does the same thing as {@link #loadAll(int)} with an 154 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 155 * 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 156 * page retrieved. 157 * </p> 158 * 159 * @param transform the flag indicating what transformation to use. 160 * @param pageNumber the page number to retrieve when paging results. 161 * @param pageSize the size of the page to retrieve when paging results. 162 * @return the loaded entities. 163 */ 164 public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize); 165 166 /** 167 * Creates an instance of PersonSessionVessel and adds it to the persistent store. 168 * @param personSessionVessel 169 * @return PersonSessionVessel 170 */ 171 public PersonSessionVessel create(PersonSessionVessel personSessionVessel); 172 173 /** 174 * <p> 175 * Does the same thing as {@link #create(PersonSessionVessel)} with an 176 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 177 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 178 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 179 * transform the entity (into a value object for example). By default, transformation does 180 * not occur. 181 * </p> 182 * @param transform 183 * @param personSessionVessel 184 * @return Object 185 */ 186 public Object create(int transform, PersonSessionVessel personSessionVessel); 187 188 /** 189 * Creates a new instance of PersonSessionVessel and adds 190 * from the passed in <code>entities</code> collection 191 * 192 * @param entities the collection of PersonSessionVessel 193 * instances to create. 194 * 195 * @return the created instances. 196 */ 197 public Collection<PersonSessionVessel> create(Collection<PersonSessionVessel> entities); 198 199 /** 200 * <p> 201 * Does the same thing as {@link #create(PersonSessionVessel)} with an 202 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 203 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 204 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 205 * transform the entities (into value objects for example). By default, transformation does 206 * not occur. 207 * </p> 208 * @param transform 209 * @param entities 210 * @return Collection 211 */ 212 public Collection<?> create(int transform, Collection<PersonSessionVessel> entities); 213 214 /** 215 * <p> 216 * Creates a new <code>PersonSessionVessel</code> 217 * instance from <strong>all</strong> attributes and adds it to 218 * the persistent store. 219 * </p> 220 * @param startDateTime 221 * @param endDateTime Attribut obligatoire : lorsque la valeur n'est pas renseigné dans les portefeuilles on lui assigne 222une valeur par défaut suprérieure à toute autre date. 223 * @param readVessel 224 * @param writeData 225 * @param validateData L'utilisateur a t il les droits de validation ? (renseigné à partir des privilèges sur les 226programmes) 227 * @param readData 228 * @param updateDate 229 * @return PersonSessionVessel 230 */ 231 public PersonSessionVessel create( 232 Timestamp startDateTime, 233 Timestamp endDateTime, 234 Boolean readVessel, 235 Boolean writeData, 236 Boolean validateData, 237 Boolean readData, 238 Timestamp updateDate); 239 240 /** 241 * <p> 242 * Does the same thing as {@link #create(Timestamp, Timestamp, Boolean, Boolean, Boolean, Boolean, Timestamp)} with an 243 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 244 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 245 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 246 * transform the entity (into a value object for example). By default, transformation does 247 * not occur. 248 * </p> 249 * @param transform 250 * @param startDateTime 251 * @param endDateTime Attribut obligatoire : lorsque la valeur n'est pas renseigné dans les portefeuilles on lui assigne 252une valeur par défaut suprérieure à toute autre date. 253 * @param readVessel 254 * @param writeData 255 * @param validateData L'utilisateur a t il les droits de validation ? (renseigné à partir des privilèges sur les 256programmes) 257 * @param readData 258 * @param updateDate 259 * @return PersonSessionVessel 260 */ 261 public Object create( 262 int transform, 263 Timestamp startDateTime, 264 Timestamp endDateTime, 265 Boolean readVessel, 266 Boolean writeData, 267 Boolean validateData, 268 Boolean readData, 269 Timestamp updateDate); 270 271 /** 272 * <p> 273 * Creates a new <code>PersonSessionVessel</code> 274 * instance from only <strong>required</strong> properties (attributes 275 * and association ends) and adds it to the persistent store. 276 * </p> 277 * @param endDateTime 278 * @param objectType 279 * @param personSession 280 * @param program 281 * @param readData 282 * @param readVessel 283 * @param startDateTime 284 * @param updateDate 285 * @param vessel 286 * @param writeData 287 * @return PersonSessionVessel 288 */ 289 public PersonSessionVessel create( 290 Timestamp endDateTime, 291 ObjectType objectType, 292 PersonSession personSession, 293 Program program, 294 Boolean readData, 295 Boolean readVessel, 296 Timestamp startDateTime, 297 Timestamp updateDate, 298 Vessel vessel, 299 Boolean writeData); 300 301 /** 302 * <p> 303 * Does the same thing as {@link #create(Timestamp, Timestamp, Boolean, Boolean, Boolean, 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 endDateTime 312 * @param objectType 313 * @param personSession 314 * @param program 315 * @param readData 316 * @param readVessel 317 * @param startDateTime 318 * @param updateDate 319 * @param vessel 320 * @param writeData 321 * @return Object 322 */ 323 public Object create( 324 int transform, 325 Timestamp endDateTime, 326 ObjectType objectType, 327 PersonSession personSession, 328 Program program, 329 Boolean readData, 330 Boolean readVessel, 331 Timestamp startDateTime, 332 Timestamp updateDate, 333 Vessel vessel, 334 Boolean writeData); 335 336 /** 337 * Updates the <code>personSessionVessel</code> instance in the persistent store. 338 * @param personSessionVessel 339 */ 340 public void update(PersonSessionVessel personSessionVessel); 341 342 /** 343 * Updates all instances in the <code>entities</code> collection in the persistent store. 344 * @param entities 345 */ 346 public void update(Collection<PersonSessionVessel> entities); 347 348 /** 349 * Removes the instance of PersonSessionVessel from the persistent store. 350 * @param personSessionVessel 351 */ 352 public void remove(PersonSessionVessel personSessionVessel); 353 354 /** 355 * Removes the instance of PersonSessionVessel having the given 356 * <code>identifier</code> from the persistent store. 357 * @param id 358 */ 359 public void remove(Long id); 360 361 /** 362 * Removes all entities in the given <code>entities</code> collection. 363 * @param entities 364 */ 365 public void remove(Collection<PersonSessionVessel> entities); 366 367 368 /** 369 * Does the same thing as {@link #search(int, Search)} but with an 370 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 371 * limit your data to a specified page number and size. 372 * 373 * @param transform the transformation flag. 374 * @param pageNumber the page number in the data to retrieve 375 * @param pageSize the size of the page to retrieve. 376 * @param search the search object which provides the search parameters and pagination specification. 377 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 378 */ 379 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 380 381 /** 382 * Does the same thing as {@link #search(Search)} but with an 383 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 384 * limit your data to a specified page number and size. 385 * 386 * @param pageNumber the page number in the data to retrieve 387 * @param pageSize the size of the page to retrieve. 388 * @param search the search object which provides the search parameters and pagination specification. 389 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 390 */ 391 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 392 393 /** 394 * Does the same thing as {@link #search(Search)} but with an 395 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 396 * finder results will <strong>NOT</strong> be transformed during retrieval. 397 * If this flag is any of the other constants defined here 398 * then results <strong>WILL BE</strong> passed through an operation which can optionally 399 * transform the entities (into value objects for example). By default, transformation does 400 * not occur. 401 * 402 * @param transform the transformation flag. 403 * @param search the search object which provides the search parameters and pagination specification. 404 * @return any found results from the search. 405 */ 406 public Set<?> search(final int transform, final Search search); 407 408 /** 409 * Performs a search using the parameters specified in the given <code>search</code> object. 410 * 411 * @param search the search object which provides the search parameters and pagination specification. 412 * @return any found results from the search. 413 */ 414 public Set<PersonSessionVessel> search(final Search search); 415 416 /** 417 * Allows transformation of entities into value objects 418 * (or something else for that matter), when the <code>transform</code> 419 * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.administration.user.PersonSessionVesselDao</code>, please note 420 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 421 * will be returned. 422 * 423 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 424 * 425 * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.administration.user.PersonSessionVesselDao} 426 * @param entity an entity that was found 427 * @return the transformed entity (i.e. new value object, etc) 428 * @see #transformEntities(int,Collection) 429 */ 430 public Object transformEntity(final int transform, final PersonSessionVessel entity); 431 432 /** 433 * Transforms a collection of entities using the 434 * {@link #transformEntity(int,PersonSessionVessel)} 435 * method. This method does not instantiate a new collection. 436 * <p> 437 * This method is to be used internally only. 438 * 439 * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.administration.user.PersonSessionVesselDao</code> 440 * @param entities the collection of entities to transform 441 * @see #transformEntity(int,PersonSessionVessel) 442 */ 443 public void transformEntities(final int transform, final Collection<?> entities); 444 445 // spring-dao merge-point 446}