org.fcrepo.server.search
Class FieldSearchResultSQLImpl
java.lang.Object
org.fcrepo.server.search.FieldSearchResultSQLImpl
- All Implemented Interfaces:
- FieldSearchResult
public class FieldSearchResultSQLImpl
- extends Object
- implements FieldSearchResult
A FieldSearchResults object returned as the result of a FieldSearchSQLImpl
search.
A FieldSearchResultSQLImpl is intended to be re-used in cases where the
results of a query require more than one call to the server.
- Author:
- Chris Wilper
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FieldSearchResultSQLImpl
protected FieldSearchResultSQLImpl(ConnectionPool cPool,
RepositoryReader repoReader,
String[] resultFields,
int maxResults,
int maxSeconds,
FieldSearchQuery query)
throws SQLException,
QueryParseException
- Construct a FieldSearchResultSQLImpl object.
Upon construction, a connection is obtained from the connectionPool, and
the query is executed. (The connection will be returned to the pool only
after the last result has been obtained from the ResultSet, the session
is expired, or some non-recoverable error has occurred)
Once the ResultSet is obtained, one result is requested of it (and
remembered for use in step()); then the call returns.
- Parameters:
cPool - the connectionPoolrepoReader - the provider of object field information for resultsresultFields - which fields should be returned in resultsmaxResults - how many results should be returned at one time. This should be
the smaller of a) the FieldSearchImpl's limit [the server limit]
and b) the requested limit [the client limit]query - the end-user query
- Throws:
SQLException
QueryParseException
isExpired
protected boolean isExpired()
step
protected void step()
throws UnrecognizedFieldException,
ObjectIntegrityException,
RepositoryConfigurationException,
StreamIOException,
ServerException
- Update object with the next chunk of results. if getToken() is null after
this call, the resultSet was exhausted.
- Throws:
UnrecognizedFieldException
ObjectIntegrityException
RepositoryConfigurationException
StreamIOException
ServerException
objectFieldsList
public List objectFieldsList()
- Specified by:
objectFieldsList in interface FieldSearchResult
getToken
public String getToken()
- Specified by:
getToken in interface FieldSearchResult
getCursor
public long getCursor()
- Specified by:
getCursor in interface FieldSearchResult
getCompleteListSize
public long getCompleteListSize()
- Specified by:
getCompleteListSize in interface FieldSearchResult
getExpirationDate
public Date getExpirationDate()
- Specified by:
getExpirationDate in interface FieldSearchResult
Copyright © 2012 DuraSpace. All Rights Reserved.