Package adams.db

Interface ReportProviderByID<T extends Report>

    • Method Detail

      • store

        boolean store​(String id,
                      T report)
        Stores the report. Removes a previously existing report.
        Specified by:
        store in interface ReportProvider<T extends Report,​String>
        Parameters:
        id - the id of the report
        report - 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:
        store in interface ReportProvider<T extends Report,​String>
        Parameters:
        id - the id of the report
        report - the report
        removeExisting - whether to remove existing an already existing report before storing it (has precedence over "merge")
        merge - whether to merge the existing and the current
        overwrite - 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:
        load in interface ReportProvider<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:
        exists in interface ReportProvider<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:
        remove in interface ReportProvider<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 container
        field - 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:
        getIDs in interface ReportProvider<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:
        getIDs in interface ReportProvider<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:
        getDBIDs in interface ReportProvider<T extends Report,​String>
        Parameters:
        conditions - the conditions that the conatiners must meet
        Returns:
        list of database IDs