com.evernote.edam.type
Class LazyMap

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

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

A structure that wraps a map of name/value pairs whose values are not always present in the structure in order to reduce space when obtaining batches of entities that contain the map. When the server provides the client with a LazyMap, it will fill in either the keysOnly field or the fullMap field, but never both, based on the API and parameters. When a client provides a LazyMap to the server as part of an update to an object, the server will only update the LazyMap if the fullMap field is set. If the fullMap field is not set, the server will not make any changes to the map. Check the API documentation of the individual calls involving the LazyMap for full details including the constraints of the names and values of the map.

keysOnly
The set of keys for the map. This field is ignored by the server when set.
fullMap
The complete map, including all keys and values.

See Also:
Serialized Form

Constructor Summary
LazyMap()
           
LazyMap(LazyMap other)
          Performs a deep copy on other.
 
Method Summary
 void addToKeysOnly(java.lang.String elem)
           
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(LazyMap other)
           
 LazyMap deepCopy()
          Creates a deep copy of the object.
 boolean equals(LazyMap that)
           
 boolean equals(java.lang.Object that)
           
 java.util.Map<java.lang.String,java.lang.String> getFullMap()
           
 int getFullMapSize()
           
 java.util.Set<java.lang.String> getKeysOnly()
           
 java.util.Iterator<java.lang.String> getKeysOnlyIterator()
           
 int getKeysOnlySize()
           
 int hashCode()
           
 boolean isSetFullMap()
          Returns true if field fullMap is set (has been asigned a value) and false otherwise
 boolean isSetKeysOnly()
          Returns true if field keysOnly is set (has been asigned a value) and false otherwise
 void putToFullMap(java.lang.String key, java.lang.String val)
           
 void read(com.evernote.thrift.protocol.TProtocol iprot)
          Reads an instance of the object from the given protocol.
 void setFullMap(java.util.Map<java.lang.String,java.lang.String> fullMap)
           
 void setFullMapIsSet(boolean value)
           
 void setKeysOnly(java.util.Set<java.lang.String> keysOnly)
           
 void setKeysOnlyIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetFullMap()
           
 void unsetKeysOnly()
           
 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

LazyMap

public LazyMap()

LazyMap

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

Method Detail

deepCopy

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

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

getKeysOnlySize

public int getKeysOnlySize()

getKeysOnlyIterator

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

addToKeysOnly

public void addToKeysOnly(java.lang.String elem)

getKeysOnly

public java.util.Set<java.lang.String> getKeysOnly()

setKeysOnly

public void setKeysOnly(java.util.Set<java.lang.String> keysOnly)

unsetKeysOnly

public void unsetKeysOnly()

isSetKeysOnly

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


setKeysOnlyIsSet

public void setKeysOnlyIsSet(boolean value)

getFullMapSize

public int getFullMapSize()

putToFullMap

public void putToFullMap(java.lang.String key,
                         java.lang.String val)

getFullMap

public java.util.Map<java.lang.String,java.lang.String> getFullMap()

setFullMap

public void setFullMap(java.util.Map<java.lang.String,java.lang.String> fullMap)

unsetFullMap

public void unsetFullMap()

isSetFullMap

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


setFullMapIsSet

public void setFullMapIsSet(boolean value)

equals

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

equals

public boolean equals(LazyMap that)

hashCode

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

compareTo

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

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