com.todoroo.astrid.data
Class Update

java.lang.Object
  extended by com.todoroo.andlib.data.AbstractModel
      extended by com.todoroo.astrid.data.RemoteModel
          extended by com.todoroo.astrid.data.Update
All Implemented Interfaces:
android.os.Parcelable, java.lang.Cloneable

public class Update
extends RemoteModel

Data Model which represents an update (e.g. a comment or data update event)

Author:
Tim Su

Nested Class Summary
 
Nested classes/interfaces inherited from class com.todoroo.andlib.data.AbstractModel
AbstractModel.ContentValuesSavingVisitor
 
Nested classes/interfaces inherited from interface android.os.Parcelable
android.os.Parcelable.Creator<T>
 
Field Summary
static Property.StringProperty ACTION
          Action text
static Property.StringProperty ACTION_CODE
          Action code
static android.net.Uri CONTENT_URI
          content uri for this model
static Property.LongProperty CREATION_DATE
          Unixtime Metadata was created
static Property.LongProperty ID
          ID
static Property.StringProperty MESSAGE
          Message
static Property.StringProperty PICTURE
          From User Object (JSON)
static java.lang.String PICTURE_LOADING
           
static Property<?>[] PROPERTIES
          List of all properties for this model
static Property.LongProperty REMOTE_ID
          Remote ID
static Table TABLE
          table for this model
static Property.StringProperty TAGS
          Associated Tag remote-ids (comma separated list with leading and trailing commas)
static Property.StringProperty TARGET_NAME
          Target Object Name
static Property.LongProperty TASK
          Associated Task remote-id (if any)
static Property.StringProperty USER
          From User Object (JSON)
static Property.LongProperty USER_ID
          From user id
 
Fields inherited from class com.todoroo.astrid.data.RemoteModel
REMOTE_ID_PROPERTY, REMOTE_ID_PROPERTY_NAME, USER_ID_PROPERTY, USER_JSON_PROPERTY
 
Fields inherited from class com.todoroo.andlib.data.AbstractModel
ID_PROPERTY, NO_ID
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
Update()
           
Update(TodorooCursor<Update> cursor)
           
 
Method Summary
 android.content.ContentValues getDefaultValues()
          Get the default values for this object
 long getId()
          Utility method to get the identifier of the model, if it exists.
 void readFromCursor(TodorooCursor<Update> cursor)
           
 
Methods inherited from class com.todoroo.andlib.data.AbstractModel
clear, clearValue, clone, containsNonNullValue, containsValue, describeContents, equals, getDatabaseValues, getFlag, getMergedValues, getSetValues, getTransitory, getValue, hashCode, isModified, isSaved, markSaved, mergeWith, putTransitory, setFlag, setId, setValue, writeToParcel
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE

public static final Table TABLE
table for this model


CONTENT_URI

public static final android.net.Uri CONTENT_URI
content uri for this model


ID

public static final Property.LongProperty ID
ID


REMOTE_ID

public static final Property.LongProperty REMOTE_ID
Remote ID


TASK

public static final Property.LongProperty TASK
Associated Task remote-id (if any)


TAGS

public static final Property.StringProperty TAGS
Associated Tag remote-ids (comma separated list with leading and trailing commas)


USER_ID

public static final Property.LongProperty USER_ID
From user id


USER

public static final Property.StringProperty USER
From User Object (JSON)


ACTION

public static final Property.StringProperty ACTION
Action text


ACTION_CODE

public static final Property.StringProperty ACTION_CODE
Action code


MESSAGE

public static final Property.StringProperty MESSAGE
Message


TARGET_NAME

public static final Property.StringProperty TARGET_NAME
Target Object Name


PICTURE

public static final Property.StringProperty PICTURE
From User Object (JSON)


CREATION_DATE

public static final Property.LongProperty CREATION_DATE
Unixtime Metadata was created


PROPERTIES

public static final Property<?>[] PROPERTIES
List of all properties for this model


PICTURE_LOADING

public static final java.lang.String PICTURE_LOADING
See Also:
Constant Field Values
Constructor Detail

Update

public Update()

Update

public Update(TodorooCursor<Update> cursor)
Method Detail

getDefaultValues

public android.content.ContentValues getDefaultValues()
Description copied from class: AbstractModel
Get the default values for this object

Specified by:
getDefaultValues in class AbstractModel

readFromCursor

public void readFromCursor(TodorooCursor<Update> cursor)

getId

public long getId()
Description copied from class: AbstractModel
Utility method to get the identifier of the model, if it exists.

Specified by:
getId in class AbstractModel
Returns:
0L if this model was not added to the database