// license-header java merge-point // // Attention: Generated code! Do not modify by hand! // Generated by DaoLocal.vsl in andromda-ejb3-cartridge on 09/18/2014 16:56:09. // package org.andromda.test.howto18.a; import java.util.Collection; /** * @see User */ public interface UserDao { /** * 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 static final int TRANSFORM_NONE = 0; /** * Loads an instance of User from the persistent store. * @param id Long identifier part of the composite PK of the entity to load. * @return User * @throws UserDaoException */ public User load(Long id) throws UserDaoException; /** * Does the same thing as {@link #load(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 transform int transformation flag * @param id Long identifier part of the composite PK of the entity to load. * @return either the entity or the object transformed from the entity. * @throws UserDaoException */ public Object load(int transform, Long id) throws UserDaoException; /** * Loads all entities of type {@link User}. * * @return the loaded entities. * @throws UserDaoException */ public Collection loadAll() throws UserDaoException; /** * 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 Collection of the loaded entities. * @throws UserDaoException */ @SuppressWarnings("rawtypes") public Collection loadAll(final int transform) throws UserDaoException; /** * Creates an instance of User and adds it to the persistent store. * @param user * @return User * @throws UserDaoException */ public User create(User user) throws UserDaoException; /** * Does the same thing as {@link #create(User)} 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 * @param user * @return Object * @throws UserDaoException */ public Object create(int transform, User user) throws UserDaoException; /** * Creates a new instance of User and adds * from the passed in entities collection * * @param entities the collection of User * instances to create. * @return the created instances. Collection * @throws UserDaoException */ public Collection create(Collection entities) throws UserDaoException; /** * Does the same thing as {@link #create(User)} 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. * * @param transform * @param entities * @return the created instances. Collection * @throws UserDaoException */ @SuppressWarnings({"rawtypes"}) public Collection create(int transform, Collection entities) throws UserDaoException; /** * Creates a new User * instance from all attributes and adds it to * the persistent store. * @param name * @return the created instances. User * @throws UserDaoException */ public User create( String name) throws UserDaoException; /** * Does the same thing as {@link #create(String)} 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 * @param name * @return the created instances. Object * @throws UserDaoException */ public Object create( int transform, String name) throws UserDaoException; /** * Updates the user instance in the persistent store. * @param user * @throws UserDaoException */ public void update(User user) throws UserDaoException; /** * Updates all instances in the entities collection in the persistent store. * @param entities * @throws UserDaoException */ public void update(Collection entities) throws UserDaoException; /** * Removes the instance of User from the persistent store. * @param user * @throws UserDaoException */ public void remove(User user) throws UserDaoException; /** * Removes the instance of User having the given * identifier from the persistent store. * @param id * @throws UserDaoException */ public void remove(Long id) throws UserDaoException; /** * Removes all entities in the given entities collection. * @param entities * @throws UserDaoException */ public void remove(Collection entities) throws UserDaoException; }