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; 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 * Gestion de la géométrie ponctuelle des localisations 35 * @see LocPoint 36 */ 37 public interface LocPointDao 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 LocPoint} 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 LocPoint from the persistent store. 59 * @param locId 60 * @return LocPoint 61 */ 62 public LocPoint get(Integer locId); 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 locId 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 locId); 79 80 /** 81 * Loads an instance of LocPoint from the persistent store. 82 * @param locId 83 * @return LocPoint 84 */ 85 public LocPoint load(Integer locId); 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 locId 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 locId); 102 103 /** 104 * Loads all entities of type {@link LocPoint}. 105 * 106 * @return the loaded entities. 107 */ 108 public Collection<LocPoint> 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 LocPoint and adds it to the persistent store. 156 * @param locPoint 157 * @return LocPoint 158 */ 159 public LocPoint create(LocPoint locPoint); 160 161 /** 162 * <p> 163 * Does the same thing as {@link #create(LocPoint)} 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 locPoint 172 * @return Object 173 */ 174 public Object create(int transform, LocPoint locPoint); 175 176 /** 177 * Creates a new instance of LocPoint and adds 178 * from the passed in <code>entities</code> collection 179 * 180 * @param entities the collection of LocPoint 181 * instances to create. 182 * 183 * @return the created instances. 184 */ 185 public Collection<LocPoint> create(Collection<LocPoint> entities); 186 187 /** 188 * <p> 189 * Does the same thing as {@link #create(LocPoint)} 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<LocPoint> entities); 201 202 /** 203 * <p> 204 * Creates a new <code>LocPoint</code> 205 * instance from <strong>all</strong> attributes and adds it to 206 * the persistent store. 207 * </p> 208 * @param locPosition Géométrie ponctuelle de la localisation 209 * @return LocPoint 210 */ 211 public LocPoint create( 212 String locPosition); 213 214 /** 215 * <p> 216 * Does the same thing as {@link #create(String)} with an 217 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 218 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 219 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 220 * transform the entity (into a value object for example). By default, transformation does 221 * not occur. 222 * </p> 223 * @param transform 224 * @param locPosition Géométrie ponctuelle de la localisation 225 * @return LocPoint 226 */ 227 public Object create( 228 int transform, 229 String locPosition); 230 231 /** 232 * <p> 233 * Creates a new <code>LocPoint</code> 234 * instance from only <strong>required</strong> properties (attributes 235 * and association ends) and adds it to the persistent store. 236 * </p> 237 * @param locPosition 238 * @param location 239 * @return LocPoint 240 */ 241 public LocPoint create( 242 String locPosition, 243 Location location); 244 245 /** 246 * <p> 247 * Does the same thing as {@link #create(String)} with an 248 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 249 * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants 250 * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally 251 * transform the entity (into a value object for example). By default, transformation does 252 * not occur. 253 * </p> 254 * @param transform flag to determine transformation type. 255 * @param locPosition 256 * @param location 257 * @return Object 258 */ 259 public Object create( 260 int transform, 261 String locPosition, 262 Location location); 263 264 /** 265 * Updates the <code>locPoint</code> instance in the persistent store. 266 * @param locPoint 267 */ 268 public void update(LocPoint locPoint); 269 270 /** 271 * Updates all instances in the <code>entities</code> collection in the persistent store. 272 * @param entities 273 */ 274 public void update(Collection<LocPoint> entities); 275 276 /** 277 * Removes the instance of LocPoint from the persistent store. 278 * @param locPoint 279 */ 280 public void remove(LocPoint locPoint); 281 282 /** 283 * Removes the instance of LocPoint having the given 284 * <code>identifier</code> from the persistent store. 285 * @param locId 286 */ 287 public void remove(Integer locId); 288 289 /** 290 * Removes all entities in the given <code>entities</code> collection. 291 * @param entities 292 */ 293 public void remove(Collection<LocPoint> entities); 294 295 296 /** 297 * Does the same thing as {@link #search(int, Search)} but with an 298 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 299 * limit your data to a specified page number and size. 300 * 301 * @param transform the transformation flag. 302 * @param pageNumber the page number in the data to retrieve 303 * @param pageSize the size of the page to retrieve. 304 * @param search the search object which provides the search parameters and pagination specification. 305 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 306 */ 307 public PaginationResult search(final int transform, final int pageNumber, final int pageSize, final Search search); 308 309 /** 310 * Does the same thing as {@link #search(Search)} but with an 311 * additional two flags called <code>pageNumber</code> and <code>pageSize</code>. These flags allow you to 312 * limit your data to a specified page number and size. 313 * 314 * @param pageNumber the page number in the data to retrieve 315 * @param pageSize the size of the page to retrieve. 316 * @param search the search object which provides the search parameters and pagination specification. 317 * @return any found results from the search wrapped in a {@link PaginationResult} instance. 318 */ 319 public PaginationResult search(final int pageNumber, final int pageSize, final Search search); 320 321 /** 322 * Does the same thing as {@link #search(Search)} but with an 323 * additional flag called <code>transform</code>. If this flag is set to <code>TRANSFORM_NONE</code> then 324 * finder results will <strong>NOT</strong> be transformed during retrieval. 325 * If this flag is any of the other constants defined here 326 * then results <strong>WILL BE</strong> passed through an operation which can optionally 327 * transform the entities (into value objects for example). By default, transformation does 328 * not occur. 329 * 330 * @param transform the transformation flag. 331 * @param search the search object which provides the search parameters and pagination specification. 332 * @return any found results from the search. 333 */ 334 public Set<?> search(final int transform, final Search search); 335 336 /** 337 * Performs a search using the parameters specified in the given <code>search</code> object. 338 * 339 * @param search the search object which provides the search parameters and pagination specification. 340 * @return any found results from the search. 341 */ 342 public Set<LocPoint> search(final Search search); 343 344 /** 345 * Allows transformation of entities into value objects 346 * (or something else for that matter), when the <code>transform</code> 347 * flag is set to one of the constants defined in <code>fr.ifremer.quadrige3.core.dao.system.LocPointDao</code>, please note 348 * that the {@link #TRANSFORM_NONE} constant denotes no transformation, so the entity itself 349 * will be returned. 350 * 351 * If the integer argument value is unknown {@link #TRANSFORM_NONE} is assumed. 352 * 353 * @param transform one of the constants declared in {@link fr.ifremer.quadrige3.core.dao.system.LocPointDao} 354 * @param entity an entity that was found 355 * @return the transformed entity (i.e. new value object, etc) 356 * @see #transformEntities(int,Collection) 357 */ 358 public Object transformEntity(final int transform, final LocPoint entity); 359 360 /** 361 * Transforms a collection of entities using the 362 * {@link #transformEntity(int,LocPoint)} 363 * method. This method does not instantiate a new collection. 364 * <p> 365 * This method is to be used internally only. 366 * 367 * @param transform one of the constants declared in <code>fr.ifremer.quadrige3.core.dao.system.LocPointDao</code> 368 * @param entities the collection of entities to transform 369 * @see #transformEntity(int,LocPoint) 370 */ 371 public void transformEntities(final int transform, final Collection<?> entities); 372 373 // spring-dao merge-point 374 }