com.amazonaws.mobileconnectors.cognito
Class Record

java.lang.Object
  extended by com.amazonaws.mobileconnectors.cognito.Record

public final class Record
extends java.lang.Object

A Record is the element stored in a Dataset. There can be up to 1k records or up to 1 MB in size in a Dataset.


Nested Class Summary
static class Record.Builder
          A Builder class that helps build an immutable Record object.
 
Method Summary
 java.util.Date getDeviceLastModifiedDate()
          Gets the local timestamp of this record when it was last modified.
 java.lang.String getKey()
          Gets the key of this record.
 java.lang.String getLastModifiedBy()
          Gets the identifier of the user or device which modified this record last.
 java.util.Date getLastModifiedDate()
          Gets the server timestamp of this record when it was last modified.
 long getSyncCount()
          Gets the sync count of this record.
 java.lang.String getValue()
          Gets the value of this record.
 boolean isDeleted()
          Gets whether the record is marked as deleted.
 boolean isModified()
          Gets a flag that indicates whether this record is modified locally but hasn't been synced.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getKey

public java.lang.String getKey()
Gets the key of this record. It's a non empty string.

Returns:
key of this record

getValue

public java.lang.String getValue()
Gets the value of this record. If it's null, then the record is considered as deleted.

Returns:
nullable String value of this record

getSyncCount

public long getSyncCount()
Gets the sync count of this record. It's equivalent to the version of this record. It's a increasing non negative long number. The value is returned from server. Do not set this value arbitrarily, or else update may fail.

Returns:
sync count of this record

getLastModifiedDate

public java.util.Date getLastModifiedDate()
Gets the server timestamp of this record when it was last modified.

Returns:
the server timestamp when it was last modified.

getLastModifiedBy

public java.lang.String getLastModifiedBy()
Gets the identifier of the user or device which modified this record last.

Returns:
an identifier of the user or device which made the last modification

getDeviceLastModifiedDate

public java.util.Date getDeviceLastModifiedDate()
Gets the local timestamp of this record when it was last modified.

Returns:
the local timestamp of the device that made the last modification

isModified

public boolean isModified()
Gets a flag that indicates whether this record is modified locally but hasn't been synced.

Returns:
the modified flag of this record

isDeleted

public boolean isDeleted()
Gets whether the record is marked as deleted. True if value is null, false otherwise.

Returns:
true if the record is marked as deleted, false otherwise.

toString

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


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.