com.evernote.edam.notestore
Class SyncChunk

java.lang.Object
  extended by com.evernote.edam.notestore.SyncChunk
All Implemented Interfaces:
com.evernote.thrift.TBase<SyncChunk>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<SyncChunk>

public class SyncChunk
extends java.lang.Object
implements com.evernote.thrift.TBase<SyncChunk>, java.io.Serializable, java.lang.Cloneable

This structure is given out by the NoteStore when a client asks to receive the current state of an account. The client asks for the server's state one chunk at a time in order to allow clients to retrieve the state of a large account without needing to transfer the entire account in a single message. The server always gives SyncChunks using an ascending series of Update Sequence Numbers (USNs).

currentTime
The server's current date and time.
chunkHighUSN
The highest USN for any of the data objects represented in this sync chunk. If there are no objects in the chunk, this will not be set.
updateCount
The total number of updates that have been performed in the service for this account. This is equal to the highest USN within the account at the point that this SyncChunk was generated. If updateCount and chunkHighUSN are identical, that means that this is the last chunk in the account ... there is no more recent information.
notes
If present, this is a list of non-expunged notes that have a USN in this chunk. This will include notes that are "deleted" but not expunged (i.e. in the trash). The notes will include their list of tags and resources, but the note content, resource content, resource recognition data and resource alternate data will not be supplied.
notebooks
If present, this is a list of non-expunged notebooks that have a USN in this chunk. This will include notebooks that are "deleted" but not expunged (i.e. in the trash).
tags
If present, this is a list of the non-expunged tags that have a USN in this chunk.
searches
If present, this is a list of non-expunged searches that have a USN in this chunk.
resources
If present, this is a list of the non-expunged resources that have a USN in this chunk. This will include the metadata for each resource, but not its binary contents or recognition data, which must be retrieved separately.
expungedNotes
If present, the GUIDs of all of the notes that were permanently expunged in this chunk.
expungedNotebooks
If present, the GUIDs of all of the notebooks that were permanently expunged in this chunk. When a notebook is expunged, this implies that all of its child notes (and their resources) were also expunged.
expungedTags
If present, the GUIDs of all of the tags that were permanently expunged in this chunk.
expungedSearches
If present, the GUIDs of all of the saved searches that were permanently expunged in this chunk.
linkedNotebooks
If present, this is a list of non-expunged LinkedNotebooks that have a USN in this chunk.
expungedLinkedNotebooks
If present, the GUIDs of all of the LinkedNotebooks that were permanently expunged in this chunk.

See Also:
Serialized Form

Constructor Summary
SyncChunk()
           
SyncChunk(long currentTime, int updateCount)
           
SyncChunk(SyncChunk other)
          Performs a deep copy on other.
 
