org.perfectjpattern.jee.api.integration.dao
Interface IGenericReadOnlyDao<Id,Element>
- Type Parameters:
Id
- Identification typeElement
- Element type
- All Superinterfaces:
- IBaseReadOnlyDao<Id,Element>
- All Known Subinterfaces:
- ICustomerDao, IGenericDao<Id,Element>, IMovieGenericDao
- All Known Implementing Classes:
- AbstractHibernateManagedGenericDao, HibernateGenericDao, MovieGenericDao, SpringGenericDao
public interface IGenericReadOnlyDao<Id,Element>
- extends IBaseReadOnlyDao<Id,Element>
Data Access Object (DAO) Pattern: Abstracts from any direct type of
database or persistence mechanism. Provides specific operations without
exposing details of the database.
Responsibility : Partial Data Access Object abstraction
providing Read-Only features:
- Find an Element by ID
- Find all Elements of a given type in the persistent storage
- Find all Elements in the persistent storage matching a given Example
- Ask if it contains a given Element
- Ask for the total number of records
- Version:
- $Revision: 1.0 $ $Date: Nov 26, 2007 8:23:22 PM $
- Author:
- Giovanni Azua
- See Also:
- Data Access
Object wiki definition,
Don't repeat the DAO!
-
-
findByExample
List<Element> findByExample(Element anElement,
String... anExcludeProperties)
throws DaoException,
IllegalArgumentException
- Returns the List of Elements that match the search criteria specified
through the Example. Searches all Elements that match the properties set
in the Example Element.
- Parameters:
anElement
- Example Element to search for.anExcludeProperties
- Array of Java Bean property names to exclude
- Returns:
- List of Elements that match the search criteria specified
through all properties set in the Example.
- Throws:
DaoException
IllegalArgumentException
- 'anId' must not be null
IllegalArgumentException
- 'anExcludeProperties' must not be null
Copyright © 2007-2009. All Rights Reserved.