/** * Example license header for Java files * * http://www.andromda.org/ */ // // Attention: Generated code! Do not modify by hand! // Generated by: SpringDao.vsl in andromda-spring-cartridge. // package org.andromda.test.3; /** * @see org.andromda.test.3.Person */ public interface PersonDao { /** * This constant is used as a transformation flag; entities can be converted automatically into value objects * or other types, different methods in a class implementing this interface support this feature: look for * an int parameter called transform. *

* This specific flag denotes no transformation will occur. */ public final static int TRANSFORM_NONE = 0; /** * Transforms the given results to a collection of {@link com.lighthousepmg.plz.domain.messaging.persistence.CommunicationCategory} * instances (this is useful when the returned results contains a row of data and you want just entities only). * * @param the query results. */ public void toEntities(final java.util.Collection results); /** * Loads an instance of org.andromda.test.3.Person from the persistent store. */ public org.andromda.test.3.Person load(java.lang.Long id); /** *

* Does the same thing as {@link #load(java.lang.Long)} with an * additional flag called transform. If this flag is set to TRANSFORM_NONE then * the returned entity will NOT be transformed. If this flag is any of the other constants * defined in this class then the result WILL BE passed through an operation which can * optionally transform the entity (into a value object for example). By default, transformation does * not occur. *

* * @param id the identifier of the entity to load. * @return either the entity or the object transformed from the entity. */ public Object load(int transform, java.lang.Long id); /** * Loads all entities of type {@link org.andromda.test.3.Person}. * * @return the loaded entities. */ public java.util.Collection loadAll(); /** *

* Does the same thing as {@link #loadAll()} with an * additional flag called transform. If this flag is set to TRANSFORM_NONE then * the returned entity will NOT be transformed. If this flag is any of the other constants * defined here then the result WILL BE passed through an operation which can optionally * transform the entity (into a value object for example). By default, transformation does * not occur. *

* * @param transform the flag indicating what transformation to use. * @return the loaded entities. */ public java.util.Collection loadAll(final int transform); /** *

* Does the same thing as {@link #loadAll()} with an * additional two arguments called pageNumber and pageSize. The pageNumber * 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 * page retrieved. *

* * @param pageNumber the page number to retrieve when paging results. * @param pageSize the size of the page to retrieve when paging results. * @return the loaded entities. */ public java.util.Collection loadAll(final int pageNumber, final int pageSize); /** *

* Does the same thing as {@link #loadAll(int)} with an * additional two arguments called pageNumber and pageSize. The pageNumber * 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 * page retrieved. *

* * @param transform the flag indicating what transformation to use. * @param pageNumber the page number to retrieve when paging results. * @param pageSize the size of the page to retrieve when paging results. * @return the loaded entities. */ public java.util.Collection loadAll(final int transform, final int pageNumber, final int pageSize); /** * Creates an instance of org.andromda.test.3.Person and adds it to the persistent store. */ public org.andromda.test.3.Person create(org.andromda.test.3.Person person); /** *

* Does the same thing as {@link #create(org.andromda.test.3.Person)} with an * additional flag called transform. If this flag is set to TRANSFORM_NONE then * the returned entity will NOT be transformed. If this flag is any of the other constants * defined here then the result WILL BE passed through an operation which can optionally * transform the entity (into a value object for example). By default, transformation does * not occur. *

*/ public Object create(int transform, org.andromda.test.3.Person person); /** * Creates a new instance of org.andromda.test.3.Person and adds * from the passed in entities collection * * @param entities the collection of org.andromda.test.3.Person * instances to create. * * @return the created instances. */ public java.util.Collection create(java.util.Collection entities); /** *

* Does the same thing as {@link #create(org.andromda.test.3.Person)} with an * additional flag called transform. If this flag is set to TRANSFORM_NONE then * the returned entity will NOT be transformed. If this flag is any of the other constants * defined here then the result WILL BE passed through an operation which can optionally * transform the entities (into value objects for example). By default, transformation does * not occur. *

*/ public java.util.Collection create(int transform, java.util.Collection entities); /** *

* Creates a new org.andromda.test.3.Person * instance from all attributes and adds it to * the persistent store. *

*/ public org.andromda.test.3.Person create( java.lang.String name, java.util.Date birthDate); /** *

* Does the same thing as {@link #create(java.lang.String, java.util.Date)} with an * additional flag called transform. If this flag is set to TRANSFORM_NONE then * the returned entity will NOT be transformed. If this flag is any of the other constants * defined here then the result WILL BE passed through an operation which can optionally * transform the entity (into a value object for example). By default, transformation does * not occur. *

*/ public Object create( int transform, java.lang.String name, java.util.Date birthDate); /** * Updates the person instance in the persistent store. */ public void update(org.andromda.test.3.Person person); /** * Updates all instances in the entities collection in the persistent store. */ public void update(java.util.Collection entities); /** * Removes the instance of org.andromda.test.3.Person from the persistent store. */ public void remove(org.andromda.test.3.Person person); /** * Removes the instance of org.andromda.test.3.Person having the given * identifier from the persistent store. */ public void remove(java.lang.Long id); /** * Removes all entities in the given entities collection. */ public void remove(java.util.Collection entities); /** * Does the same thing as {@link #search(int, org.andromda.spring.Search) but with an * additional two flags called pageNumber and pageSize. These flags allow you to * limit your data to a specified page number and size. * * @param transform the transformation flag. * @param pageNumber the page number in the data to retrieve * @param pageSize the size of the page to retrieve. * @param search the search object which provides the search parameters and pagination specification. * @return any found results from the search wrapped in a {@link org.andromda.spring.PaginationResult} instance. */ public org.andromda.spring.PaginationResult search(final int transform, final int pageNumber, final int pageSize, final org.andromda.spring.Search search); /** * Does the same thing as {@link #search(org.andromda.spring.Search) but with an * additional two flags called pageNumber and pageSize. These flags allow you to * limit your data to a specified page number and size. * * @param pageNumber the page number in the data to retrieve * @param pageSize the size of the page to retrieve. * @param search the search object which provides the search parameters and pagination specification. * @return any found results from the search wrapped in a {@link org.andromda.spring.PaginationResult} instance. */ public org.andromda.spring.PaginationResult search(final int pageNumber, final int pageSize, final org.andromda.spring.Search search); /** * Does the same thing as {@link #search(org.andromda.spring.Search)} but with an * additional flag called transform. If this flag is set to TRANSFORM_NONE then * finder results will NOT be transformed during retrieval. * If this flag is any of the other constants defined here * then results WILL BE passed through an operation which can optionally * transform the entities (into value objects for example). By default, transformation does * not occur. * * @param transform the transformation flag. * @param search the search object which provides the search parameters and pagination specification. * @return any found results from the search. */ public java.util.Set search(final int transform, final org.andromda.spring.Search search); /** * Performs a search using the parameters specified in the given search object. * * @param search the search object which provides the search parameters and pagination specification. * @return any found results from the search. */ public java.util.Set search(final org.andromda.spring.Search search); // spring-dao merge-point }