Class Projection

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

public class Projection extends Object implements Serializable, Cloneable

Represents attributes that are copied (projected) from the table into an index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

See Also:
  • Constructor Details

    • Projection

      public Projection()
  • Method Details

    • setProjectionType

      public void setProjectionType(String projectionType)

      The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

      Parameters:
      projectionType - The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

      See Also:
    • getProjectionType

      public String getProjectionType()

      The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

      Returns:
      The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

      See Also:
    • withProjectionType

      public Projection withProjectionType(String projectionType)

      The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

      Parameters:
      projectionType - The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

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

      public void setProjectionType(ProjectionType projectionType)

      The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

      Parameters:
      projectionType - The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

      See Also:
    • withProjectionType

      public Projection withProjectionType(ProjectionType projectionType)

      The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

      Parameters:
      projectionType - The set of attributes that are projected into the index:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

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

      public List<String> getNonKeyAttributes()

      Represents the non-key attribute names which will be projected into the index.

      For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

      Returns:
      Represents the non-key attribute names which will be projected into the index.

      For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

    • setNonKeyAttributes

      public void setNonKeyAttributes(Collection<String> nonKeyAttributes)

      Represents the non-key attribute names which will be projected into the index.

      For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

      Parameters:
      nonKeyAttributes - Represents the non-key attribute names which will be projected into the index.

      For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

    • withNonKeyAttributes

      public Projection withNonKeyAttributes(String... nonKeyAttributes)

      Represents the non-key attribute names which will be projected into the index.

      For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

      NOTE: This method appends the values to the existing list (if any). Use setNonKeyAttributes(java.util.Collection) or withNonKeyAttributes(java.util.Collection) if you want to override the existing values.

      Parameters:
      nonKeyAttributes - Represents the non-key attribute names which will be projected into the index.

      For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

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

      public Projection withNonKeyAttributes(Collection<String> nonKeyAttributes)

      Represents the non-key attribute names which will be projected into the index.

      For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

      Parameters:
      nonKeyAttributes - Represents the non-key attribute names which will be projected into the index.

      For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • 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 Projection clone()
      Overrides:
      clone in class Object