Method Summary
 void addToExpungedLinkedNotebooks(java.lang.String elem)
           
 void addToExpungedNotebooks(java.lang.String elem)
           
 void addToExpungedNotes(java.lang.String elem)
           
 void addToExpungedSearches(java.lang.String elem)
           
 void addToExpungedTags(java.lang.String elem)
           
 void addToLinkedNotebooks(LinkedNotebook elem)
           
 void addToNotebooks(Notebook elem)
           
 void addToNotes(Note elem)
           
 void addToResources(Resource elem)
           
 void addToSearches(SavedSearch elem)
           
 void addToTags(Tag elem)
           
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(SyncChunk other)
           
 SyncChunk deepCopy()
          Creates a deep copy of the object.
 boolean equals(java.lang.Object that)
           
 boolean equals(SyncChunk that)
           
 int getChunkHighUSN()
           
 long getCurrentTime()
           
 java.util.List<java.lang.String> getExpungedLinkedNotebooks()
           
 java.util.Iterator<java.lang.String> getExpungedLinkedNotebooksIterator()
           
 int getExpungedLinkedNotebooksSize()
           
 java.util.List<java.lang.String> getExpungedNotebooks()
           
 java.util.Iterator<java.lang.String> getExpungedNotebooksIterator()
           
 int getExpungedNotebooksSize()
           
 java.util.List<java.lang.String> getExpungedNotes()
           
 java.util.Iterator<java.lang.String> getExpungedNotesIterator()
           
 int getExpungedNotesSize()
           
 java.util.List<java.lang.String> getExpungedSearches()
           
 java.util.Iterator<java.lang.String> getExpungedSearchesIterator()
           
 int getExpungedSearchesSize()
           
 java.util.List<java.lang.String> getExpungedTags()
           
 java.util.Iterator<java.lang.String> getExpungedTagsIterator()
           
 int getExpungedTagsSize()
           
 java.util.List<LinkedNotebook> getLinkedNotebooks()
           
 java.util.Iterator<LinkedNotebook> getLinkedNotebooksIterator()
           
 int getLinkedNotebooksSize()
           
 java.util.List<Notebook> getNotebooks()
           
 java.util.Iterator<Notebook> getNotebooksIterator()
           
 int getNotebooksSize()
           
 java.util.List<Note> getNotes()
           
 java.util.Iterator<Note> getNotesIterator()
           
 int getNotesSize()
           
 java.util.List<Resource> getResources()
           
 java.util.Iterator<Resource> getResourcesIterator()
           
 int getResourcesSize()
           
 java.util.List<SavedSearch> getSearches()
           
 java.util.Iterator<SavedSearch> getSearchesIterator()
           
 int getSearchesSize()
           
 java.util.List<Tag> getTags()
           
 java.util.Iterator<Tag> getTagsIterator()
           
 int getTagsSize()
           
 int getUpdateCount()
           
 int hashCode()
           
 boolean isSetChunkHighUSN()
          Returns true if field chunkHighUSN is set (has been asigned a value) and false otherwise
 boolean isSetCurrentTime()
          Returns true if field currentTime is set (has been asigned a value) and false otherwise
 boolean isSetExpungedLinkedNotebooks()
          Returns true if field expungedLinkedNotebooks is set (has been asigned a value) and false otherwise
 boolean isSetExpungedNotebooks()
          Returns true if field expungedNotebooks is set (has been asigned a value) and false otherwise
 boolean isSetExpungedNotes()
          Returns true if field expungedNotes is set (has been asigned a value) and false otherwise
 boolean isSetExpungedSearches()
          Returns true if field expungedSearches is set (has been asigned a value) and false otherwise
 boolean isSetExpungedTags()
          Returns true if field expungedTags is set (has been asigned a value) and false otherwise
 boolean isSetLinkedNotebooks()
          Returns true if field linkedNotebooks is set (has been asigned a value) and false otherwise
 boolean isSetNotebooks()
          Returns true if field notebooks is set (has been asigned a value) and false otherwise
 boolean isSetNotes()
          Returns true if field notes is set (has been asigned a value) and false otherwise
 boolean isSetResources()
          Returns true if field resources is set (has been asigned a value) and false otherwise
 boolean isSetSearches()
          Returns true if field searches is set (has been asigned a value) and false otherwise
 boolean isSetTags()
          Returns true if field tags is set (has been asigned a value) and false otherwise
 boolean isSetUpdateCount()
          Returns true if field updateCount is set (has been asigned a value) and false otherwise
 void read(com.evernote.thrift.protocol.TProtocol iprot)
          Reads an instance of the object from the given protocol.
 void setChunkHighUSN(int chunkHighUSN)
           
 void setChunkHighUSNIsSet(boolean value)
           
 void setCurrentTime(long currentTime)
           
 void setCurrentTimeIsSet(boolean value)
           
 void setExpungedLinkedNotebooks(java.util.List<java.lang.String> expungedLinkedNotebooks)
           
 void setExpungedLinkedNotebooksIsSet(boolean value)
           
 void setExpungedNotebooks(java.util.List<java.lang.String> expungedNotebooks)
           
 void setExpungedNotebooksIsSet(boolean value)
           
 void setExpungedNotes(java.util.List<java.lang.String> expungedNotes)
           
 void setExpungedNotesIsSet(boolean value)
           
 void setExpungedSearches(java.util.List<java.lang.String> expungedSearches)
           
 void setExpungedSearchesIsSet(boolean value)
           
 void setExpungedTags(java.util.List<java.lang.String> expungedTags)
           
 void setExpungedTagsIsSet(boolean value)
           
 void setLinkedNotebooks(java.util.List<LinkedNotebook> linkedNotebooks)
           
 void setLinkedNotebooksIsSet(boolean value)
           
 void setNotebooks(java.util.List<Notebook> notebooks)
           
 void setNotebooksIsSet(boolean value)
           
 void setNotes(java.util.List<Note> notes)
           
 void setNotesIsSet(boolean value)
           
 void setResources(java.util.List<Resource> resources)
           
 void setResourcesIsSet(boolean value)
           
 void setSearches(java.util.List<SavedSearch> searches)
           
 void setSearchesIsSet(boolean value)
           
 void setTags(java.util.List<Tag> tags)
           
 void setTagsIsSet(boolean value)
           
 void setUpdateCount(int updateCount)
           
 void setUpdateCountIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetChunkHighUSN()
           
 void unsetCurrentTime()
           
 void unsetExpungedLinkedNotebooks()
           
 void unsetExpungedNotebooks()
           
 void unsetExpungedNotes()
           
 void unsetExpungedSearches()
           
 void unsetExpungedTags()
           
 void unsetLinkedNotebooks()
           
 void unsetNotebooks()
           
 void unsetNotes()
           
 void unsetResources()
           
 void unsetSearches()
           
 void unsetTags()
           
 void unsetUpdateCount()
           
 void validate()
           
 void write(com.evernote.thrift.protocol.TProtocol oprot)
          Writes the object to the given protocol.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyncChunk

