Android Open Source - KeepMySecret Data Table






From Project

Back to project page KeepMySecret.

License

The source code is released under:

GNU General Public License

If you think the Android project KeepMySecret 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 keepmysecretapp.app.com.keepmysecretapp.tables;
/* w  w w  .jav  a 2 s. co  m*/
import keepmysecretapp.app.com.keepmysecretapp.db.EntryType;

public class DataTable implements QueryTable {

    public static final String KEY_ID = "ID";
    public static final String KEY_ENTRY_NAME = "ENTRY_NAME";
    public static final String KEY_ENTRY_PASSWORD = "ENTRY_PASSWORD";
    public static final String KEY_ENTRY_DESCRIBE = "ENTRY_DESCRIBE";
    public static final String KEY_ENTRY_GROUP_ID = "GROUP_ID";

    public String getKeyId() {
        return KEY_ID;
    }

    public String getKeyEntryName() {
        return KEY_ENTRY_NAME;
    }

    public String getKeyEntryPassword() {
        return KEY_ENTRY_PASSWORD;
    }

    public String getKeyEntryGroupId() {
        return KEY_ENTRY_GROUP_ID;
    }

    public String getKeyEntryDescribe() {
        return KEY_ENTRY_DESCRIBE;
    }

    @Override
    public String getUpgradeQuery() {
        StringBuilder sb = new StringBuilder();
        sb.append("DROP TABLE IF EXISTS " + EntryType.DATA);
        return sb.toString();
    }


    @Override
    public String getCreationQuery() {

        StringBuilder sb = new StringBuilder();
        sb.append("CREATE TABLE " + EntryType.DATA);
        sb.append("(" + getKeyId() + " INTEGER PRIMARY KEY, ");
        sb.append(getKeyEntryName() + " TEXT, ");
        sb.append(getKeyEntryPassword() + " TEXT, ");
        sb.append(getKeyEntryDescribe() + " TEXT, ");
        sb.append(getKeyEntryGroupId() + " INTEGER"
                + ")");

        return sb.toString();
    }
}




Java Source Code List

keepmysecretapp.app.com.keepmysecretapp.ApplicationTest.java
keepmysecretapp.app.com.keepmysecretapp.activities.MainActivity.java
keepmysecretapp.app.com.keepmysecretapp.activities.creation.CreateNewEntryActivity.java
keepmysecretapp.app.com.keepmysecretapp.activities.edit.EditEntryActivity.java
keepmysecretapp.app.com.keepmysecretapp.activities.presentation.EntryPresentActivity.java
keepmysecretapp.app.com.keepmysecretapp.adapters.DataEntryAdapter.java
keepmysecretapp.app.com.keepmysecretapp.adapters.GroupEntryAdapter.java
keepmysecretapp.app.com.keepmysecretapp.dao.Dao.java
keepmysecretapp.app.com.keepmysecretapp.dao.EntryDao.java
keepmysecretapp.app.com.keepmysecretapp.dao.GroupDao.java
keepmysecretapp.app.com.keepmysecretapp.db.DbContext.java
keepmysecretapp.app.com.keepmysecretapp.db.EntryType.java
keepmysecretapp.app.com.keepmysecretapp.fragments.creation.CreateDataEntryFragment.java
keepmysecretapp.app.com.keepmysecretapp.fragments.creation.CreateGroupFragment.java
keepmysecretapp.app.com.keepmysecretapp.fragments.dialogs.GeneratePasswordDialog.java
keepmysecretapp.app.com.keepmysecretapp.fragments.edit.EditDataFragment.java
keepmysecretapp.app.com.keepmysecretapp.fragments.edit.EditGroupFragment.java
keepmysecretapp.app.com.keepmysecretapp.fragments.other.NavigationDrawerFragment.java
keepmysecretapp.app.com.keepmysecretapp.fragments.other.SideLogic.java
keepmysecretapp.app.com.keepmysecretapp.fragments.presentation.EntryPresentFragment.java
keepmysecretapp.app.com.keepmysecretapp.fragments.presentation.TextKeeperFragment.java
keepmysecretapp.app.com.keepmysecretapp.other.Constants.java
keepmysecretapp.app.com.keepmysecretapp.other.Tools.java
keepmysecretapp.app.com.keepmysecretapp.tables.AuthTable.java
keepmysecretapp.app.com.keepmysecretapp.tables.DataTable.java
keepmysecretapp.app.com.keepmysecretapp.tables.GroupTable.java
keepmysecretapp.app.com.keepmysecretapp.tables.QueryTable.java
keepmysecretapp.app.com.keepmysecretapp.types.CopyTextButtonListener.java
keepmysecretapp.app.com.keepmysecretapp.types.GenerateButtonListener.java
keepmysecretapp.app.com.keepmysecretapp.types.ListEntry.java