public class SavedQueryDao extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SavedQueryDao.Dialect
The interface Dialect.
|
static class |
SavedQueryDao.HSQLDialect
HSQL dialect for saved query (Used with testing).
|
static class |
SavedQueryDao.MySQLDialect
MySQL dialect for saved query.
|
static class |
SavedQueryDao.SavedQueryResultSetHandler
Result set handler class to get a saved query from result set
|
static class |
SavedQueryDao.SingleValuedResultHandler
Result set handler class to get a the last inserted ID from the resultset
|
| Modifier and Type | Method and Description |
|---|---|
void |
createSavedQueryTableIfNotExists()
Creates the saved query table
|
void |
deleteSavedQueryByID(long id)
Deletes the saved query with the given id
|
ListResponse |
getList(javax.ws.rs.core.MultivaluedMap<String,String> criteria,
long start,
long count)
Returns a list of saved queries
|
SavedQuery |
getSavedQueryByID(long id)
Gets saved query with the given id
|
long |
saveQuery(SavedQuery savedQuery)
Saves the query passed
|
void |
updateQuery(long id,
SavedQuery savedQuery)
Updates the saved query id with new payload
|
public void createSavedQueryTableIfNotExists()
throws LensException
LensException - cannot create saved query tablepublic long saveQuery(SavedQuery savedQuery) throws LensException
savedQuery - LensExceptionpublic void updateQuery(long id,
SavedQuery savedQuery)
throws LensException
id - savedQuery - LensExceptionpublic SavedQuery getSavedQueryByID(long id) throws LensException
id - LensExceptionpublic ListResponse getList(javax.ws.rs.core.MultivaluedMap<String,String> criteria, long start, long count) throws LensException
criteria - a multivalued map that has the filter criteriastart - Displacement from the start of the search resultcount - Count of number of records requiredLensExceptionpublic void deleteSavedQueryByID(long id)
throws LensException
id - LensExceptionCopyright © 2014–2018 Apache Software Foundation. All rights reserved.