public SyncChunk()

SyncChunk

public SyncChunk(long currentTime,
                 int updateCount)

SyncChunk

public SyncChunk(SyncChunk other)
Performs a deep copy on other.

Method Detail

deepCopy

public SyncChunk deepCopy()
Description copied from interface: com.evernote.thrift.TBase
Creates a deep copy of the object.

Specified by:
deepCopy in interface com.evernote.thrift.TBase<SyncChunk>

clear

public void clear()
Description copied from interface: com.evernote.thrift.TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface com.evernote.thrift.TBase<SyncChunk>

getCurrentTime

public long getCurrentTime()

setCurrentTime

public void setCurrentTime(long currentTime)

unsetCurrentTime

public void unsetCurrentTime()

isSetCurrentTime

public boolean isSetCurrentTime()
Returns true if field currentTime is set (has been asigned a value) and false otherwise


setCurrentTimeIsSet

public void setCurrentTimeIsSet(boolean value)

getChunkHighUSN

public int getChunkHighUSN()

setChunkHighUSN

public void setChunkHighUSN(int chunkHighUSN)

unsetChunkHighUSN

public void unsetChunkHighUSN()

isSetChunkHighUSN

public boolean isSetChunkHighUSN()
Returns true if field chunkHighUSN is set (has been asigned a value) and false otherwise


setChunkHighUSNIsSet

public void setChunkHighUSNIsSet(boolean value)

getUpdateCount

public int getUpdateCount()

setUpdateCount

public void setUpdateCount(int updateCount)

unsetUpdateCount

public void unsetUpdateCount()

isSetUpdateCount

public boolean isSetUpdateCount()
Returns true if field updateCount is set (has been asigned a value) and false otherwise


setUpdateCountIsSet

public void setUpdateCountIsSet(boolean value)

getNotesSize

public int getNotesSize()

getNotesIterator

public java.util.Iterator<Note> getNotesIterator()

addToNotes

public void addToNotes(Note elem)

getNotes

public java.util.List<Note> getNotes()

setNotes

public void setNotes(java.util.List<Note> notes)

unsetNotes

public void unsetNotes()

isSetNotes

