mirror of https://github.com/tasks/tasks
Remove outstanding table
parent
ea695ead9c
commit
283423cd27
@ -1,25 +0,0 @@
|
||||
package com.todoroo.astrid.data;
|
||||
|
||||
import com.todoroo.andlib.data.AbstractModel;
|
||||
import com.todoroo.andlib.data.Property.LongProperty;
|
||||
import com.todoroo.andlib.data.Property.StringProperty;
|
||||
|
||||
public abstract class OutstandingEntry<TYPE extends RemoteModel> extends AbstractModel {
|
||||
|
||||
public static final String ENTITY_ID_PROPERTY_NAME = "entityId";
|
||||
|
||||
public static final LongProperty ENTITY_ID_PROPERTY = new LongProperty(null, ENTITY_ID_PROPERTY_NAME);
|
||||
|
||||
public static final String COLUMN_STRING_PROPERTY_NAME = "columnString";
|
||||
|
||||
public static final StringProperty COLUMN_STRING_PROPERTY = new StringProperty(null, COLUMN_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final String VALUE_STRING_PROPERTY_NAME = "valueString";
|
||||
|
||||
public static final StringProperty VALUE_STRING_PROPERTY = new StringProperty(null, VALUE_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final String CREATED_AT_PROPERTY_NAME = "createdAt";
|
||||
|
||||
public static final LongProperty CREATED_AT_PROPERTY = new LongProperty(null, CREATED_AT_PROPERTY_NAME);
|
||||
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.todoroo.astrid.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
|
||||
import com.todoroo.andlib.data.AbstractModel;
|
||||
import com.todoroo.andlib.data.Property;
|
||||
import com.todoroo.andlib.data.Property.LongProperty;
|
||||
import com.todoroo.andlib.data.Property.StringProperty;
|
||||
import com.todoroo.andlib.data.Table;
|
||||
|
||||
public class TagOutstanding extends OutstandingEntry<TagData> {
|
||||
|
||||
/** table for this model */
|
||||
public static final Table TABLE = new Table("tags_outstanding", TagOutstanding.class);
|
||||
|
||||
// --- properties
|
||||
|
||||
/** ID */
|
||||
public static final LongProperty ID = new LongProperty(
|
||||
TABLE, ID_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty TAG_DATA_ID = new LongProperty(
|
||||
TABLE, ENTITY_ID_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty COLUMN_STRING = new StringProperty(
|
||||
TABLE, COLUMN_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty VALUE_STRING = new StringProperty(
|
||||
TABLE, VALUE_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty CREATED_AT = new LongProperty(
|
||||
TABLE, CREATED_AT_PROPERTY_NAME);
|
||||
|
||||
private static final ContentValues defaultValues = new ContentValues();
|
||||
|
||||
static {
|
||||
defaultValues.put(TAG_DATA_ID.name, 0);
|
||||
defaultValues.put(COLUMN_STRING.name, "");
|
||||
defaultValues.put(VALUE_STRING.name, "");
|
||||
}
|
||||
|
||||
/** List of all properties for this model */
|
||||
public static final Property<?>[] PROPERTIES = generateProperties(TagOutstanding.class);
|
||||
|
||||
@Override
|
||||
public ContentValues getDefaultValues() {
|
||||
return defaultValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return getIdHelper(ID);
|
||||
}
|
||||
|
||||
public static final Creator<TagOutstanding> CREATOR = new ModelCreator<TagOutstanding>(TagOutstanding.class);
|
||||
|
||||
@Override
|
||||
protected Creator<? extends AbstractModel> getCreator() {
|
||||
return CREATOR;
|
||||
}
|
||||
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.todoroo.astrid.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
|
||||
import com.todoroo.andlib.data.AbstractModel;
|
||||
import com.todoroo.andlib.data.Property;
|
||||
import com.todoroo.andlib.data.Property.LongProperty;
|
||||
import com.todoroo.andlib.data.Property.StringProperty;
|
||||
import com.todoroo.andlib.data.Table;
|
||||
|
||||
public class TaskAttachmentOutstanding extends OutstandingEntry<TaskAttachment> {
|
||||
|
||||
/** table for this model */
|
||||
public static final Table TABLE = new Table("task_attachment_outstanding", TaskAttachmentOutstanding.class);
|
||||
|
||||
// --- properties
|
||||
|
||||
/** ID */
|
||||
public static final LongProperty ID = new LongProperty(
|
||||
TABLE, ID_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty TASK_ATTACHMENT_ID = new LongProperty(
|
||||
TABLE, ENTITY_ID_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty COLUMN_STRING = new StringProperty(
|
||||
TABLE, COLUMN_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty VALUE_STRING = new StringProperty(
|
||||
TABLE, VALUE_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty CREATED_AT = new LongProperty(
|
||||
TABLE, CREATED_AT_PROPERTY_NAME);
|
||||
|
||||
private static final ContentValues defaultValues = new ContentValues();
|
||||
|
||||
static {
|
||||
defaultValues.put(TASK_ATTACHMENT_ID.name, 0);
|
||||
defaultValues.put(COLUMN_STRING.name, "");
|
||||
defaultValues.put(VALUE_STRING.name, "");
|
||||
}
|
||||
|
||||
/** List of all properties for this model */
|
||||
public static final Property<?>[] PROPERTIES = generateProperties(TaskAttachmentOutstanding.class);
|
||||
|
||||
@Override
|
||||
public ContentValues getDefaultValues() {
|
||||
return defaultValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return getIdHelper(ID);
|
||||
}
|
||||
|
||||
public static final Creator<TaskAttachmentOutstanding> CREATOR = new ModelCreator<TaskAttachmentOutstanding>(TaskAttachmentOutstanding.class);
|
||||
|
||||
@Override
|
||||
protected Creator<? extends AbstractModel> getCreator() {
|
||||
return CREATOR;
|
||||
}
|
||||
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.todoroo.astrid.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
|
||||
import com.todoroo.andlib.data.AbstractModel;
|
||||
import com.todoroo.andlib.data.Property;
|
||||
import com.todoroo.andlib.data.Property.LongProperty;
|
||||
import com.todoroo.andlib.data.Property.StringProperty;
|
||||
import com.todoroo.andlib.data.Table;
|
||||
|
||||
public class TaskListMetadataOutstanding extends OutstandingEntry<TaskListMetadata> {
|
||||
|
||||
/** table for this model */
|
||||
public static final Table TABLE = new Table("task_list_metadata_outstanding", TaskListMetadataOutstanding.class);
|
||||
|
||||
// --- properties
|
||||
|
||||
/** ID */
|
||||
public static final LongProperty ID = new LongProperty(
|
||||
TABLE, ID_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty TASK_LIST_METADATA_ID = new LongProperty(
|
||||
TABLE, ENTITY_ID_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty COLUMN_STRING = new StringProperty(
|
||||
TABLE, COLUMN_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty VALUE_STRING = new StringProperty(
|
||||
TABLE, VALUE_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty CREATED_AT = new LongProperty(
|
||||
TABLE, CREATED_AT_PROPERTY_NAME);
|
||||
|
||||
private static final ContentValues defaultValues = new ContentValues();
|
||||
|
||||
static {
|
||||
defaultValues.put(TASK_LIST_METADATA_ID.name, 0);
|
||||
defaultValues.put(COLUMN_STRING.name, "");
|
||||
defaultValues.put(VALUE_STRING.name, "");
|
||||
}
|
||||
|
||||
/** List of all properties for this model */
|
||||
public static final Property<?>[] PROPERTIES = generateProperties(TaskListMetadataOutstanding.class);
|
||||
|
||||
@Override
|
||||
public ContentValues getDefaultValues() {
|
||||
return defaultValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return getIdHelper(ID);
|
||||
}
|
||||
|
||||
public static final Creator<TaskListMetadataOutstanding> CREATOR = new ModelCreator<TaskListMetadataOutstanding>(TaskListMetadataOutstanding.class);
|
||||
|
||||
@Override
|
||||
protected Creator<? extends AbstractModel> getCreator() {
|
||||
return CREATOR;
|
||||
}
|
||||
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.todoroo.astrid.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
|
||||
import com.todoroo.andlib.data.AbstractModel;
|
||||
import com.todoroo.andlib.data.Property;
|
||||
import com.todoroo.andlib.data.Property.LongProperty;
|
||||
import com.todoroo.andlib.data.Property.StringProperty;
|
||||
import com.todoroo.andlib.data.Table;
|
||||
|
||||
public class TaskOutstanding extends OutstandingEntry<Task> {
|
||||
|
||||
/** table for this model */
|
||||
public static final Table TABLE = new Table("tasks_outstanding", TaskOutstanding.class);
|
||||
|
||||
// --- properties
|
||||
|
||||
/** ID */
|
||||
public static final LongProperty ID = new LongProperty(
|
||||
TABLE, ID_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty TASK_ID = new LongProperty(
|
||||
TABLE, ENTITY_ID_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty COLUMN_STRING = new StringProperty(
|
||||
TABLE, COLUMN_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty VALUE_STRING = new StringProperty(
|
||||
TABLE, VALUE_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty CREATED_AT = new LongProperty(
|
||||
TABLE, CREATED_AT_PROPERTY_NAME);
|
||||
|
||||
private static final ContentValues defaultValues = new ContentValues();
|
||||
|
||||
static {
|
||||
defaultValues.put(TASK_ID.name, 0);
|
||||
defaultValues.put(COLUMN_STRING.name, "");
|
||||
defaultValues.put(VALUE_STRING.name, "");
|
||||
}
|
||||
|
||||
/** List of all properties for this model */
|
||||
public static final Property<?>[] PROPERTIES = generateProperties(TaskOutstanding.class);
|
||||
|
||||
@Override
|
||||
public ContentValues getDefaultValues() {
|
||||
return defaultValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return getIdHelper(ID);
|
||||
}
|
||||
|
||||
public static final Creator<TaskOutstanding> CREATOR = new ModelCreator<TaskOutstanding>(TaskOutstanding.class);
|
||||
|
||||
@Override
|
||||
protected Creator<? extends AbstractModel> getCreator() {
|
||||
return CREATOR;
|
||||
}
|
||||
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package com.todoroo.astrid.data;
|
||||
|
||||
import android.content.ContentValues;
|
||||
|
||||
import com.todoroo.andlib.data.AbstractModel;
|
||||
import com.todoroo.andlib.data.Property;
|
||||
import com.todoroo.andlib.data.Property.LongProperty;
|
||||
import com.todoroo.andlib.data.Property.StringProperty;
|
||||
import com.todoroo.andlib.data.Table;
|
||||
|
||||
public class UserActivityOutstanding extends OutstandingEntry<UserActivity> {
|
||||
|
||||
/** table for this model */
|
||||
public static final Table TABLE = new Table("user_activity_outstanding", UserActivityOutstanding.class);
|
||||
|
||||
// --- properties
|
||||
|
||||
/** ID */
|
||||
public static final LongProperty ID = new LongProperty(
|
||||
TABLE, ID_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty TASK_ID = new LongProperty(
|
||||
TABLE, ENTITY_ID_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty COLUMN_STRING = new StringProperty(
|
||||
TABLE, COLUMN_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final StringProperty VALUE_STRING = new StringProperty(
|
||||
TABLE, VALUE_STRING_PROPERTY_NAME);
|
||||
|
||||
public static final LongProperty CREATED_AT = new LongProperty(
|
||||
TABLE, CREATED_AT_PROPERTY_NAME);
|
||||
|
||||
private static final ContentValues defaultValues = new ContentValues();
|
||||
|
||||
static {
|
||||
defaultValues.put(TASK_ID.name, 0);
|
||||
defaultValues.put(COLUMN_STRING.name, "");
|
||||
defaultValues.put(VALUE_STRING.name, "");
|
||||
}
|
||||
|
||||
/** List of all properties for this model */
|
||||
public static final Property<?>[] PROPERTIES = generateProperties(UserActivityOutstanding.class);
|
||||
|
||||
@Override
|
||||
public ContentValues getDefaultValues() {
|
||||
return defaultValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getId() {
|
||||
return getIdHelper(ID);
|
||||
}
|
||||
|
||||
public static final Creator<UserActivityOutstanding> CREATOR = new ModelCreator<UserActivityOutstanding>(UserActivityOutstanding.class);
|
||||
|
||||
@Override
|
||||
protected Creator<? extends AbstractModel> getCreator() {
|
||||
return CREATOR;
|
||||
}
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package com.todoroo.astrid.dao;
|
||||
|
||||
import com.todoroo.andlib.data.DatabaseDao;
|
||||
import com.todoroo.andlib.service.Autowired;
|
||||
import com.todoroo.andlib.service.DependencyInjectionService;
|
||||
import com.todoroo.astrid.data.OutstandingEntry;
|
||||
|
||||
public class OutstandingEntryDao<TYPE extends OutstandingEntry<?>> extends DatabaseDao<TYPE> {
|
||||
|
||||
@Autowired
|
||||
private Database database;
|
||||
|
||||
public OutstandingEntryDao(Class<TYPE> modelClass) {
|
||||
super(modelClass);
|
||||
DependencyInjectionService.getInstance().inject(this);
|
||||
setDatabase(database);
|
||||
}
|
||||
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.todoroo.astrid.dao;
|
||||
|
||||
import com.todoroo.astrid.data.TaskOutstanding;
|
||||
|
||||
public class TaskOutstandingDao extends OutstandingEntryDao<TaskOutstanding> {
|
||||
|
||||
public TaskOutstandingDao() {
|
||||
super(TaskOutstanding.class);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue