Interface ScaleDao


  • public interface ScaleDao
    Provides an interface with methods that perform actions on the Scale table of the database.
    • Method Detail

      • insert

        Single<Long> insert​(Scale scale)
        Inserts a single scale into the database.
        Parameters:
        scale - The scale to be inserted.
        Returns:
        A Single holding the id of the scale that was inserted.
      • insert

        Single<List<Long>> insert​(Scale... scales)
        Inserts multiple scales into the database.
        Parameters:
        scales - The scales to be inserted.
        Returns:
        A Single holding List of ids of scales that were inserted.
      • insert

        Single<List<Long>> insert​(Collection<Scale> scales)
        Inserts multiple scales into the database.
        Parameters:
        scales - The scales to be inserted.
        Returns:
        A Single holding List of ids of scales that were inserted.
      • update

        Single<Integer> update​(Scale scale)
        Updates a single scale in the database.
        Parameters:
        scale - The scale to be updated.
        Returns:
        A Single holding the number of updates performed.
      • update

        Single<Integer> update​(Scale... scales)
        Updates multiple scales in the database.
        Parameters:
        scales - The scales to be updated.
        Returns:
        A Single holding the number of updates performed.
      • update

        Single<Integer> update​(Collection<Scale> scales)
        Updates multiple scales in the database.
        Parameters:
        scales - The scales to be updated.
        Returns:
        A Single holding the number of updates performed.
      • delete

        Single<Integer> delete​(Scale scale)
        Deletes a single scale from the database.
        Parameters:
        scale - The scale to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • delete

        Single<Integer> delete​(Scale... scales)
        Deletes multiple scales from the database.
        Parameters:
        scales - The scales to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • delete

        Single<Integer> delete​(Collection<Scale> scales)
        Deletes multiple scales from the database.
        Parameters:
        scales - The scales to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • select

        LiveData<Scale> select​(long id)
        Queries the database for a specific scale, based on id.
        Parameters:
        id - The scale's id.
        Returns:
        LiveData of the selected scale.
      • selectAll

        LiveData<List<Scale>> selectAll()
        Queries the database for all scales.
        Returns:
        LiveData of a List of scales.
      • selectAllOrderByDifficulty

        LiveData<List<Scale>> selectAllOrderByDifficulty()
        Queries the database for all scales, ordering based on difficulty.
        Returns:
        LiveData of a List of scales.
      • selectWithScaleName

        LiveData<Scale> selectWithScaleName​(Mode mode,
                                            Note tonic)
        Queries the database for a specific scale, based on tonic and mode.
        Parameters:
        mode - The scale's mode.
        tonic - The scale's tonic.
        Returns:
        LiveData of the selected scale.
      • selectWithTonic

        LiveData<List<Scale>> selectWithTonic​(Note tonic)
        Queries the database for specific scales, based on tonic.
        Parameters:
        tonic - The tonic of the scales.
        Returns:
        LiveData of a List of scales.
      • selectWithMode

        LiveData<List<Scale>> selectWithMode​(Mode mode)
        Queries the database for specific scales, based on mode.
        Parameters:
        mode - The mode of the scales.
        Returns:
        LiveData of a List of scales.