public boolean isSetNotes()
Returns true if field notes is set (has been asigned a value) and false otherwise


setNotesIsSet

public void setNotesIsSet(boolean value)

getNotebooksSize

public int getNotebooksSize()

getNotebooksIterator

public java.util.Iterator<Notebook> getNotebooksIterator()

addToNotebooks

public void addToNotebooks(Notebook elem)

getNotebooks

public java.util.List<Notebook> getNotebooks()

setNotebooks

public void setNotebooks(java.util.List<Notebook> notebooks)

unsetNotebooks

public void unsetNotebooks()

isSetNotebooks

public boolean isSetNotebooks()
Returns true if field notebooks is set (has been asigned a value) and false otherwise


setNotebooksIsSet

public void setNotebooksIsSet(boolean value)

getTagsSize

public int getTagsSize()

getTagsIterator

public java.util.Iterator<Tag> getTagsIterator()

addToTags

public void addToTags(Tag elem)

getTags

public java.util.List<Tag> getTags()

setTags

public void setTags(java.util.List<Tag> tags)

unsetTags

public void unsetTags()

isSetTags

public boolean isSetTags()
Returns true if field tags is set (has been asigned a value) and false otherwise


setTagsIsSet

public void setTagsIsSet(boolean value)

getSearchesSize

public int getSearchesSize()

getSearchesIterator

public java.util.Iterator<SavedSearch> getSearchesIterator()

addToSearches

public void addToSearches(SavedSearch elem)

getSearches

public java.util.List<SavedSearch> getSearches()

setSearches

public void setSearches(java.util.List<SavedSearch> searches)

unsetSearches

public void unsetSearches()

isSetSearches

public boolean isSetSearches()
Returns true if field searches is set (has been asigned a value) and false otherwise


setSearchesIsSet

public void setSearchesIsSet(boolean value)

getResourcesSize

public int getResourcesSize()

getResourcesIterator

public java.util.Iterator<Resource> getResourcesIterator()

addToResources

public void addToResources(Resource elem)

getResources

public java.util.List<Resource> getResources()

setResources

public void setResources(java.util.List<Resource> resources)

unsetResources

public void unsetResources()

isSetResources

public boolean isSetResources()
Returns true if field resources is set (has been asigned a value) and false otherwise


setResourcesIsSet

public void setResourcesIsSet(boolean value)

getExpungedNotesSize

public int getExpungedNotesSize()

getExpungedNotesIterator

public java.util.Iterator<java.lang.String> getExpungedNotesIterator()

addToExpungedNotes

public void addToExpungedNotes(java.lang.String elem)

getExpungedNotes

public java.util.List<java.lang.String> getExpungedNotes()

setExpungedNotes

public void setExpungedNotes(java.util.List<java.lang.String> expungedNotes)

unsetExpungedNotes

public void unsetExpungedNotes()

isSetExpungedNotes

public boolean isSetExpungedNotes()
Returns true if field expungedNotes is set (has been asigned a value) and false otherwise


setExpungedNotesIsSet

public void setExpungedNotesIsSet(boolean value)

getExpungedNotebooksSize

public int getExpungedNotebooksSize()

getExpungedNotebooksIterator

public java.util.Iterator<java.lang.String> getExpungedNotebooksIterator()

addToExpungedNotebooks

public void addToExpungedNotebooks(java.lang.String elem)

getExpungedNotebooks

public java.util.List<java.lang.String> getExpungedNotebooks()

setExpungedNotebooks

public void setExpungedNotebooks(java.util.List<java.lang.String> expungedNotebooks)

unsetExpungedNotebooks

public void unsetExpungedNotebooks()

isSetExpungedNotebooks

public boolean isSetExpungedNotebooks()
Returns true if field expungedNotebooks is set (has been asigned a value) and false otherwise


setExpungedNotebooksIsSet

public void setExpungedNotebooksIsSet(boolean value)

getExpungedTagsSize

public int getExpungedTagsSize()

getExpungedTagsIterator

