Package ca.phon.query.db
Interface ResultSetManager
- All Known Implementing Classes:
XMLResultSetManager
public interface ResultSetManager
An interface used for anything that manages the retrieval and storage of
queries and result sets from a project.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteQuery
(Project project, Query query) Delete the given query from the specified project.void
deleteResultSet
(Project project, Query query, ResultSet resultset) Delete the specified result set from the given project and query.getQueries
(Project project) Gets a list of queries for a specified project.getResultSetsForQuery
(Project project, Query query) Gets a list of result sets for a specified query and project.Loads a given query from the specified project.loadResultSet
(Project project, Query query, String sessionName) Loads a given result set for a query from the specified project.void
renameQuery
(Project project, Query query, String newName) Re-name the specified query.void
Saves a query in the specified project.void
saveResultSet
(Project project, Query query, ResultSet resultSet) Saves a query's result set in the specified project.
-
Method Details
-
getQueries
Gets a list of queries for a specified project.- Parameters:
project
- the project- Returns:
- a list of queries for the given project
-
getResultSetsForQuery
Gets a list of result sets for a specified query and project.- Parameters:
project
- the projectquery
- the query- Returns:
- the list of result sets for a given query of the given project
-
saveQuery
Saves a query in the specified project.- Parameters:
project
- the projectquery
- the query- Throws:
IOException
- if the query could not be saved
-
loadQuery
Loads a given query from the specified project.- Parameters:
project
- the projectqueryName
- the query name- Returns:
- the query, if successfully loaded
- Throws:
IOException
- if the query could not be loaded
-
saveResultSet
Saves a query's result set in the specified project.- Parameters:
project
- the projectquery
- the queryresultSet
- the result set- Throws:
IOException
- if the result set could not be saved
-
loadResultSet
Loads a given result set for a query from the specified project.- Parameters:
project
- the projectquery
- the querysessionName
- the session name- Returns:
- the result set, if successfully loaded
- Throws:
IOException
- if the result set could not be loaded
-
deleteQuery
Delete the given query from the specified project. This will also delete all associated result sets.- Parameters:
project
-query
-- Throws:
IOException
- if the query is not found or could not be removed from the storage device.
-
deleteResultSet
Delete the specified result set from the given project and query.- Parameters:
project
-query
-resultset
-- Throws:
IOException
- if the resultset/query is not found or could not be removed from the storage device.
-
renameQuery
Re-name the specified query. query.setName() should not be called before using the method!- Parameters:
project
-query
-newName
-- Throws:
IOException
- if the query folder could not be re-named.
-