Android Open Source - Android-Lib-Database Query Builder






From Project

Back to project page Android-Lib-Database.

License

The source code is released under:

Apache License

If you think the Android project Android-Lib-Database listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package android.lib.database.query;
//from   w  w  w  .  ja  v a  2s .com
import android.lib.database.Table;
import android.text.TextUtils;

public abstract class QueryBuilder {
    protected QueryBuilder() {
    }

    /**
     * Builds a SQL statement and abstracts it in a {@link Query} object ready for execution.
     * @return a {@link Query} object ready for execution.
     */
    public abstract Query build();

    /**
     * Returns the name of the table by either its annotated table name or {@link Class#getSimpleName()}.
     * @return the name of the table.
     */
    protected static String getTableName(final Class<?> table) {
        final Table annotation = table.getAnnotation(Table.class);

        return annotation == null ? null : TextUtils.isEmpty(annotation.value()) ? table.getSimpleName() : annotation.value();
    }
}




Java Source Code List

android.lib.database.Column.java
android.lib.database.CompositeIndex.java
android.lib.database.DatabaseOpenHelper.java
android.lib.database.Database.java
android.lib.database.DateConverter.java
android.lib.database.Index.java
android.lib.database.JSONRowMapper.java
android.lib.database.RowMapper.java
android.lib.database.Table.java
android.lib.database.TypeConverter.java
android.lib.database.UniqueCompositeIndex.java
android.lib.database.UnsupportedTypeException.java
android.lib.database.UseConverter.java
android.lib.database.predicate.ManySidedPredicate.java
android.lib.database.predicate.Predicate.java
android.lib.database.predicate.ThreeSidedPredicate.java
android.lib.database.predicate.TwoSidedPredicate.java
android.lib.database.query.Delete.java
android.lib.database.query.Insert.java
android.lib.database.query.QueryBuilder.java
android.lib.database.query.Query.java
android.lib.database.query.Select.java
android.lib.database.query.Update.java