public java.util.Iterator<java.lang.String> getExpungedTagsIterator()

addToExpungedTags

public void addToExpungedTags(java.lang.String elem)

getExpungedTags

public java.util.List<java.lang.String> getExpungedTags()

setExpungedTags

public void setExpungedTags(java.util.List<java.lang.String> expungedTags)

unsetExpungedTags

public void unsetExpungedTags()

isSetExpungedTags

public boolean isSetExpungedTags()
Returns true if field expungedTags is set (has been asigned a value) and false otherwise


setExpungedTagsIsSet

public void setExpungedTagsIsSet(boolean value)

getExpungedSearchesSize

public int getExpungedSearchesSize()

getExpungedSearchesIterator

public java.util.Iterator<java.lang.String> getExpungedSearchesIterator()

addToExpungedSearches

public void addToExpungedSearches(java.lang.String elem)

getExpungedSearches

public java.util.List<java.lang.String> getExpungedSearches()

setExpungedSearches

public void setExpungedSearches(java.util.List<java.lang.String> expungedSearches)

unsetExpungedSearches

public void unsetExpungedSearches()

isSetExpungedSearches

public boolean isSetExpungedSearches()
Returns true if field expungedSearches is set (has been asigned a value) and false otherwise


setExpungedSearchesIsSet

public void setExpungedSearchesIsSet(boolean value)

getLinkedNotebooksSize

public int getLinkedNotebooksSize()

getLinkedNotebooksIterator

public java.util.Iterator<LinkedNotebook> getLinkedNotebooksIterator()

addToLinkedNotebooks

public void addToLinkedNotebooks(LinkedNotebook elem)

getLinkedNotebooks

public java.util.List<LinkedNotebook> getLinkedNotebooks()

setLinkedNotebooks

public void setLinkedNotebooks(java.util.List<LinkedNotebook> linkedNotebooks)

unsetLinkedNotebooks

public void unsetLinkedNotebooks()

isSetLinkedNotebooks

public boolean isSetLinkedNotebooks()
Returns true if field linkedNotebooks is set (has been asigned a value) and false otherwise


setLinkedNotebooksIsSet

public void setLinkedNotebooksIsSet(boolean value)

getExpungedLinkedNotebooksSize

public int getExpungedLinkedNotebooksSize()

getExpungedLinkedNotebooksIterator

public java.util.Iterator<java.lang.String> getExpungedLinkedNotebooksIterator()

addToExpungedLinkedNotebooks

public void addToExpungedLinkedNotebooks(java.lang.String elem)

getExpungedLinkedNotebooks

public java.util.List<java.lang.String> getExpungedLinkedNotebooks()

setExpungedLinkedNotebooks

public void setExpungedLinkedNotebooks(java.util.List<java.lang.String> expungedLinkedNotebooks)

unsetExpungedLinkedNotebooks

public void unsetExpungedLinkedNotebooks()

isSetExpungedLinkedNotebooks

public boolean isSetExpungedLinkedNotebooks()
Returns true if field expungedLinkedNotebooks is set (has been asigned a value) and false otherwise


setExpungedLinkedNotebooksIsSet

public void setExpungedLinkedNotebooksIsSet(boolean value)

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(SyncChunk that)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(SyncChunk other)
Specified by:
compareTo in interface java.lang.Comparable<SyncChunk>

read

public void read(com.evernote.thrift.protocol.TProtocol iprot)
          throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Reads an instance of the object from the given protocol.

Specified by:
read in interface com.evernote.thrift.TBase<SyncChunk>
Parameters:
iprot - Input protocol
Throws:
com.evernote.thrift.TException

write

public void write(com.evernote.thrift.protocol.TProtocol oprot)
           throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Writes the object to the given protocol.

Specified by:
write in interface com.evernote.thrift.TBase<SyncChunk>
Parameters:
oprot - Output protocol
Throws:
com.evernote.thrift.TException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

validate

public void validate()
              throws com.evernote.thrift.TException
Throws:
com.evernote.thrift.TException