// Path: MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgContract.java
// public static class OrgData implements OrgDataColumns {
// 	public static final Uri CONTENT_URI =
// 			BASE_CONTENT_URI.buildUpon().appendPath(PATH_ORGDATA).build();
// 
// 	public static final Uri CONTENT_URI_TODOS =
// 			BASE_CONTENT_URI.buildUpon().appendPath(PATH_TODOS).build();
// 	public static final String DEFAULT_SORT = ID + " ASC";
// 	public static final String NAME_SORT = NAME + " ASC";
// 	public static final String POSITION_SORT = POSITION + " ASC";
// 	public static final String[] DEFAULT_COLUMNS = {ID, NAME, TODO, TAGS, TAGS_INHERITED,
// 			PARENT_ID, PAYLOAD, LEVEL, PRIORITY, FILE_ID, POSITION, SCHEDULED, SCHEDULED_DATE_ONLY, DEADLINE, DEADLINE_DATE_ONLY};
// 
// 	public static String getId(Uri uri) {
// 		return uri.getPathSegments().get(1);
// 	}
// 
// 	public static Uri buildIdUri(String id) {
// 		return CONTENT_URI.buildUpon().appendPath(id).build();
// 	}
// 
// 	public static Uri buildIdUri(Long id) {
// 		return buildIdUri(id.toString());
// 	}
// 
// 	public static Uri buildChildrenUri(String parentId) {
// 		return CONTENT_URI.buildUpon().appendPath(parentId).appendPath("children").build();
// 	}
// 
// 	public static Uri buildChildrenUri(long node_id) {
// 		return buildChildrenUri(Long.toString(node_id));
// 	}
// }


import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteStatement;
import com.matburt.mobileorg.orgdata.OrgContract.OrgData;
import java.util.HashMap;
import java.util.Map;
package com.matburt.mobileorg.orgdata;




public class OrgDatabase extends SQLiteOpenHelper {
	private static final String DATABASE_NAME = "MobileOrg.db";
	private static final int DATABASE_VERSION = 5;
	private static OrgDatabase mInstance = null;
	private SQLiteStatement orgdataInsertStatement;
	private SQLiteStatement addPayloadStatement;
	private SQLiteStatement addTimestampsStatement;

	private OrgDatabase(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);

		orgdataInsertStatement = getWritableDatabase()
				.compileStatement("INSERT INTO " + Tables.ORGDATA+ " ("
                        + OrgData.NAME +           ", "
                        + OrgData.TODO +           ", "
                        + OrgData.PRIORITY +       ", "
                        + OrgData.PARENT_ID +      ", "
                        + OrgData.FILE_ID +        ", "
                        + OrgData.TAGS +           ", "
                        + OrgData.TAGS_INHERITED + ", "
                        + OrgData.LEVEL +          ", "
// Path: MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgContract.java
// public static class OrgData implements OrgDataColumns {
// 	public static final Uri CONTENT_URI =
// 			BASE_CONTENT_URI.buildUpon().appendPath(PATH_ORGDATA).build();
// 
// 	public static final Uri CONTENT_URI_TODOS =
// 			BASE_CONTENT_URI.buildUpon().appendPath(PATH_TODOS).build();
// 	public static final String DEFAULT_SORT = ID + " ASC";
// 	public static final String NAME_SORT = NAME + " ASC";
// 	public static final String POSITION_SORT = POSITION + " ASC";
// 	public static final String[] DEFAULT_COLUMNS = {ID, NAME, TODO, TAGS, TAGS_INHERITED,
// 			PARENT_ID, PAYLOAD, LEVEL, PRIORITY, FILE_ID, POSITION, SCHEDULED, SCHEDULED_DATE_ONLY, DEADLINE, DEADLINE_DATE_ONLY};
// 
// 	public static String getId(Uri uri) {
// 		return uri.getPathSegments().get(1);
// 	}
// 
// 	public static Uri buildIdUri(String id) {
// 		return CONTENT_URI.buildUpon().appendPath(id).build();
// 	}
// 
// 	public static Uri buildIdUri(Long id) {
// 		return buildIdUri(id.toString());
// 	}
// 
// 	public static Uri buildChildrenUri(String parentId) {
// 		return CONTENT_URI.buildUpon().appendPath(parentId).appendPath("children").build();
// 	}
// 
// 	public static Uri buildChildrenUri(long node_id) {
// 		return buildChildrenUri(Long.toString(node_id));
// 	}
// }


// Path: MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgDatabase.java
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteStatement;
import com.matburt.mobileorg.orgdata.OrgContract.OrgData;
import java.util.HashMap;
import java.util.Map;

package com.matburt.mobileorg.orgdata;




public class OrgDatabase extends SQLiteOpenHelper {
	private static final String DATABASE_NAME = "MobileOrg.db";
	private static final int DATABASE_VERSION = 5;
	private static OrgDatabase mInstance = null;
	private SQLiteStatement orgdataInsertStatement;
	private SQLiteStatement addPayloadStatement;
	private SQLiteStatement addTimestampsStatement;

	private OrgDatabase(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);

		orgdataInsertStatement = getWritableDatabase()
				.compileStatement("INSERT INTO " + Tables.ORGDATA+ " ("
                        + OrgData.NAME +           ", "
                        + OrgData.TODO +           ", "
                        + OrgData.PRIORITY +       ", "
                        + OrgData.PARENT_ID +      ", "
                        + OrgData.FILE_ID +        ", "
                        + OrgData.TAGS +           ", "
                        + OrgData.TAGS_INHERITED + ", "
                        + OrgData.LEVEL +          ", "
                        + OrgData.POSITION +       ") "