diff options
| author | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-16 11:29:36 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-12-16 11:29:36 -0800 |
| commit | 068f3dd6a112fe3311ace2fe98458a0176bed562 (patch) | |
| tree | 67b112b04f45c76345dc9101277c87e74358ad18 /tutorials/NotepadCodeLab/Notepadv1Solution/src/com/android/demo/notepad1/NotesDbAdapter.java | |
| parent | 91f556a237e865cfe0daa2b467170c58278e4bea (diff) | |
| parent | 77560fc704f2933e0df8a4be0768b2439a0bab2a (diff) | |
Merge change Ie8b10efd
* changes:
Finish adding Makefiles for the Notepad tutorial.
Diffstat (limited to 'tutorials/NotepadCodeLab/Notepadv1Solution/src/com/android/demo/notepad1/NotesDbAdapter.java')
| -rwxr-xr-x | tutorials/NotepadCodeLab/Notepadv1Solution/src/com/android/demo/notepad1/NotesDbAdapter.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tutorials/NotepadCodeLab/Notepadv1Solution/src/com/android/demo/notepad1/NotesDbAdapter.java b/tutorials/NotepadCodeLab/Notepadv1Solution/src/com/android/demo/notepad1/NotesDbAdapter.java index 6f85bbd20..a3295d613 100755 --- a/tutorials/NotepadCodeLab/Notepadv1Solution/src/com/android/demo/notepad1/NotesDbAdapter.java +++ b/tutorials/NotepadCodeLab/Notepadv1Solution/src/com/android/demo/notepad1/NotesDbAdapter.java @@ -43,13 +43,13 @@ public class NotesDbAdapter { private static final String TAG = "NotesDbAdapter"; private DatabaseHelper mDbHelper; private SQLiteDatabase mDb; - + /** * Database creation sql statement */ private static final String DATABASE_CREATE = - "create table notes (_id integer primary key autoincrement, " - + "title text not null, body text not null);"; + "create table notes (_id integer primary key autoincrement, " + + "title text not null, body text not null);"; private static final String DATABASE_NAME = "data"; private static final String DATABASE_TABLE = "notes"; @@ -102,7 +102,7 @@ public class NotesDbAdapter { mDb = mDbHelper.getWritableDatabase(); return this; } - + public void close() { mDbHelper.close(); } @@ -158,9 +158,9 @@ public class NotesDbAdapter { Cursor mCursor = - mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID, - KEY_TITLE, KEY_BODY}, KEY_ROWID + "=" + rowId, null, - null, null, null, null); + mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID, + KEY_TITLE, KEY_BODY}, KEY_ROWID + "=" + rowId, null, + null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } |
