com.sptci.prevayler.query
Class AbstractQuery<T,S extends PrevalentSystem>
java.lang.Object
com.sptci.prevayler.query.AbstractQuery<T,S>
- All Implemented Interfaces:
- Query
- Direct Known Subclasses:
- Count, Fetch, FetchByIndex, FetchByIndices, FetchRange, Search
public abstract class AbstractQuery<T,S extends PrevalentSystem>
- extends Object
- implements Query
A base class for all simple queries against the prevalent system.
© Copyright 2008 Sans Pareil
Technologies, Inc.
- Version:
- $Id: AbstractQuery.java 22 2008-11-24 19:04:25Z sptrakesh $
- Author:
- Rakesh Vidyadharan 2008-05-27
|
Method Summary |
Object |
query(Object prevalentSystem,
Date executionTime)
Implementation of the interface method. |
protected abstract T |
query(S system,
Date timestamp)
Execute the query on the prevalent system and return the results. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractQuery
public AbstractQuery()
query
public Object query(Object prevalentSystem,
Date executionTime)
throws Exception
- Implementation of the interface method. Properly type-casts the
object parameter to a
PrevalentSystem and hands over to
query( PrevalentSystem, Date ).
- Specified by:
query in interface Query
- Parameters:
prevalentSystem - The prevalent system against which the query
is to be performed.executionTime - The timestamp for the query.
- Returns:
- The result of executing the query.
- Throws:
Exception - If errors are encountered while executing the query.
query
protected abstract T query(S system,
Date timestamp)
throws Exception
- Execute the query on the prevalent system and return the results.
- Parameters:
system - The prevalent system that is to be acted upon.timestamp - The timestamp for the query.
- Returns:
- The results of the query.
- Throws:
Exception - If errors are encountered while executing the query.