/**
* 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.7;
/**
* @see org.andromda.test.7.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.
*
int parameter called transform.
*
* This specific flag denotes entities must be transformed into objects of type
* {@link org.andromda.test.7.CarDetails}.
*/
public final static int TRANSFORM_CARDETAILS = 1;
/**
* Copies the fields of the specified entity to the target value object. This method is similar to
* toCarDetails(), but it does not handle any attributes in the target
* value object that are "read-only" (as those do not have setter methods exposed).
*/
public void toCarDetails(
org.andromda.test.7.Car source,
org.andromda.test.7.CarDetails target);
/**
* Converts this DAO's entity to an object of type {@link org.andromda.test.7.CarDetails}.
*/
public org.andromda.test.7.CarDetails toCarDetails(org.andromda.test.7.Car entity);
/**
* Converts this DAO's entity to a Collection of instances of type {@link org.andromda.test.7.CarDetails}.
*/
public void toCarDetailsCollection(java.util.Collection entities);
/**
* Copies the fields of {@link org.andromda.test.7.CarDetails} to the specified entity.
* @param copyIfNull If FALSE, the value object's field will not be copied to the entity if the value is NULL. If TRUE,
* it will be copied regardless of its value.
*/
public void carDetailsToEntity(
org.andromda.test.7.CarDetails source,
org.andromda.test.7.Car target,
boolean copyIfNull);
/**
* Converts an instance of type {@link org.andromda.test.7.CarDetails} to this DAO's entity.
*/
public org.andromda.test.7.Car carDetailsToEntity(org.andromda.test.7.CarDetails carDetails);
/**
* Converts a Collection of instances of type {@link org.andromda.test.7.CarDetails} to this
* DAO's entity.
*/
public void carDetailsToEntityCollection(java.util.Collection instances);
/**
* 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 entities must be transformed into objects of type
* {@link org.andromda.test.7.CarListItem}.
*/
public final static int TRANSFORM_CARLISTITEM = 2;
/**
* Copies the fields of the specified entity to the target value object. This method is similar to
* toCarListItem(), but it does not handle any attributes in the target
* value object that are "read-only" (as those do not have setter methods exposed).
*/
public void toCarListItem(
org.andromda.test.7.Car source,
org.andromda.test.7.CarListItem target);
/**
* Converts this DAO's entity to an object of type {@link org.andromda.test.7.CarListItem}.
*/
public org.andromda.test.7.CarListItem toCarListItem(org.andromda.test.7.Car entity);
/**
* Converts this DAO's entity to a Collection of instances of type {@link org.andromda.test.7.CarListItem}.
*/
public void toCarListItemCollection(java.util.Collection entities);
/**
* Copies the fields of {@link org.andromda.test.7.CarListItem} to the specified entity.
* @param copyIfNull If FALSE, the value object's field will not be copied to the entity if the value is NULL. If TRUE,
* it will be copied regardless of its value.
*/
public void carListItemToEntity(
org.andromda.test.7.CarListItem source,
org.andromda.test.7.Car target,
boolean copyIfNull);
/**
* Converts an instance of type {@link org.andromda.test.7.CarListItem} to this DAO's entity.
*/
public org.andromda.test.7.Car carListItemToEntity(org.andromda.test.7.CarListItem carListItem);
/**
* Converts a Collection of instances of type {@link org.andromda.test.7.CarListItem} to this
* DAO's entity.
*/
public void carListItemToEntityCollection(java.util.Collection instances);
/**
* Loads an instance of org.andromda.test.7.Car from the persistent store.
*/
public org.andromda.test.7.Car 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.
*
* 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(org.andromda.test.7.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 org.andromda.test.7.Car
* 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.7.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 org.andromda.test.7.Car
* instance from all attributes and adds it to
* the persistent store.
*
* Does the same thing as {@link #create(java.lang.String, java.lang.String, org.andromda.test.7.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 org.andromda.test.7.Car
* instance from only required properties (attributes
* and association ends) and adds it to the persistent store.
*
* Does the same thing as {@link #create(java.lang.String, java.lang.String, org.andromda.test.7.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.
*/
public void update(org.andromda.test.7.Car car);
/**
* 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.7.Car from the persistent store.
*/
public void remove(org.andromda.test.7.Car car);
/**
* Removes the instance of org.andromda.test.7.Car 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);
/**
*
*/
public java.util.List findByType(org.andromda.test.7.CarType type);
/**
*
* Does the same thing as {@link #findByType(org.andromda.test.7.CarType)} with an
* additional argument called queryString. This queryString
* argument allows you to override the query string defined in {@link #findByType(org.andromda.test.7.CarType)}.
*
*/
public java.util.List findByType(String queryString, org.andromda.test.7.CarType type);
/**
*
* Does the same thing as {@link #findByType(org.andromda.test.7.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 java.util.List findByType(int transform, org.andromda.test.7.CarType type);
/**
*
* Does the same thing as {@link #findByType(boolean, org.andromda.test.7.CarType)} with an
* additional argument called queryString. This queryString
* argument allows you to override the query string defined in {@link #findByType(int, org.andromda.test.7.CarType type)}.
*
*/
public java.util.List findByType(int transform, String queryString, org.andromda.test.7.CarType type);
/**
*
* Returns true if all cars are currently rented.
*
*/
public boolean allCarsAreRented();
}