|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AbstractDatabase<P extends PrevalentObject>
A base interface that defines the public interface exposed by the database system. This interface defines the common non-transactional features supported by the system.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Method Summary | |
|---|---|
int |
count(Class cls)
Return the total number of instances of the specified type in the prevalent system. |
Collection<P> |
fetch(Class cls,
long start,
long end)
Fetch the prevalent objects in the specified range of data. |
P |
fetch(Class cls,
Object oid)
Retrieve the prevalent object of type with object id. |
Collection<P> |
fetch(Class cls,
String field,
Object object)
Fetch the prevalent object(s) of the specified cls type
which has the specified object as the value of the specified
field. |
Collection<P> |
fetchIntersection(Class cls,
Map<String,?> parameters)
Fetch the prevalent object(s) of the specified cls type
which has the specified indexed field values. |
Collection<P> |
fetchUnion(Class cls,
Map<String,?> parameters)
Fetch the prevalent object(s) of the specified cls type
which has the specified indexed field values. |
Collection<P> |
search(org.apache.lucene.search.Query query,
org.apache.lucene.search.Filter filter,
int count,
org.apache.lucene.search.Sort sort)
Execute the specified lucene query and return the collection of matching prevalent objects. |
| Method Detail |
|---|
int count(Class cls)
throws PrevalentException
cls - The type of the prevalent object whose count is desired.
PrevalentException - If errors are encountered while interacting
with the prevalent system.
P fetch(Class cls,
Object oid)
throws PrevalentException
cls - The type of the prevalent object.oid - The object id for the prevalent object to retrieve.
null if no
such object is stored in the prevalent system.
PrevalentException - If errors are encountered while reconstituting
the prevalent object.
Collection<P> fetch(Class cls,
long start,
long end)
throws PrevalentException
cls - The type of prevalent object to retrive.start - The starting index (inclusive) from which to fetch the
prevalent objects.end - The ending index (exclusive) to which to fetch the
prevalent objects.
PrevalentException - If errors are encountered while fetching the
objects.PrimaryStorage.get( long, long )
Collection<P> fetch(Class cls,
String field,
Object object)
throws PrevalentException
cls type
which has the specified object as the value of the specified
field.
Note: Only indexed fields are searched. If the specified field is not indexed, this method returns an empty collection.
cls - The type of prevalent object to query for.field - The name of the field in the prevalent object using which
the results are to be queried.object - The value of the field.
PrevalentException - If errors are encountered while reconstituting
the prevalent objects being returned.
Collection<P> fetchUnion(Class cls,
Map<String,?> parameters)
throws PrevalentException
cls type
which has the specified indexed field values. The results
contain a union of the matching objects.
Note: Only indexed fields are searched. If the specified field(s) are not indexed, this method ignores those field(s).
cls - The type of prevalent object to query for.parameters - The map of parameters to use to filter the
prevalent instances.
PrevalentException - If errors are encountered while reconstituting
the prevalent objects being returned.fetch( Class, String, Object )
Collection<P> fetchIntersection(Class cls,
Map<String,?> parameters)
throws PrevalentException
cls type
which has the specified indexed field values. The results
contain an intersection of the matching objects.
Note: Only indexed fields are searched. If the specified field(s) are not indexed, this method ignores those field(s).
cls - The type of prevalent object to query for.parameters - The map of parameters to use to filter the
prevalent instances.
PrevalentException - If errors are encountered while reconstituting
the prevalent objects being returned.fetch( Class, String, Object )
Collection<P> search(org.apache.lucene.search.Query query,
org.apache.lucene.search.Filter filter,
int count,
org.apache.lucene.search.Sort sort)
throws PrevalentException
Notes:
class
Field
which contains the fully qualified class name of the prevalent object.
query - The lucene query that is to be executed to find matching
prevalent object instances.filter - The filter to apply to restrict the query results.count - The maximum number to top hits for the search to return.sort - The sort criteria to use for the results.
PrevalentException - If errors are encountered while reconstituting
the prevalent objects being returned.
|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||