1 // license-header java merge-point 2 // 3 // Attention: Generated code! Do not modify by hand! 4 // Generated by: SpringDao.vsl in andromda-spring-cartridge. 5 // 6 package fr.ifremer.quadrige3.core.dao.system.synchronization; 7 8 /*- 9 * #%L 10 * Quadrige3 Core :: Client API 11 * %% 12 * Copyright (C) 2017 - 2024 Ifremer 13 * %% 14 * This program is free software: you can redistribute it and/or modify 15 * it under the terms of the GNU Affero General Public License as published by 16 * the Free Software Foundation, either version 3 of the License, or 17 * (at your option) any later version. 18 * 19 * This program is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU General Public License for more details. 23 * 24 * You should have received a copy of the GNU Affero General Public License 25 * along with this program. If not, see <http://www.gnu.org/licenses/>. 26 * #L% 27 */ 28 import fr.ifremer.quadrige3.core.dao.Search; 29 import java.util.Collection; 30 import java.util.Set; 31 import org.andromda.spring.PaginationResult; 32 33 /** 34 * Used to store many values (because IN operator is limited to 1000 values) 35 * @see TempQueryParameter 36 */ 37 public interface TempQueryParameterDao 38 { 39 /** 40 * This constant is used as a transformation flag; entities can be converted automatically into value objects 41 * or other types, different methods in a class implementing this interface support this feature: look for 42 * an <code>int</code> parameter called <code>transform</code>. 43 * <p> 44 * This specific flag denotes no transformation will occur. 45 */ 46 public static final int TRANSFORM_NONE = 0; 47 48 49 /** 50 * Transforms the given results to a collection of {@link TempQueryParameter} 51 * instances (this is useful when the returned results contains a row of data and you want just entities only). 52 * 53 * @param results the query results. 54 */ 55 public void toEntities(final Collection<?> results); 56 57 /** 58 * Gets an instance of TempQueryParameter from the persistent store. 59 * @param id 60 * @return TempQueryParameter 61 */ 62 public TempQueryParameter get(Integer id); 63 64 /** 65 * <p> 66 * Does the same thing as {@link #get(Integer)} with an 67 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 68 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 69 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 70 * optionally transform the entity (into a value object for example). By default, transformation does 71 * not occur. 72 * </p> 73 * 74 * @param transform flag to determine transformation type. 75 * @param id the identifier of the entity to get. 76 * @return either the entity or the object transformed from the entity. 77 */ 78 public Object get(int transform, Integer id); 79 80 /** 81 * Loads an instance of TempQueryParameter from the persistent store. 82 * @param id 83 * @return TempQueryParameter 84 */ 85 public TempQueryParameter load(Integer id); 86 87 /** 88 * <p> 89 * Does the same thing as {@link #load(Integer)} with an 90 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 91 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 92 * defined in this class then the result <strong>WILL BE</strong> passed through an operation which can 93 * optionally transform the entity (into a value object for example). By default, transformation does 94 * not occur. 95 * </p> 96 * 97 * @param transform flag to determine transformation type. 98 * @param id the identifier of the entity to load. 99 * @return either the entity or the object transformed from the entity. 100 */ 101 public Object load(int transform, Integer id); 102 103 /** 104 * Loads all entities of type {@link TempQueryParameter}. 105 * 106 * @return the loaded entities. 107 */ 108 public Collection<TempQueryParameter> loadAll(); 109 110 /** 111 * <p> 112 * Does the same thing as {@link #loadAll()} with an 113 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 114 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 115 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 116 * transform the entity (into a value object for example). By default, transformation does 117 * not occur. 118 * </p> 119 * 120 * @param transform the flag indicating what transformation to use. 121 * @return the loaded entities. 122 */ 123 public Collection<?> loadAll(final int transform); 124 125 /** 126 * <p> 127 * Does the same thing as {@link #loadAll()} with an 128 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 129 * 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 130 * page retrieved. 131 * </p> 132 * 133 * @param pageNumber the page number to retrieve when paging results. 134 * @param pageSize the size of the page to retrieve when paging results. 135 * @return the loaded entities. 136 */ 137 public Collection<?> loadAll(final int pageNumber, final int pageSize); 138 139 /** 140 * <p> 141 * Does the same thing as {@link #loadAll(int)} with an 142 * additional two arguments called <code>pageNumber</code> and <code>pageSize</code>. The <code>pageNumber</code> 143 * 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 144 * page retrieved. 145 * </p> 146 * 147 * @param transform the flag indicating what transformation to use. 148 * @param pageNumber the page number to retrieve when paging results. 149 * @param pageSize the size of the page to retrieve when paging results. 150 * @return the loaded entities. 151 */ 152 public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize); 153 154 /** 155 * Creates an instance of TempQueryParameter and adds it to the persistent store. 156 * @param tempQueryParameter 157 * @return TempQueryParameter 158 */ 159 public TempQueryParameter create(TempQueryParameter tempQueryParameter); 160 161 /** 162 * <p> 163 * Does the same thing as {@link #create(TempQueryParameter)} with an 164 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 165 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 166 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 167 * transform the entity (into a value object for example). By default, transformation does 168 * not occur. 169 * </p> 170 * @param transform 171 * @param tempQueryParameter 172 * @return Object 173 */ 174 public Object create(int transform, TempQueryParameter tempQueryParameter); 175 176 /** 177 * Creates a new instance of TempQueryParameter and adds 178 * from the passed in <code>entities</code> collection 179 * 180 * @param entities the collection of TempQueryParameter 181 * instances to create. 182 * 183 * @return the created instances. 184 */ 185 public Collection<TempQueryParameter> create(Collection<TempQueryParameter> entities); 186 187 /** 188 * <p> 189 * Does the same thing as {@link #create(TempQueryParameter)} with an 190 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 191 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 192 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 193 * transform the entities (into value objects for example). By default, transformation does 194 * not occur. 195 * </p> 196 * @param transform 197 * @param entities 198 * @return Collection 199 */ 200 public Collection<?> create(int transform, Collection<TempQueryParameter> entities); 201 202 /** 203 * <p> 204 * Creates a new <code>TempQueryParameter</code> 205 * instance from <strong>all</strong> attributes and adds it to 206 * the persistent store. 207 * </p> 208 * @param parameterName 209 * @param numericalValue 210 * @param alphanumericalValue 211 * @param quserId 212 * @param groupingKey 213 * @return TempQueryParameter 214 */ 215 public TempQueryParameter create( 216 String parameterName, 217 Double numericalValue, 218 String alphanumericalValue, 219 Integer quserId, 220 Integer groupingKey); 221 222 /** 223 * <p> 224 * Does the same thing as {@link #create(String, Double, String, Integer, Integer)} with an 225 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 226 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 227 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 228 * transform the entity (into a value object for example). By default, transformation does 229 * not occur. 230 * </p> 231 * @param transform 232 * @param parameterName 233 * @param numericalValue 234 * @param alphanumericalValue 235 * @param quserId 236 * @param groupingKey 237 * @return TempQueryParameter 238 */ 239 public Object create( 240 int transform, 241 String parameterName, 242 Double numericalValue, 243 String alphanumericalValue, 244 Integer quserId, 245 Integer groupingKey); 246 247 248 /** 249 * Updates the <code>tempQueryParameter</code> instance in the persistent store. 250 * @param tempQueryParameter 251 */ 252 public void update(TempQueryParameter tempQueryParameter); 253 254 /** 255 * Updates all instances in the <code>entities</code> collection in the persistent store. 256 * @param entities 257 */ 258 public void update(Collection<TempQueryParameter> entities); 259 260 /** 261 * Removes the instance of TempQueryParameter from the persistent store. 262 * @param tempQueryParameter 263 */ 264 public void remove(TempQueryParameter tempQueryParameter); 265 266 /** 267 * Removes the instance of TempQueryParameter having the given 268 * <code>identifier</code> from the persistent store. 269 * @param id 270 */ 271 public void remove(Integer id); 272 273 /** 274 * Removes all entities in the given <code>entities</code> collection. 275 * @param entities 276 */ 277 public void remove(Collection<TempQueryParameter> entities); 278 279 280 /** 281 * Does the same thing as {@link #search(int, Search)} but with an 282 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 283 * limit your data to a specified page number and size. 284 * 285 * @param transform the transformation flag. 286 * @param pageNumber the page number in the data to retrieve 287 * @param pageSize the size of the page to retrieve. 288 * @param search the search object which provides the search parameters and pagination specification. 289 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 290 */ 291 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 292 293 /** 294 * Does the same thing as {@link #search(Search)} but with an 295 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 296 * limit your data to a specified page number and size. 297 * 298 * @param pageNumber the page number in the data to retrieve 299 * @param pageSize the size of the page to retrieve. 300 * @param search the search object which provides the search parameters and pagination specification. 301 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 302 */ 303 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 304 305 /** 306 * Does the same thing as {@link #search(Search)} but with an 307 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 308 * finder results will <strong>NOT</strong> be transformed during retrieval. 309 * If this flag is any of the other constants defined here 310 * then results <strong>WILL BE</strong> passed through an operation which can optionally 311 * transform the entities (into value objects for example). By default, transformation does 312 * not occur. 313 * 314 * @param transform the transformation flag. 315 * @param search the search object which provides the search parameters and pagination specification. 316 * @return any found results from the search. 317 */ 318 public Set<?> search(final int transform, final Search search); 319 320 /** 321 * Performs a search using the parameters specified in the given <code>search</code> object. 322 * 323 * @param search the search object which provides the search parameters and pagination specification. 324 * @return any found results from the search. 325 */ 326 public Set<TempQueryParameter> search(final Search search); 327 328 /** 329 * Allows transformation of entities into value objects 330 * (or something else for that matter), when the <code>transform</code> 331 * flag is set to one of the constants defined in <code>fr.ifremer.quadrige3.core.dao.system.synchronization.TempQueryParameterDao</code>, please note 332 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 333 * will be returned. 334 * 335 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 336 * 337 * @param transform one of the constants declared in {@link fr.ifremer.quadrige3.core.dao.system.synchronization.TempQueryParameterDao} 338 * @param entity an entity that was found 339 * @return the transformed entity (i.e. new value object, etc) 340 * @see #transformEntities(int,Collection) 341 */ 342 public Object transformEntity(final int transform, final TempQueryParameter entity); 343 344 /** 345 * Transforms a collection of entities using the 346 * {@link #transformEntity(int,TempQueryParameter)} 347 * method. This method does not instantiate a new collection. 348 * <p> 349 * This method is to be used internally only. 350 * 351 * @param transform one of the constants declared in <code>fr.ifremer.quadrige3.core.dao.system.synchronization.TempQueryParameterDao</code> 352 * @param entities the collection of entities to transform 353 * @see #transformEntity(int,TempQueryParameter) 354 */ 355 public void transformEntities(final int transform, final Collection<?> entities); 356 357 // spring-dao merge-point 358 }