public class MEXPersistenceQueryResults
extends java.lang.Object
implements de.ipcon.db.core.QueryResultsI
QueryResultsI implementation that supports MEX transformation before execution.
This class acts as a decorator and orchestrator. It uses a MEXTransformer to
parse the query string for custom expressions (like @union, @fulltext,
or @prefetch). These expressions are evaluated into standard OQL/SQL or registered
as side-effect metadata (e.g. adding to the prefetch path list).
If a transformation results in multiple discrete queries (e.g. via a Union evaluator), this class iterates through them sequentially, providing a seamless unified iterator interface to the caller.
| Constructor and Description |
|---|
MEXPersistenceQueryResults(CastorPersistenceHandler _ph,
java.lang.String _query,
java.lang.Object[] _parms,
FulltextSearcherI _fts)
Constructs the results object and executes the MEX transformation pipeline.
|
MEXPersistenceQueryResults(CastorPersistenceHandler _ph,
java.lang.String _query,
java.lang.Object[] _parms,
FulltextSearcherI _fts,
short _mode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPrefetchPath(java.lang.String path)
Registers a relation path for eager loading.
|
void |
addUnionQuery(QueryHandlerI qh)
Appends a query to the internal execution sequence.
|
void |
assureNotClosed() |
void |
cancel()
Terminates the current query and prevents any further iteration by
jumping the index to the end of the query list.
|
void |
close() |
java.lang.String |
currentTag() |
short |
getMode() |
java.lang.Object[] |
getParms() |
CastorPersistenceHandler |
getPersistenceHandler() |
java.lang.String[] |
getPrefetchPaths() |
boolean |
hasNext()
Coordinates the transition between multiple underlying query iterators.
|
boolean |
isClosed() |
java.lang.Object |
next() |
void |
remove() |
public MEXPersistenceQueryResults(CastorPersistenceHandler _ph, java.lang.String _query, java.lang.Object[] _parms, FulltextSearcherI _fts)
_ph - The persistence handler. Must be open._query - The raw query string containing potential MEX expressions._parms - The positional parameters for the query._fts - The full-text search engine instance for @fulltext evaluation._mode - The lock mode to apply to all resulting queries.MEXUnavailableException - if a MEX expression is recognized but cannot be resolved.public MEXPersistenceQueryResults(CastorPersistenceHandler _ph, java.lang.String _query, java.lang.Object[] _parms, FulltextSearcherI _fts, short _mode)
public CastorPersistenceHandler getPersistenceHandler()
public java.lang.Object[] getParms()
public short getMode()
public void addUnionQuery(QueryHandlerI qh)
UnionEvaluator during the transformation phase.public void addPrefetchPath(java.lang.String path)
PrefetchEvaluator during transformation.public java.lang.String[] getPrefetchPaths()
public void assureNotClosed()
public void close()
close in interface de.ipcon.db.core.QueryResultsIclose in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic boolean isClosed()
isClosed in interface de.ipcon.db.core.QueryResultsIpublic boolean hasNext()
When the currentQI is exhausted, this method automatically closes it,
advances to the next QueryHandlerI in the list, and initializes
a new iterator. This process continues until all queries are exhausted.
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorpublic void remove()
remove in interface java.util.Iteratorpublic java.lang.String currentTag()
currentTag in interface de.ipcon.db.core.QueryResultsIpublic void cancel()
cancel in interface de.ipcon.db.core.QueryResultsICopyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.