-
- Type Parameters:
T- the type of report to handleI- the type of ID to handle
- All Superinterfaces:
DatabaseConnectionProvider,DatabaseConnectionUser
- All Known Subinterfaces:
ReportProviderByDBID<T>,ReportProviderByID<T>
- All Known Implementing Classes:
ReportTableByDBID,ReportTableByID
public interface ReportProvider<T extends Report,I> extends DatabaseConnectionProvider
Interface for table classes that handle the reports of a project.- Version:
- $Revision: 4584 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
AbstractIndexedTable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists(I parent_id)Checks whether the report exists in the database.List<Integer>getDBIDs(AbstractConditions conditions)Return a list of database IDs of data containers that match the defined conditions.List<String>getIDs(AbstractConditions conditions)Return a list of IDs of data containers that match the defined conditions.List<String>getIDs(String[] columns, AbstractConditions conditions)Return a list of columns of data containers that match the defined conditions.Tload(I parent_id)Loads the report from the database.booleanremove(I parent_id)Removes the report from the database.booleanstore(I parent_id, T report)Stores the report.booleanstore(I parent_id, T report, boolean removeExisting, boolean merge, Field[] overwrite)Stores the report.-
Methods inherited from interface adams.db.DatabaseConnectionProvider
getDatabaseConnection
-
-
-
-
Method Detail
-
store
boolean store(I parent_id, T report)
Stores the report. Removes a previously existing report.- Parameters:
parent_id- the parent_id of the reportreport- the report- Returns:
- true if successfully inserted/updated
-
store
boolean store(I parent_id, T report, boolean removeExisting, boolean merge, Field[] overwrite)
Stores the report. Either updates or inserts the fields.- Parameters:
parent_id- the parent_id of the reportreport- the reportremoveExisting- whether to remove existing an already existing report before storing it (has precedence over "merge")merge- whether to merge the existing and the currentoverwrite- fields to overwrite if in "merge" mode- Returns:
- true if successfully inserted/updated
-
load
T load(I parent_id)
Loads the report from the database.- Parameters:
parent_id- the ID of parent data container- Returns:
- the report
-
exists
boolean exists(I parent_id)
Checks whether the report exists in the database.- Parameters:
parent_id- the ID of parent data container- Returns:
- true if the report exists
-
remove
boolean remove(I parent_id)
Removes the report from the database.- Parameters:
parent_id- the ID of the parent data container- Returns:
- true if successfully removed
-
getIDs
List<String> getIDs(AbstractConditions conditions)
Return a list of IDs of data containers that match the defined conditions.- Parameters:
conditions- the conditions that the conatiners must meet- Returns:
- list of container IDs
-
getIDs
List<String> getIDs(String[] columns, AbstractConditions conditions)
Return a list of columns of data containers that match the defined conditions.- Parameters:
columns- the columns to retrieve.conditions- the conditions that the containers must meet- Returns:
- list of columns (tab-separated)
-
getDBIDs
List<Integer> getDBIDs(AbstractConditions conditions)
Return a list of database IDs of data containers that match the defined conditions.- Parameters:
conditions- the conditions that the conatiners must meet- Returns:
- list of database IDs
-
-