Interface QueryDao
- All Known Implementing Classes:
JcrQueryDao
public interface QueryDao
Provider for connections and queries.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a query.Add a query and set its id.deleteQuery
(String siteName, String id) Deletes a query.getDataSourceQueries
(String siteName, String dataSourceId) Get all the queries of a site.getDataSourceQueries
(String siteName, String dataSourceId, DataSourceClientInteraction.DataSourceType dataSourceType, Query.ResultType resultType) Get all the queries of a site of a specific result typegetDataSourceQueries
(String siteName, String dataSourceId, Query.ResultType resultType) Get all the queries of a site of a specific result typegetQueries
(String siteName) Get all the queries of a site.getQueries
(String siteName, DataSourceClientInteraction.DataSourceType type) Get all the queries of a site.Get a query from its id.getQueryProperties
(String id, String siteName) Get the query properties.void
removeQuery
(String siteName, String id) Remove a query.updateQuery
(String siteName, Map<String, Object> parameters) Updates a query.void
updateQuery
(String siteName, Query query) Update a query.
-
Field Details
-
ROLE
The avalon role name.
-
-
Method Details
-
getQueries
Get all the queries of a site.- Parameters:
siteName
- the site name.- Returns:
- the queries as a Map.
- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
getQueries
Map<String,Query> getQueries(String siteName, DataSourceClientInteraction.DataSourceType type) throws DataInclusionException Get all the queries of a site.- Parameters:
siteName
- the site name.type
- the query type- Returns:
- the queries as a Map.
- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
getDataSourceQueries
Map<String,Query> getDataSourceQueries(String siteName, String dataSourceId) throws DataInclusionException Get all the queries of a site.- Parameters:
siteName
- the site name.dataSourceId
- the id of the data source- Returns:
- the queries as a Map.
- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
getDataSourceQueries
Map<String,Query> getDataSourceQueries(String siteName, String dataSourceId, Query.ResultType resultType) throws DataInclusionException Get all the queries of a site of a specific result type- Parameters:
siteName
- the site name.dataSourceId
- the id of the data sourceresultType
- Filter on result type- Returns:
- the queries as a Map.
- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
getDataSourceQueries
Map<String,Query> getDataSourceQueries(String siteName, String dataSourceId, DataSourceClientInteraction.DataSourceType dataSourceType, Query.ResultType resultType) throws DataInclusionException Get all the queries of a site of a specific result type- Parameters:
siteName
- the site name.dataSourceId
- the id of the data sourcedataSourceType
- the query typeresultType
- Filter on result type- Returns:
- the queries as a Map.
- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
getQuery
Get a query from its id.- Parameters:
siteName
- the site name.id
- the query id.- Returns:
- the Query.
- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
getQueryProperties
Get the query properties.- Parameters:
id
- The query idsiteName
- The site name- Returns:
- The properties of the query in a result map.
- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
addQuery
Adds a query.- Parameters:
siteName
- The site nameparameters
- The params needed to create the query- Returns:
- The id of the created query,its parent id and its type, or an error
- Throws:
Exception
- if an error occurs when adding the query
-
updateQuery
Updates a query.- Parameters:
siteName
- The site nameparameters
- The params needed to update the query- Returns:
- The id of the updated query and its type, or an error
- Throws:
Exception
- if an error occurs when updating the query
-
deleteQuery
Deletes a query.- Parameters:
siteName
- the site nameid
- The id of the query to delete- Returns:
- The id of the deleted query, or an error
- Throws:
Exception
- if an error occurs when deleting the query
-
addQuery
Add a query and set its id.- Parameters:
siteName
- the site namequery
- the query to add. The id member doesn't need to be specified.- Returns:
- id of the newly created data source.
- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
updateQuery
Update a query. Update the query specified by its id member with all the data.- Parameters:
siteName
- the site namequery
- the query to update.- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-
removeQuery
Remove a query.- Parameters:
siteName
- the site nameid
- the query id.- Throws:
DataInclusionException
- if an error occurs while manipulating the data sources
-