// 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:08. // package org.andromda.test.howto1.d; import java.util.Collection; /** * @see Car */ public interface CarDao { /** * 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 Car from the persistent store. * @param serial String identifier part of the composite PK of the entity to load. * @return Car * @throws CarDaoException */ public Car load(String serial) throws CarDaoException; /** * Does the same thing as {@link #load(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 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 serial String identifier part of the composite PK of the entity to load. * @return either the entity or the object transformed from the entity. * @throws CarDaoException */ public Object load(int transform, String serial) throws CarDaoException; /** * Loads all entities of type {@link Car}. * * @return the loaded entities. * @throws CarDaoException */ public Collection loadAll() throws CarDaoException; /** * 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 CarDaoException */ @SuppressWarnings("rawtypes") public Collection loadAll(final int transform) throws CarDaoException; /** * Creates an instance of Car and adds it to the persistent store. * @param car * @return Car * @throws CarDaoException */ public Car create(Car car) throws CarDaoException; /** * Does the same thing as {@link #create(Car)} 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 car * @return Object * @throws CarDaoException */ public Object create(int transform, Car car) throws CarDaoException; /** * Creates a new instance of Car and adds * from the passed in entities collection * * @param entities the collection of Car * instances to create. * @return the created instances. Collection * @throws CarDaoException */ public Collection create(Collection entities) throws CarDaoException; /** * Does the same thing as {@link #create(Car)} 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 CarDaoException */ @SuppressWarnings({"rawtypes"}) public Collection create(int transform, Collection entities) throws CarDaoException; /** * Creates a new Car * instance from all attributes and adds it to * the persistent store. * @param name * @param type * @return the created instances. Car * @throws CarDaoException */ public Car create( String name, String type) throws CarDaoException; /** * Does the same thing as {@link #create(String, 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 * @param type * @return the created instances. Object * @throws CarDaoException */ public Object create( int transform, String name, String type) throws CarDaoException; /** * Updates the car instance in the persistent store. * @param car * @throws CarDaoException */ public void update(Car car) throws CarDaoException; /** * Updates all instances in the entities collection in the persistent store. * @param entities * @throws CarDaoException */ public void update(Collection entities) throws CarDaoException; /** * Removes the instance of Car from the persistent store. * @param car * @throws CarDaoException */ public void remove(Car car) throws CarDaoException; /** * Removes the instance of Car having the given * identifier from the persistent store. * @param serial * @throws CarDaoException */ public void remove(String serial) throws CarDaoException; /** * Removes all entities in the given entities collection. * @param entities * @throws CarDaoException */ public void remove(Collection entities) throws CarDaoException; }