|
|
|
@ -9,7 +9,6 @@ package com.todoroo.astrid.data;
|
|
|
|
import android.content.ContentValues;
|
|
|
|
import android.content.ContentValues;
|
|
|
|
|
|
|
|
|
|
|
|
import com.todoroo.andlib.data.Property;
|
|
|
|
import com.todoroo.andlib.data.Property;
|
|
|
|
import com.todoroo.andlib.data.Property.IntegerProperty;
|
|
|
|
|
|
|
|
import com.todoroo.andlib.data.Property.LongProperty;
|
|
|
|
import com.todoroo.andlib.data.Property.LongProperty;
|
|
|
|
import com.todoroo.andlib.data.Property.StringProperty;
|
|
|
|
import com.todoroo.andlib.data.Property.StringProperty;
|
|
|
|
import com.todoroo.andlib.data.Table;
|
|
|
|
import com.todoroo.andlib.data.Table;
|
|
|
|
@ -34,14 +33,6 @@ public final class TaskListMetadata extends RemoteModel {
|
|
|
|
public static final LongProperty ID = new LongProperty(
|
|
|
|
public static final LongProperty ID = new LongProperty(
|
|
|
|
TABLE, ID_PROPERTY_NAME);
|
|
|
|
TABLE, ID_PROPERTY_NAME);
|
|
|
|
|
|
|
|
|
|
|
|
/** Remote id */
|
|
|
|
|
|
|
|
public static final StringProperty UUID = new StringProperty(
|
|
|
|
|
|
|
|
TABLE, UUID_PROPERTY_NAME);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Pushed at date */
|
|
|
|
|
|
|
|
public static final LongProperty PUSHED_AT = new LongProperty(
|
|
|
|
|
|
|
|
TABLE, PUSHED_AT_PROPERTY_NAME);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Tag UUID */
|
|
|
|
/** Tag UUID */
|
|
|
|
public static final StringProperty TAG_UUID = new StringProperty(
|
|
|
|
public static final StringProperty TAG_UUID = new StringProperty(
|
|
|
|
TABLE, "tag_uuid");
|
|
|
|
TABLE, "tag_uuid");
|
|
|
|
@ -54,24 +45,6 @@ public final class TaskListMetadata extends RemoteModel {
|
|
|
|
public static final StringProperty TASK_IDS = new StringProperty(
|
|
|
|
public static final StringProperty TASK_IDS = new StringProperty(
|
|
|
|
TABLE, "task_ids", Property.PROP_FLAG_JSON);
|
|
|
|
TABLE, "task_ids", Property.PROP_FLAG_JSON);
|
|
|
|
|
|
|
|
|
|
|
|
/** Sort setting (one of below) */
|
|
|
|
|
|
|
|
public static final StringProperty SORT = new StringProperty(
|
|
|
|
|
|
|
|
TABLE, "sort");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Settings hash */
|
|
|
|
|
|
|
|
public static final StringProperty SETTINGS = new StringProperty(
|
|
|
|
|
|
|
|
TABLE, "settings", Property.PROP_FLAG_JSON);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Array of child tags (for folders) */
|
|
|
|
|
|
|
|
public static final StringProperty CHILD_TAG_IDS = new StringProperty(
|
|
|
|
|
|
|
|
TABLE, "child_tags", Property.PROP_FLAG_JSON);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** If the folder is collapsed */
|
|
|
|
|
|
|
|
public static final IntegerProperty IS_COLLAPSED = new IntegerProperty(
|
|
|
|
|
|
|
|
TABLE, "is_collapsed");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** List of all properties for this model */
|
|
|
|
/** List of all properties for this model */
|
|
|
|
public static final Property<?>[] PROPERTIES = generateProperties(TaskListMetadata.class);
|
|
|
|
public static final Property<?>[] PROPERTIES = generateProperties(TaskListMetadata.class);
|
|
|
|
|
|
|
|
|
|
|
|
@ -84,15 +57,9 @@ public final class TaskListMetadata extends RemoteModel {
|
|
|
|
private static final ContentValues defaultValues = new ContentValues();
|
|
|
|
private static final ContentValues defaultValues = new ContentValues();
|
|
|
|
|
|
|
|
|
|
|
|
static {
|
|
|
|
static {
|
|
|
|
defaultValues.put(UUID.name, NO_UUID);
|
|
|
|
|
|
|
|
defaultValues.put(PUSHED_AT.name, 0);
|
|
|
|
|
|
|
|
defaultValues.put(TAG_UUID.name, NO_UUID);
|
|
|
|
defaultValues.put(TAG_UUID.name, NO_UUID);
|
|
|
|
defaultValues.put(FILTER.name, "");
|
|
|
|
defaultValues.put(FILTER.name, "");
|
|
|
|
defaultValues.put(TASK_IDS.name, "[]");
|
|
|
|
defaultValues.put(TASK_IDS.name, "[]");
|
|
|
|
defaultValues.put(SORT.name, "");
|
|
|
|
|
|
|
|
defaultValues.put(SETTINGS.name, "{}");
|
|
|
|
|
|
|
|
defaultValues.put(CHILD_TAG_IDS.name, "[]");
|
|
|
|
|
|
|
|
defaultValues.put(IS_COLLAPSED.name, 0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
|