@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProjectionType() == null) ? 0 : getProjectionType().hashCode()); hashCode = prime * hashCode + ((getNonKeyAttributes() == null) ? 0 : getNonKeyAttributes().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getProjectionType() != null) sb.append("ProjectionType: ").append(getProjectionType()).append(","); if (getNonKeyAttributes() != null) sb.append("NonKeyAttributes: ").append(getNonKeyAttributes()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Projection == false) return false; Projection other = (Projection) obj; if (other.getProjectionType() == null ^ this.getProjectionType() == null) return false; if (other.getProjectionType() != null && other.getProjectionType().equals(this.getProjectionType()) == false) return false; if (other.getNonKeyAttributes() == null ^ this.getNonKeyAttributes() == null) return false; if (other.getNonKeyAttributes() != null && other.getNonKeyAttributes().equals(this.getNonKeyAttributes()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Projection projection, ProtocolMarshaller protocolMarshaller) { if (projection == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(projection.getProjectionType(), PROJECTIONTYPE_BINDING); protocolMarshaller.marshall(projection.getNonKeyAttributes(), NONKEYATTRIBUTES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProjectionType() == null) ? 0 : getProjectionType().hashCode()); hashCode = prime * hashCode + ((getNonKeyAttributes() == null) ? 0 : getNonKeyAttributes().hashCode()); return hashCode; }
if (getNonKeyAttributes() == null) { this.nonKeyAttributes = new java.util.ArrayList<String>(nonKeyAttributes.length);
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getProjectionType() != null) sb.append("ProjectionType: " + getProjectionType() + ","); if (getNonKeyAttributes() != null) sb.append("NonKeyAttributes: " + getNonKeyAttributes()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Projection == false) return false; Projection other = (Projection) obj; if (other.getProjectionType() == null ^ this.getProjectionType() == null) return false; if (other.getProjectionType() != null && other.getProjectionType().equals(this.getProjectionType()) == false) return false; if (other.getNonKeyAttributes() == null ^ this.getNonKeyAttributes() == null) return false; if (other.getNonKeyAttributes() != null && other.getNonKeyAttributes().equals(this.getNonKeyAttributes()) == false) return false; return true; } }
public void marshall(Projection projection, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (projection.getProjectionType() != null) { String projectionType = projection.getProjectionType(); jsonWriter.name("ProjectionType"); jsonWriter.value(projectionType); } if (projection.getNonKeyAttributes() != null) { java.util.List<String> nonKeyAttributes = projection.getNonKeyAttributes(); jsonWriter.name("NonKeyAttributes"); jsonWriter.beginArray(); for (String nonKeyAttributesItem : nonKeyAttributes) { if (nonKeyAttributesItem != null) { jsonWriter.value(nonKeyAttributesItem); } } jsonWriter.endArray(); } jsonWriter.endObject(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProjectionType() == null) ? 0 : getProjectionType().hashCode()); hashCode = prime * hashCode + ((getNonKeyAttributes() == null) ? 0 : getNonKeyAttributes().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getProjectionType() != null) sb.append("ProjectionType: ").append(getProjectionType()).append(","); if (getNonKeyAttributes() != null) sb.append("NonKeyAttributes: ").append(getNonKeyAttributes()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Projection == false) return false; Projection other = (Projection) obj; if (other.getProjectionType() == null ^ this.getProjectionType() == null) return false; if (other.getProjectionType() != null && other.getProjectionType().equals(this.getProjectionType()) == false) return false; if (other.getNonKeyAttributes() == null ^ this.getNonKeyAttributes() == null) return false; if (other.getNonKeyAttributes() != null && other.getNonKeyAttributes().equals(this.getNonKeyAttributes()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Projection projection, ProtocolMarshaller protocolMarshaller) { if (projection == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(projection.getProjectionType(), PROJECTIONTYPE_BINDING); protocolMarshaller.marshall(projection.getNonKeyAttributes(), NONKEYATTRIBUTES_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
private static boolean areGsisSameConfiguration(final GlobalSecondaryIndexDescription g1, final GlobalSecondaryIndexDescription g2) { if (g1 == null ^ g2 == null) { return false; } if (g1 == g2) { return true; } final EqualsBuilder builder = new EqualsBuilder(); builder.append(g1.getIndexName(), g2.getIndexName()); builder.append(g1.getKeySchema(), g2.getKeySchema()); builder.append(g1.getProjection().getProjectionType(), g2.getProjection().getProjectionType()); builder.append(g1.getProvisionedThroughput().getReadCapacityUnits(), g2.getProvisionedThroughput().getReadCapacityUnits()); builder.append(g1.getProvisionedThroughput().getWriteCapacityUnits(), g2.getProvisionedThroughput().getWriteCapacityUnits()); final Set<String> projectionNonKeyAttributesG1 = new HashSet<>(Optional.ofNullable(g1.getProjection().getNonKeyAttributes()).orElse(Collections.emptyList())); final Set<String> projectionNonKeyAttributesG2 = new HashSet<>(Optional.ofNullable(g2.getProjection().getNonKeyAttributes()).orElse(Collections.emptyList())); builder.append(projectionNonKeyAttributesG1, projectionNonKeyAttributesG2); return builder.build(); }
final List<String> nonKeyAttributes = globalSecondaryIndex.getProjection().getNonKeyAttributes(); for (final String attributeName : nonKeyAttributes) { addColumnFromNonKeyAttribute(globalSecondaryIndex.getIndexName(), table, attributeName); final List<String> nonKeyAttributes = localSecondaryIndex.getProjection().getNonKeyAttributes(); for (final String attributeName : nonKeyAttributes) { addColumnFromNonKeyAttribute(localSecondaryIndex.getIndexName(), table, attributeName);