Skip to content

Data Access Layer

Mikheil Kenchoshvili edited this page Apr 7, 2016 · 16 revisions

Interface to access database objects from controllers without any special knowledge of actual back-end specifics.

    /**
     * Save (update if exists) given object.
     * Even if connection fails, save it next time network is available.
     */
    void save(@NonNull T c);

    /**
     * Save (update if exists) given object.
     * Call statusCallback with status of the operation and/or error reason
     */
    void save(@NonNull T c, @NonNull Callback<Boolean> statusCallback);

    /**
     * Delete given object.
     * Even if connection fails, delete it next time network is available.
     */
    void delete(@NonNull T c);

    /**
     * Delete given object.
     * Call statusCallback with status of the operation and/or error reason
     */
    void delete(@NonNull T c, @NonNull Callback<Boolean> statusCallback);

    /**
     * Fetch objects satisfying given query
     * Call resultCallback with result of the operation and/or error reason
     */
    void fetch(@NonNull Query query, @NonNull Callback<Collection<T>> resultCallback);

Callback

public interface Callback<T> {
    void call(@NonNull T result, @Nullable Exception e);
}

Content

(Class/Interface) that holds information about single content object and has methods to represent it in different formats (e.g. to draw)

Prototype

   Description

   Storyboard

   Milestones

Develop

   Storyboard

   Pretty Storyboard

Design:

   Contest

Clone this wiki locally