本文整理了Java中com.amazonaws.services.dynamodbv2.model.GlobalSecondaryIndex.getIndexName()
方法的一些代码示例,展示了GlobalSecondaryIndex.getIndexName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GlobalSecondaryIndex.getIndexName()
方法的具体详情如下:
包路径:com.amazonaws.services.dynamodbv2.model.GlobalSecondaryIndex
类名称:GlobalSecondaryIndex
方法名:getIndexName
[英]The name of the global secondary index. The name must be unique among all other indexes on this table.
[中]全局二级索引的名称。该名称在该表上的所有其他索引中必须是唯一的。
代码示例来源:origin: aws/aws-sdk-java
/**
* 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 (getIndexName() != null)
sb.append("IndexName: ").append(getIndexName()).append(",");
if (getKeySchema() != null)
sb.append("KeySchema: ").append(getKeySchema()).append(",");
if (getProjection() != null)
sb.append("Projection: ").append(getProjection()).append(",");
if (getProvisionedThroughput() != null)
sb.append("ProvisionedThroughput: ").append(getProvisionedThroughput());
sb.append("}");
return sb.toString();
}
代码示例来源:origin: aws/aws-sdk-java
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode());
hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode());
hashCode = prime * hashCode + ((getProjection() == null) ? 0 : getProjection().hashCode());
hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode());
return hashCode;
}
代码示例来源:origin: aws/aws-sdk-java
/**
* Marshall the given parameter object.
*/
public void marshall(GlobalSecondaryIndex globalSecondaryIndex, ProtocolMarshaller protocolMarshaller) {
if (globalSecOndaryIndex== null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(globalSecondaryIndex.getIndexName(), INDEXNAME_BINDING);
protocolMarshaller.marshall(globalSecondaryIndex.getKeySchema(), KEYSCHEMA_BINDING);
protocolMarshaller.marshall(globalSecondaryIndex.getProjection(), PROJECTION_BINDING);
protocolMarshaller.marshall(globalSecondaryIndex.getProvisionedThroughput(), PROVISIONEDTHROUGHPUT_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
代码示例来源:origin: aws/aws-sdk-java
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GlobalSecOndaryIndex== false)
return false;
GlobalSecondaryIndex other = (GlobalSecondaryIndex) obj;
if (other.getIndexName() == null ^ this.getIndexName() == null)
return false;
if (other.getIndexName() != null && other.getIndexName().equals(this.getIndexName()) == false)
return false;
if (other.getKeySchema() == null ^ this.getKeySchema() == null)
return false;
if (other.getKeySchema() != null && other.getKeySchema().equals(this.getKeySchema()) == false)
return false;
if (other.getProjection() == null ^ this.getProjection() == null)
return false;
if (other.getProjection() != null && other.getProjection().equals(this.getProjection()) == false)
return false;
if (other.getProvisionedThroughput() == null ^ this.getProvisionedThroughput() == null)
return false;
if (other.getProvisionedThroughput() != null && other.getProvisionedThroughput().equals(this.getProvisionedThroughput()) == false)
return false;
return true;
}
代码示例来源:origin: aws/aws-sdk-java
/**
* Gets the global secondary index.
* @param indexName The index name.
* @return The global secondary index or null.
*/
public GlobalSecondaryIndex globalSecondaryIndex(final String indexName) {
if (!globalSecondaryIndexes.containsKey(indexName)) {
return null;
}
final GlobalSecondaryIndex gsi = globalSecondaryIndexes.get(indexName);
final GlobalSecondaryIndex copy = new GlobalSecondaryIndex().withIndexName(gsi.getIndexName());
copy.withProjection(new Projection().withProjectionType(gsi.getProjection().getProjectionType()));
for (final KeySchemaElement key : gsi.getKeySchema()) {
copy.withKeySchema(new KeySchemaElement(key.getAttributeName(), key.getKeyType()));
}
return copy;
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* 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 (getIndexName() != null)
sb.append("IndexName: " + getIndexName() + ",");
if (getKeySchema() != null)
sb.append("KeySchema: " + getKeySchema() + ",");
if (getProjection() != null)
sb.append("Projection: " + getProjection() + ",");
if (getProvisionedThroughput() != null)
sb.append("ProvisionedThroughput: " + getProvisionedThroughput());
sb.append("}");
return sb.toString();
}
代码示例来源:origin: aws-amplify/aws-sdk-android
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode());
hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode());
hashCode = prime * hashCode + ((getProjection() == null) ? 0 : getProjection().hashCode());
hashCode = prime
* hashCode
+ ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode());
return hashCode;
}
代码示例来源:origin: aws-amplify/aws-sdk-android
GlobalSecondaryIndex other = (GlobalSecondaryIndex) obj;
if (other.getIndexName() == null ^ this.getIndexName() == null)
return false;
if (other.getIndexName() != null
&& other.getIndexName().equals(this.getIndexName()) == false)
return false;
if (other.getKeySchema() == null ^ this.getKeySchema() == null)
代码示例来源:origin: aws-amplify/aws-sdk-android
gsi = existingGsi;
if (!gsiName.equals(existingGsi.getIndexName())) {
throw new IllegalStateException(
"Found invalid state of an existing GlobalSecondaryIndex object " +
代码示例来源:origin: aws-amplify/aws-sdk-android
public void marshall(GlobalSecondaryIndex globalSecondaryIndex, AwsJsonWriter jsonWriter)
throws Exception {
jsonWriter.beginObject();
if (globalSecondaryIndex.getIndexName() != null) {
String indexName = globalSecondaryIndex.getIndexName();
jsonWriter.name("IndexName");
jsonWriter.value(indexName);
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
/**
* 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 (getIndexName() != null)
sb.append("IndexName: ").append(getIndexName()).append(",");
if (getKeySchema() != null)
sb.append("KeySchema: ").append(getKeySchema()).append(",");
if (getProjection() != null)
sb.append("Projection: ").append(getProjection()).append(",");
if (getProvisionedThroughput() != null)
sb.append("ProvisionedThroughput: ").append(getProvisionedThroughput());
sb.append("}");
return sb.toString();
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getIndexName() == null) ? 0 : getIndexName().hashCode());
hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode());
hashCode = prime * hashCode + ((getProjection() == null) ? 0 : getProjection().hashCode());
hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode());
return hashCode;
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
/**
* Marshall the given parameter object.
*/
public void marshall(GlobalSecondaryIndex globalSecondaryIndex, ProtocolMarshaller protocolMarshaller) {
if (globalSecOndaryIndex== null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(globalSecondaryIndex.getIndexName(), INDEXNAME_BINDING);
protocolMarshaller.marshall(globalSecondaryIndex.getKeySchema(), KEYSCHEMA_BINDING);
protocolMarshaller.marshall(globalSecondaryIndex.getProjection(), PROJECTION_BINDING);
protocolMarshaller.marshall(globalSecondaryIndex.getProvisionedThroughput(), PROVISIONEDTHROUGHPUT_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GlobalSecOndaryIndex== false)
return false;
GlobalSecondaryIndex other = (GlobalSecondaryIndex) obj;
if (other.getIndexName() == null ^ this.getIndexName() == null)
return false;
if (other.getIndexName() != null && other.getIndexName().equals(this.getIndexName()) == false)
return false;
if (other.getKeySchema() == null ^ this.getKeySchema() == null)
return false;
if (other.getKeySchema() != null && other.getKeySchema().equals(this.getKeySchema()) == false)
return false;
if (other.getProjection() == null ^ this.getProjection() == null)
return false;
if (other.getProjection() != null && other.getProjection().equals(this.getProjection()) == false)
return false;
if (other.getProvisionedThroughput() == null ^ this.getProvisionedThroughput() == null)
return false;
if (other.getProvisionedThroughput() != null && other.getProvisionedThroughput().equals(this.getProvisionedThroughput()) == false)
return false;
return true;
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb
/**
* Gets the global secondary index.
* @param indexName The index name.
* @return The global secondary index or null.
*/
public GlobalSecondaryIndex globalSecondaryIndex(final String indexName) {
if (!globalSecondaryIndexes.containsKey(indexName)) {
return null;
}
final GlobalSecondaryIndex gsi = globalSecondaryIndexes.get(indexName);
final GlobalSecondaryIndex copy = new GlobalSecondaryIndex().withIndexName(gsi.getIndexName());
copy.withProjection(new Projection().withProjectionType(gsi.getProjection().getProjectionType()));
for (final KeySchemaElement key : gsi.getKeySchema()) {
copy.withKeySchema(new KeySchemaElement(key.getAttributeName(), key.getKeyType()));
}
return copy;
}