-
- Type Parameters:
T
- the type of report to handle
- All Superinterfaces:
DatabaseConnectionProvider
,DatabaseConnectionUser
,ReportProvider<T,Integer>
- All Known Implementing Classes:
ReportTableByDBID
public interface ReportProviderByDBID<T extends Report> extends ReportProvider<T,Integer>
Interface for table classes that handle the reports of a project.- Version:
- $Revision$
- 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 boolean
exists(Integer 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 (Vector) of IDs of data containers that match the defined conditions.List<String>
getIDs(String[] columns, AbstractConditions conditions)
Return a list (Vector) of columns of data containers that match the defined conditions.T
load(Integer parent_id)
Loads the report from the database.boolean
remove(Integer parent_id)
Removes the report from the database.boolean
store(Integer parent_id, T report)
Stores the report.boolean
store(Integer 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(Integer parent_id, T report)
Stores the report. Removes a previously existing report.- Specified by:
store
in interfaceReportProvider<T extends Report,Integer>
- Parameters:
parent_id
- the parent_id of the reportreport
- the report- Returns:
- true if successfully inserted/updated
-
store
boolean store(Integer parent_id, T report, boolean removeExisting, boolean merge, Field[] overwrite)
Stores the report. Either updates or inserts the fields.- Specified by:
store
in interfaceReportProvider<T extends Report,Integer>
- 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(Integer parent_id)
Loads the report from the database.- Specified by:
load
in interfaceReportProvider<T extends Report,Integer>
- Parameters:
parent_id
- the ID of parent data container- Returns:
- the report
-
exists
boolean exists(Integer parent_id)
Checks whether the report exists in the database.- Specified by:
exists
in interfaceReportProvider<T extends Report,Integer>
- Parameters:
parent_id
- the ID of parent data container- Returns:
- true if the report exists
-
remove
boolean remove(Integer parent_id)
Removes the report from the database.- Specified by:
remove
in interfaceReportProvider<T extends Report,Integer>
- Parameters:
parent_id
- the ID of the parent data container- Returns:
- true if successfully removed
-
getIDs
List<String> getIDs(AbstractConditions conditions)
Return a list (Vector) of IDs of data containers that match the defined conditions.- Specified by:
getIDs
in interfaceReportProvider<T extends Report,Integer>
- 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 (Vector) of columns of data containers that match the defined conditions.- Specified by:
getIDs
in interfaceReportProvider<T extends Report,Integer>
- 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.- Specified by:
getDBIDs
in interfaceReportProvider<T extends Report,Integer>
- Parameters:
conditions
- the conditions that the conatiners must meet- Returns:
- list of database IDs
-
-