/*
 * Copyright 2016 requery.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.requery.android.sqlite;

import io.requery.sql.Configuration;
import io.requery.sql.ConnectionProvider;
import io.requery.sql.TableCreationMode;

/**
 * Common interface for Android database providers.
 *
 * @param <T> database type
 */
public interface DatabaseProvider<T> extends ConnectionProvider {

    /**
     * Enables statement logging. Not use for debugging only as it impacts performance.
     *
     * @param enable true to enable, false otherwise default is false.
     */
    void setLoggingEnabled(boolean enable);

    /**
     * Sets the {@link TableCreationMode} to use when the database is created or upgraded.
     *
     * @param mode to use
     */
    void setTableCreationMode(TableCreationMode mode);

    /**
     * @return {@link Configuration} used by the provider
     */
    Configuration getConfiguration();

    void onCreate(T db);

    void onConfigure(T db);

    void onUpgrade(T db, int oldVersion, int newVersion);

    T getReadableDatabase();

    T getWritableDatabase();
}

@@ -1447,147 +1447,647 @@
     
-void onCreate(T db);%0A%0A    void onConfigure(T db);%0A%0A    void onUpgrade(T db, int oldVersion, int newVersion);%0A%0A    T getReadableDatabase();%0A
+/**%0A     * Callback for when the database schema is to be created.%0A     *%0A     * @param db instance%0A     */%0A    void onCreate(T db);%0A%0A    /**%0A     * Callback for when the database should be configured.%0A     *%0A     * @param db instance%0A     */%0A    void onConfigure(T db);%0A%0A    /**%0A     * Callback for when the database should be upgraded from an previous version to a new version.%0A     *%0A     * @param db instance%0A     */%0A    void onUpgrade(T db, int oldVersion, int newVersion);%0A%0A    /**%0A     * @return read only database instance%0A     */%0A    T getReadableDatabase();%0A%0A    /**%0A     * @return readable and writable database instance%0A     */
 %0A   

Update javadoc of DatabaseProvider