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.referential.Status; 033import java.sql.Timestamp; 034import java.util.Collection; 035import java.util.Date; 036import java.util.Set; 037import org.andromda.spring.PaginationResult; 038 039/** 040 * Transfert des droits entre un service et un autre service. 041 * @deprecated Use Program2Department instead 042 * @see DepartmentPrivilegeTransfert 043 */ 044public interface DepartmentPrivilegeTransfertDao 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 DepartmentPrivilegeTransfert} 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 DepartmentPrivilegeTransfert from the persistent store. 066 * @param departmentPrivilegeTransfertPk 067 * @return DepartmentPrivilegeTransfert 068 */ 069 public DepartmentPrivilegeTransfert get(DepartmentPrivilegeTransfertPK departmentPrivilegeTransfertPk); 070 071 /** 072 * <p> 073 * Does the same thing as {@link #get(DepartmentPrivilegeTransfertPK)} 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 departmentPrivilegeTransfertPk 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, DepartmentPrivilegeTransfertPK departmentPrivilegeTransfertPk); 086 087 /** 088 * Loads an instance of DepartmentPrivilegeTransfert from the persistent store. 089 * @param departmentPrivilegeTransfertPk 090 * @return DepartmentPrivilegeTransfert 091 */ 092 public DepartmentPrivilegeTransfert load(DepartmentPrivilegeTransfertPK departmentPrivilegeTransfertPk); 093 094 /** 095 * <p> 096 * Does the same thing as {@link #load(DepartmentPrivilegeTransfertPK)} 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 departmentPrivilegeTransfertPk 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, DepartmentPrivilegeTransfertPK departmentPrivilegeTransfertPk); 109 110 /** 111 * Loads all entities of type {@link DepartmentPrivilegeTransfert}. 112 * 113 * @return the loaded entities. 114 */ 115 public Collection<DepartmentPrivilegeTransfert> 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 DepartmentPrivilegeTransfert and adds it to the persistent store. 163 * @param departmentPrivilegeTransfert 164 * @return DepartmentPrivilegeTransfert 165 */ 166 public DepartmentPrivilegeTransfert create(DepartmentPrivilegeTransfert departmentPrivilegeTransfert); 167 168 /** 169 * <p> 170 * Does the same thing as {@link #create(DepartmentPrivilegeTransfert)} 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 departmentPrivilegeTransfert 179 * @return Object 180 */ 181 public Object create(int transform, DepartmentPrivilegeTransfert departmentPrivilegeTransfert); 182 183 /** 184 * Creates a new instance of DepartmentPrivilegeTransfert and adds 185 * from the passed in <code>entities</code> collection 186 * 187 * @param entities the collection of DepartmentPrivilegeTransfert 188 * instances to create. 189 * 190 * @return the created instances. 191 */ 192 public Collection<DepartmentPrivilegeTransfert> create(Collection<DepartmentPrivilegeTransfert> entities); 193 194 /** 195 * <p> 196 * Does the same thing as {@link #create(DepartmentPrivilegeTransfert)} 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<DepartmentPrivilegeTransfert> entities); 208 209 /** 210 * <p> 211 * Creates a new <code>DepartmentPrivilegeTransfert</code> 212 * instance from <strong>all</strong> attributes and adds it to 213 * the persistent store. 214 * </p> 215 * @param transfertDate Date du transfert des droits entre service 216 * @param updateDate 217 * @return DepartmentPrivilegeTransfert 218 */ 219 public DepartmentPrivilegeTransfert create( 220 Date transfertDate, 221 Timestamp updateDate); 222 223 /** 224 * <p> 225 * Does the same thing as {@link #create(Date, Timestamp)} with an 226 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 227 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 228 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 229 * transform the entity (into a value object for example). By default, transformation does 230 * not occur. 231 * </p> 232 * @param transform 233 * @param transfertDate Date du transfert des droits entre service 234 * @param updateDate 235 * @return DepartmentPrivilegeTransfert 236 */ 237 public Object create( 238 int transform, 239 Date transfertDate, 240 Timestamp updateDate); 241 242 /** 243 * <p> 244 * Creates a new <code>DepartmentPrivilegeTransfert</code> 245 * instance from only <strong>required</strong> properties (attributes 246 * and association ends) and adds it to the persistent store. 247 * </p> 248 * @param fromDepartment 249 * @param status 250 * @param toDepartment 251 * @param transfertDate 252 * @param updateDate 253 * @return DepartmentPrivilegeTransfert 254 */ 255 public DepartmentPrivilegeTransfert create( 256 Department fromDepartment, 257 Status status, 258 Department toDepartment, 259 Date transfertDate, 260 Timestamp updateDate); 261 262 /** 263 * <p> 264 * Does the same thing as {@link #create(Date, Timestamp)} with an 265 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 266 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 267 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 268 * transform the entity (into a value object for example). By default, transformation does 269 * not occur. 270 * </p> 271 * @param transform flag to determine transformation type. 272 * @param fromDepartment 273 * @param status 274 * @param toDepartment 275 * @param transfertDate 276 * @param updateDate 277 * @return Object 278 */ 279 public Object create( 280 int transform, 281 Department fromDepartment, 282 Status status, 283 Department toDepartment, 284 Date transfertDate, 285 Timestamp updateDate); 286 287 /** 288 * Updates the <code>departmentPrivilegeTransfert</code> instance in the persistent store. 289 * @param departmentPrivilegeTransfert 290 */ 291 public void update(DepartmentPrivilegeTransfert departmentPrivilegeTransfert); 292 293 /** 294 * Updates all instances in the <code>entities</code> collection in the persistent store. 295 * @param entities 296 */ 297 public void update(Collection<DepartmentPrivilegeTransfert> entities); 298 299 /** 300 * Removes the instance of DepartmentPrivilegeTransfert from the persistent store. 301 * @param departmentPrivilegeTransfert 302 */ 303 public void remove(DepartmentPrivilegeTransfert departmentPrivilegeTransfert); 304 305 /** 306 * Removes the instance of DepartmentPrivilegeTransfert having the given 307 * <code>identifier</code> from the persistent store. 308 * @param departmentPrivilegeTransfertPk 309 */ 310 public void remove(DepartmentPrivilegeTransfertPK departmentPrivilegeTransfertPk); 311 312 /** 313 * Removes all entities in the given <code>entities</code> collection. 314 * @param entities 315 */ 316 public void remove(Collection<DepartmentPrivilegeTransfert> entities); 317 318 319 /** 320 * Does the same thing as {@link #search(int, Search)} but with an 321 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 322 * limit your data to a specified page number and size. 323 * 324 * @param transform the transformation flag. 325 * @param pageNumber the page number in the data to retrieve 326 * @param pageSize the size of the page to retrieve. 327 * @param search the search object which provides the search parameters and pagination specification. 328 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 329 */ 330 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 331 332 /** 333 * Does the same thing as {@link #search(Search)} but with an 334 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 335 * limit your data to a specified page number and size. 336 * 337 * @param pageNumber the page number in the data to retrieve 338 * @param pageSize the size of the page to retrieve. 339 * @param search the search object which provides the search parameters and pagination specification. 340 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 341 */ 342 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 343 344 /** 345 * Does the same thing as {@link #search(Search)} but with an 346 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 347 * finder results will <strong>NOT</strong> be transformed during retrieval. 348 * If this flag is any of the other constants defined here 349 * then results <strong>WILL BE</strong> passed through an operation which can optionally 350 * transform the entities (into value objects for example). By default, transformation does 351 * not occur. 352 * 353 * @param transform the transformation flag. 354 * @param search the search object which provides the search parameters and pagination specification. 355 * @return any found results from the search. 356 */ 357 public Set<?> search(final int transform, final Search search); 358 359 /** 360 * Performs a search using the parameters specified in the given <code>search</code> object. 361 * 362 * @param search the search object which provides the search parameters and pagination specification. 363 * @return any found results from the search. 364 */ 365 public Set<DepartmentPrivilegeTransfert> search(final Search search); 366 367 /** 368 * Allows transformation of entities into value objects 369 * (or something else for that matter), when the <code>transform</code> 370 * flag is set to one of the constants defined in <code>fr.ifremer.adagio.core.dao.administration.user.DepartmentPrivilegeTransfertDao</code>, please note 371 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 372 * will be returned. 373 * 374 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 375 * 376 * @param transform one of the constants declared in {@link fr.ifremer.adagio.core.dao.administration.user.DepartmentPrivilegeTransfertDao} 377 * @param entity an entity that was found 378 * @return the transformed entity (i.e. new value object, etc) 379 * @see #transformEntities(int,Collection) 380 */ 381 public Object transformEntity(final int transform, final DepartmentPrivilegeTransfert entity); 382 383 /** 384 * Transforms a collection of entities using the 385 * {@link #transformEntity(int,DepartmentPrivilegeTransfert)} 386 * method. This method does not instantiate a new collection. 387 * <p> 388 * This method is to be used internally only. 389 * 390 * @param transform one of the constants declared in <code>fr.ifremer.adagio.core.dao.administration.user.DepartmentPrivilegeTransfertDao</code> 391 * @param entities the collection of entities to transform 392 * @see #transformEntity(int,DepartmentPrivilegeTransfert) 393 */ 394 public void transformEntities(final int transform, final Collection<?> entities); 395 396 // spring-dao merge-point 397}