-
- Type Parameters:
T- the type of report to handle
- All Superinterfaces:
DatabaseConnectionProvider,DatabaseConnectionUser,ReportProvider<T,String>
- All Known Implementing Classes:
ReportTableByID
public interface ReportProviderByID<T extends Report> extends ReportProvider<T,String>
Interface for table classes that handle the reports of a project.- 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(String 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.Tload(String id)Loads the report from the database.booleanremove(String id)Removes the report from the database.booleanremove(String id, AbstractField field)Removes the report field from the database.booleanstore(String id, T report)Stores the report.booleanstore(String 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(String id, T report)
Stores the report. Removes a previously existing report.- Specified by:
storein interfaceReportProvider<T extends Report,String>- Parameters:
id- the id of the reportreport- the report- Returns:
- true if successfully inserted/updated
-
store
boolean store(String id, T report, boolean removeExisting, boolean merge, Field[] overwrite)
Stores the report. Either updates or inserts the fields.- Specified by:
storein interfaceReportProvider<T extends Report,String>- Parameters:
id- the 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(String id)
Loads the report from the database.- Specified by:
loadin interfaceReportProvider<T extends Report,String>- Parameters:
id- the ID of parent data container- Returns:
- the report
-
exists
boolean exists(String id)
Checks whether the report exists in the database.- Specified by:
existsin interfaceReportProvider<T extends Report,String>- Parameters:
id- the ID of parent data container- Returns:
- true if the report exists
-
remove
boolean remove(String id)
Removes the report from the database.- Specified by:
removein interfaceReportProvider<T extends Report,String>- Parameters:
id- the ID of the parent data container- Returns:
- true if successfully removed
-
remove
boolean remove(String id, AbstractField field)
Removes the report field from the database.- Parameters:
id- the ID of the parent data containerfield- the field to remove- 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:
getIDsin interfaceReportProvider<T extends Report,String>- 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:
getIDsin interfaceReportProvider<T extends Report,String>- 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:
getDBIDsin interfaceReportProvider<T extends Report,String>- Parameters:
conditions- the conditions that the conatiners must meet- Returns:
- list of database IDs
-
-