Android Open Source - sqlite-provider S Q Lite Table Creator

From Project

Back to project page sqlite-provider.


The source code is released under:

Apache License

If you think the Android project sqlite-provider 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

//from   w  ww. j av  a  2  s. c om
 * Definition of the methods needed to create a table out of an object - will
 * mostly likely be a cursor.
 * @author Carl-Gustaf Harroch
public interface SQLiteTableCreator {

     * @return the primary key field within the cursor. If null, will use _id
     *         which auto increments
    String getPrimaryKey();

    boolean shouldPKAutoIncrement();

    SQLiteType getType(final String field);

    boolean isNullAllowed(final String field);

    boolean isUnique(final String field);

    // Could all this be put in a SQLiteTableCreator?
    boolean isOneToMany();

    String getParentColumnName();

    SQLiteType getParentType();

    String getParentTableName();

    String getParentPrimaryKey();
    // End

    boolean shouldIndex(final String field);

    SQLiteConflictClause onConflict(final String field);

    String getTableName();

    String[] getTableFields();

    String[] getTriggers();

Java Source Code List