// license-header java merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by: SessionDaoLocal.vsl in andromda-ejb3-cartridge.
//
package org.andromda.howto2.rental;
import java.util.Collection;
import java.util.List;
/**
* @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
.
*
* 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.
*
* 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.
*
* 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.
*
entities
collection
*
* @param entities the collection of Car
* instances to create.
*
* @return the created instances.
* @throws CarDaoException
*/
public Collection
* 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.
*
* Creates a new Car
* instance from all attributes and adds it to
* the persistent store.
*
* Does the same thing as {@link #create(String, String, CarType)} 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.
*
* Creates a new Car
* instance from only required properties (attributes
* and association ends) and adds it to the persistent store.
*
* Does the same thing as {@link #create(String, String, CarType)} with an
* additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
* the returned entity will NOTWILL BE passed through an operation which can optionally
* transform the entity (into a value object for example). By default, transformation does
* not occur.
*
car
instance in the persistent store.
* @throws CarDaoException
*/
public void update(Car car)
throws CarDaoException;
/**
* Updates all instances in the entities
collection in the persistent store.
* @throws CarDaoException
*/
public void update(Collectionidentifier
from the persistent store.
* @throws CarDaoException
*/
public void remove(Long id)
throws CarDaoException;
/**
* Removes all entities in the given entities collection.
* @throws CarDaoException
*/
public void remove(Collection entities)
throws CarDaoException;
/**
*
*/
public List findByType(CarType type)
throws CarDaoException;
/**
*
* Does the same thing as {@link #findByType(CarType)} with an
* additional argument called queryString
. This queryString
* argument allows you to override the query string defined in {@link #findByType(CarType)}.
*
*/
public List findByType(String queryString, CarType type)
throws CarDaoException;
/**
*
* Does the same thing as {@link #findByType(CarType)} 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 finder results WILL BE passed through an operation which can optionally
* transform the entities (into value objects for example). By default, transformation does
* not occur.
*
*/
public List findByType(int transform, CarType type)
throws CarDaoException;
/**
*
* Does the same thing as {@link #findByType(boolean, CarType)} with an
* additional argument called queryString
. This queryString
* argument allows you to override the query string defined in {@link #findByType(int, CarType type)}.
*
*/
public List findByType(int transform, String queryString, CarType type)
throws CarDaoException;
/**
*
*/
public boolean allCarsAreRented();
}