com.evernote.edam.type
Class SavedSearch

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

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

A named search associated with the account that can be quickly re-used.

guid
The unique identifier of this search. Will be set by the service, so may be omitted by the client when creating.
Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
Regex: EDAM_GUID_REGEX
name
The name of the saved search to display in the GUI. The account may only contain one search with a given name (case-insensitive compare). Can't begin or end with a space.
Length: EDAM_SAVED_SEARCH_NAME_LEN_MIN - EDAM_SAVED_SEARCH_NAME_LEN_MAX
Regex: EDAM_SAVED_SEARCH_NAME_REGEX
query
A string expressing the search to be performed.
Length: EDAM_SAVED_SEARCH_QUERY_LEN_MIN - EDAM_SAVED_SEARCH_QUERY_LEN_MAX
format
The format of the query string, to determine how to parse and process it.
updateSequenceNum
A number identifying the last transaction to modify the state of this object. The USN values are sequential within an account, and can be used to compare the order of modifications within the service.
scope

Specifies the set of notes that should be included in the search, if possible.

Clients are expected to search as much of the desired scope as possible, with the understanding that a given client may not be able to cover the full specified scope. For example, when executing a search that includes notes in both the owner's account and business notebooks, a mobile client may choose to only search within the user's account because it is not capable of searching both scopes simultaneously. When a search across multiple scopes is not possible, a client may choose which scope to search based on the current application context. If a client cannot search any of the desired scopes, it should refuse to execute the search.

See Also:
Serialized Form

Constructor Summary
SavedSearch()
           
SavedSearch(SavedSearch other)
          Performs a deep copy on other.
 
Method Summary
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(SavedSearch other)
           
 SavedSearch deepCopy()
          Creates a deep copy of the object.
 boolean equals(java.lang.Object that)
           
 boolean equals(SavedSearch that)
           
 QueryFormat getFormat()
           
 java.lang.String getGuid()
           
 java.lang.String getName()
           
 java.lang.String getQuery()
           
 SavedSearchScope getScope()
           
 int getUpdateSequenceNum()
           
 int hashCode()
           
 boolean isSetFormat()
          Returns true if field format is set (has been asigned a value) and false otherwise
 boolean isSetGuid()
          Returns true if field guid is set (has been asigned a value) and false otherwise
 boolean isSetName()
          Returns true if field name is set (has been asigned a value) and false otherwise
 boolean isSetQuery()
          Returns true if field query is set (has been asigned a value) and false otherwise
 boolean isSetScope()
          Returns true if field scope is set (has been asigned a value) and false otherwise
 boolean isSetUpdateSequenceNum()
          Returns true if field updateSequenceNum 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 setFormat(QueryFormat format)
           
 void setFormatIsSet(boolean value)
           
 void setGuid(java.lang.String guid)
           
 void setGuidIsSet(boolean value)
           
 void setName(java.lang.String name)
           
 void setNameIsSet(boolean value)
           
 void setQuery(java.lang.String query)
           
 void setQueryIsSet(boolean value)
           
 void setScope(SavedSearchScope scope)
           
 void setScopeIsSet(boolean value)
           
 void setUpdateSequenceNum(int updateSequenceNum)
           
 void setUpdateSequenceNumIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetFormat()
           
 void unsetGuid()
           
 void unsetName()
           
 void unsetQuery()
           
 void unsetScope()
           
 void unsetUpdateSequenceNum()
           
 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

SavedSearch

public SavedSearch()

SavedSearch

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

Method Detail

deepCopy

public SavedSearch 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<SavedSearch>

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<SavedSearch>

getGuid

public java.lang.String getGuid()

setGuid

public void setGuid(java.lang.String guid)

unsetGuid

public void unsetGuid()

isSetGuid

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


setGuidIsSet

public void setGuidIsSet(boolean value)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

unsetName

public void unsetName()

isSetName

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


setNameIsSet

public void setNameIsSet(boolean value)

getQuery

public java.lang.String getQuery()

setQuery

public void setQuery(java.lang.String query)

unsetQuery

public void unsetQuery()

isSetQuery

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


setQueryIsSet

public void setQueryIsSet(boolean value)

getFormat

public QueryFormat getFormat()
See Also:
QueryFormat

setFormat

public void setFormat(QueryFormat format)
See Also:
QueryFormat

unsetFormat

public void unsetFormat()

isSetFormat

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


setFormatIsSet

public void setFormatIsSet(boolean value)

getUpdateSequenceNum

public int getUpdateSequenceNum()

setUpdateSequenceNum

public void setUpdateSequenceNum(int updateSequenceNum)

unsetUpdateSequenceNum

public void unsetUpdateSequenceNum()

isSetUpdateSequenceNum

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


setUpdateSequenceNumIsSet

public void setUpdateSequenceNumIsSet(boolean value)

getScope

public SavedSearchScope getScope()

setScope

public void setScope(SavedSearchScope scope)

unsetScope

public void unsetScope()

isSetScope

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


setScopeIsSet

public void setScopeIsSet(boolean value)

equals

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

equals

public boolean equals(SavedSearch that)

hashCode

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

compareTo

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

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<SavedSearch>
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<SavedSearch>
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