Class StreamRecord

java.lang.Object
com.amazonaws.services.dynamodbv2.model.StreamRecord
All Implemented Interfaces:
Serializable, Cloneable

public class StreamRecord extends Object implements Serializable, Cloneable

A description of a single data modification that was performed on an item in a DynamoDB table.

See Also:
  • Constructor Details

    • StreamRecord

      public StreamRecord()
  • Method Details

    • getKeys

      public Map<String,AttributeValue> getKeys()

      The primary key attribute(s) for the DynamoDB item that was modified.

      Returns:
      The primary key attribute(s) for the DynamoDB item that was modified.
    • setKeys

      public void setKeys(Map<String,AttributeValue> keys)

      The primary key attribute(s) for the DynamoDB item that was modified.

      Parameters:
      keys - The primary key attribute(s) for the DynamoDB item that was modified.
    • withKeys

      public StreamRecord withKeys(Map<String,AttributeValue> keys)

      The primary key attribute(s) for the DynamoDB item that was modified.

      Parameters:
      keys - The primary key attribute(s) for the DynamoDB item that was modified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • addKeysEntry

      public StreamRecord addKeysEntry(String key, AttributeValue value)
    • clearKeysEntries

      public StreamRecord clearKeysEntries()
      Removes all the entries added into Keys. <p> Returns a reference to this object so that method calls can be chained together.
    • getNewImage

      public Map<String,AttributeValue> getNewImage()

      The item in the DynamoDB table as it appeared after it was modified.

      Returns:
      The item in the DynamoDB table as it appeared after it was modified.
    • setNewImage

      public void setNewImage(Map<String,AttributeValue> newImage)

      The item in the DynamoDB table as it appeared after it was modified.

      Parameters:
      newImage - The item in the DynamoDB table as it appeared after it was modified.
    • withNewImage

      public StreamRecord withNewImage(Map<String,AttributeValue> newImage)

      The item in the DynamoDB table as it appeared after it was modified.

      Parameters:
      newImage - The item in the DynamoDB table as it appeared after it was modified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • addNewImageEntry

      public StreamRecord addNewImageEntry(String key, AttributeValue value)
    • clearNewImageEntries

      public StreamRecord clearNewImageEntries()
      Removes all the entries added into NewImage. <p> Returns a reference to this object so that method calls can be chained together.
    • getOldImage

      public Map<String,AttributeValue> getOldImage()

      The item in the DynamoDB table as it appeared before it was modified.

      Returns:
      The item in the DynamoDB table as it appeared before it was modified.
    • setOldImage

      public void setOldImage(Map<String,AttributeValue> oldImage)

      The item in the DynamoDB table as it appeared before it was modified.

      Parameters:
      oldImage - The item in the DynamoDB table as it appeared before it was modified.
    • withOldImage

      public StreamRecord withOldImage(Map<String,AttributeValue> oldImage)

      The item in the DynamoDB table as it appeared before it was modified.

      Parameters:
      oldImage - The item in the DynamoDB table as it appeared before it was modified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • addOldImageEntry

      public StreamRecord addOldImageEntry(String key, AttributeValue value)
    • clearOldImageEntries

      public StreamRecord clearOldImageEntries()
      Removes all the entries added into OldImage. <p> Returns a reference to this object so that method calls can be chained together.
    • setSequenceNumber

      public void setSequenceNumber(String sequenceNumber)

      The sequence number of the stream record.

      Parameters:
      sequenceNumber - The sequence number of the stream record.
    • getSequenceNumber

      public String getSequenceNumber()

      The sequence number of the stream record.

      Returns:
      The sequence number of the stream record.
    • withSequenceNumber

      public StreamRecord withSequenceNumber(String sequenceNumber)

      The sequence number of the stream record.

      Parameters:
      sequenceNumber - The sequence number of the stream record.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setSizeBytes

      public void setSizeBytes(Long sizeBytes)

      The size of the stream record, in bytes.

      Parameters:
      sizeBytes - The size of the stream record, in bytes.
    • getSizeBytes

      public Long getSizeBytes()

      The size of the stream record, in bytes.

      Returns:
      The size of the stream record, in bytes.
    • withSizeBytes

      public StreamRecord withSizeBytes(Long sizeBytes)

      The size of the stream record, in bytes.

      Parameters:
      sizeBytes - The size of the stream record, in bytes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setStreamViewType

      public void setStreamViewType(String streamViewType)

      The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      Parameters:
      streamViewType - The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      See Also:
    • getStreamViewType

      public String getStreamViewType()

      The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      Returns:
      The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      See Also:
    • withStreamViewType

      public StreamRecord withStreamViewType(String streamViewType)

      The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      Parameters:
      streamViewType - The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setStreamViewType

      public void setStreamViewType(StreamViewType streamViewType)

      The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      Parameters:
      streamViewType - The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      See Also:
    • withStreamViewType

      public StreamRecord withStreamViewType(StreamViewType streamViewType)

      The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      Parameters:
      streamViewType - The type of data from the modified DynamoDB item that was captured in this stream record:

      • KEYS_ONLY - only the key attributes of the modified item.

      • NEW_IMAGE - the entire item, as it appears after it was modified.

      • OLD_IMAGE - the entire item, as it appeared before it was modified.

      • NEW_AND_OLD_IMAGES — both the new and the old item images of the item.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public StreamRecord clone()
      Overrides:
      clone in class Object