|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CompassSession
The main interface between a Java application and Compass.
Provides the basic operations with semantic mapped objects (save, delete, and load/get). The session provides operations on both the objects levels and Resource levels (indexed object model). The CompassSession operations are delegated to the underlying SearchEngine, so no direct access to the SearchEngine is needed.
Implementations will not be thread safe, Instead each thread/transaction should obtain its own instance from a Compass.
If the CompassSession throws an exception, the transaction must be rolled back and the session discarded. The internal state of the CompassSession might not be consistent with the search engine if discarded.
Please see the CompassTemplate class for easier programmatic control using the template design pattern.
Resource,
Compass| Method Summary | |
|---|---|
CompassAnalyzerHelper |
analyzerHelper()
Returns an Analyzer helper. |
CompassTransaction |
beginTransaction()
Begin a unit of work and return the associated CompassTranscation object. |
CompassTransaction |
beginTransaction(CompassTransaction.TransactionIsolation transactionIsolation)
Begin a unit of work and return the associated CompassTranscation object. |
void |
close()
Closes the CompassSession. |
CompassSettings |
getSettings()
Runtimes settings that apply on the session level. |
CompassQueryBuilder |
queryBuilder()
Creats a new query builder, used to build queries programmatically. |
CompassQueryFilterBuilder |
queryFilterBuilder()
Creats a new query filter builder, used to build filters of queries programmatically. |
CompassTermFreqsBuilder |
termFreqsBuilder(String[] names)
Creates a new terms frequencies builder used to get terms names and freqs for a list of property names. |
| Methods inherited from interface org.compass.core.CompassOperations |
|---|
create, create, createProperty, createProperty, createProperty, createProperty, createProperty, createResource, delete, delete, delete, delete, delete, evict, evict, evict, evictAll, find, get, get, getResource, getResource, load, load, loadResource, loadResource, save, save |
| Method Detail |
|---|
CompassSettings getSettings()
RuntimeCompassEnvironment,
RuntimeLuceneEnvironment
CompassTransaction beginTransaction()
throws CompassException
compass.transaction.factory.
CompassExceptionCompassTransaction
CompassTransaction beginTransaction(CompassTransaction.TransactionIsolation transactionIsolation)
throws CompassException
compass.transaction.factory.
Also accepts the transcation isolation of the transaction.
transactionIsolation -
CompassExceptionCompassTransaction
CompassQueryBuilder queryBuilder()
throws CompassException
CompassException
CompassQueryFilterBuilder queryFilterBuilder()
throws CompassException
CompassException
CompassTermFreqsBuilder termFreqsBuilder(String[] names)
throws CompassException
names - The property names
CompassException
CompassAnalyzerHelper analyzerHelper()
throws CompassException
CompassException
void close()
throws CompassException
CompassException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||