• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DynamoDBIndexRangeKey类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey的典型用法代码示例。如果您正苦于以下问题:Java DynamoDBIndexRangeKey类的具体用法?Java DynamoDBIndexRangeKey怎么用?Java DynamoDBIndexRangeKey使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DynamoDBIndexRangeKey类属于com.amazonaws.services.dynamodbv2.datamodeling包,在下文中一共展示了DynamoDBIndexRangeKey类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createTable

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
/***
 * Create the table and the associated indexes if it does not already exist
 * @param reflections
 * @param clazz
 */
private CreateTableResult createTable(Class<?> clazz) {

	final String tableName = this.getClassAnnotationValue(clazz, DynamoDBTable.class, String.class, "tableName");
	
	final Method hashKeyMember = this.getMethodForAnnotation(clazz, DynamoDBHashKey.class);
	final DynamoDBHashKey hashKeyAnno = hashKeyMember.getAnnotation(DynamoDBHashKey.class);
	final String hashKeyName = this.getAnnotationValue(hashKeyAnno, "attributeName", String.class);
	String rangeKeyName = null;
	
	
	final Method rangeKeyMember = this.getMethodForAnnotation(clazz, DynamoDBRangeKey.class);
	if(rangeKeyMember!=null){
		DynamoDBRangeKey rangeKeyAnno = rangeKeyMember.getAnnotation(DynamoDBRangeKey.class);	
		rangeKeyName = this.getAnnotationValue(rangeKeyAnno, "attributeName", String.class);
	}
	final Set<Method> hashKeyIndexFields = this.getMethodsAnnotatedWith(DynamoDBIndexHashKey.class, clazz);
	final Set<Method> rangeKeyIndexFields = this.getMethodsAnnotatedWith(DynamoDBIndexRangeKey.class, clazz);
	
	final Map<String, GlobalIndex> globalIndexes = this.createGlobalIndexes(hashKeyIndexFields, rangeKeyIndexFields, clazz);
	final Map<String, RangeKeyIndexField> localIndexes = this.createLocalIndexMap(rangeKeyIndexFields);
	
	final CreateTableRequest tableRequest = this.createCreateTableRequest(tableName, hashKeyName, rangeKeyName, globalIndexes, localIndexes);
	final CreateTableResult result = this.client.createTable(tableRequest);
	return result;
}
 
开发者ID:shagwood,项目名称:micro-genie,代码行数:31,代码来源:DynamoAdmin.java


示例2: getIndexFooRangeKeyWithFakeName

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DoNotEncrypt
@DynamoDBIndexRangeKey (
		localSecondaryIndexName = "index_foo",
		attributeName = "indexFooRangeKey"
)
public Double getIndexFooRangeKeyWithFakeName() {
    return indexFooRangeKey;
}
 
开发者ID:awslabs,项目名称:aws-dynamodb-encryption-java,代码行数:9,代码来源:IndexRangeKeyTestClass.java


示例3: getIndexBarRangeKey

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DoNotEncrypt
@DynamoDBIndexRangeKey (
		localSecondaryIndexName = "index_bar"
)
public Double getIndexBarRangeKey() {
    return indexBarRangeKey;
}
 
开发者ID:awslabs,项目名称:aws-dynamodb-encryption-java,代码行数:8,代码来源:IndexRangeKeyTestClass.java


示例4: getMultipleIndexRangeKey

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DoNotEncrypt
@DynamoDBIndexRangeKey (
		localSecondaryIndexNames = {"index_foo_copy", "index_bar_copy"}
)
public Double getMultipleIndexRangeKey() {
    return multipleIndexRangeKey;
}
 
开发者ID:awslabs,项目名称:aws-dynamodb-encryption-java,代码行数:8,代码来源:IndexRangeKeyTestClass.java


示例5: getPrimaryRangeKey

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBRangeKey
@DynamoDBIndexRangeKey (
        globalSecondaryIndexNames = {"GSI-index-hash-primary-range"},
        localSecondaryIndexName = "LSI-primary-range"
)
public String getPrimaryRangeKey() {
    return primaryRangeKey;
}
 
开发者ID:awslabs,项目名称:aws-dynamodb-encryption-java,代码行数:9,代码来源:MapperQueryExpressionCryptoTest.java


示例6: getIndexRangeKey

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBIndexRangeKey (
        globalSecondaryIndexNames = {
                "GSI-primary-hash-index-range-1",
                "GSI-index-hash-index-range-1",
                "GSI-index-hash-index-range-2"},
        localSecondaryIndexNames = {"LSI-index-range-1", "LSI-index-range-2"}
)
public String getIndexRangeKey() {
    return indexRangeKey;
}
 
开发者ID:awslabs,项目名称:aws-dynamodb-encryption-java,代码行数:11,代码来源:MapperQueryExpressionCryptoTest.java


示例7: getAnotherIndexRangeKey

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBIndexRangeKey (
        localSecondaryIndexName = "LSI-index-range-3",
        globalSecondaryIndexName = "GSI-primary-hash-index-range-2"
)
public String getAnotherIndexRangeKey() {
    return anotherIndexRangeKey;
}
 
开发者ID:awslabs,项目名称:aws-dynamodb-encryption-java,代码行数:8,代码来源:MapperQueryExpressionCryptoTest.java


示例8: getIsbn

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBIndexHashKey(attributeName="isbn", globalSecondaryIndexNames={GLOBAL_INDEX_ISBN})
@DynamoDBIndexRangeKey(attributeName="isbn", globalSecondaryIndexName=GLOBAL_INDEX_LIBRARY_ISBN)
public String getIsbn() {
	return isbn;
}
 
开发者ID:shagwood,项目名称:micro-genie,代码行数:6,代码来源:Book.java


示例9: getIndexRangeKeyPropertyNames

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@Override
public Set<String> getIndexRangeKeyPropertyNames() {
	final Set<String> propertyNames = new HashSet<String>();
	ReflectionUtils.doWithMethods(getJavaType(), new MethodCallback() {
		public void doWith(Method method) {
			if (method.getAnnotation(DynamoDBIndexRangeKey.class) != null) {
				if ((method.getAnnotation(DynamoDBIndexRangeKey.class).localSecondaryIndexName() != null && method
						.getAnnotation(DynamoDBIndexRangeKey.class).localSecondaryIndexName().trim().length() > 0)
						|| (method.getAnnotation(DynamoDBIndexRangeKey.class).localSecondaryIndexNames() != null && method
								.getAnnotation(DynamoDBIndexRangeKey.class).localSecondaryIndexNames().length > 0)) {
					propertyNames.add(getPropertyNameForAccessorMethod(method));
				}
			}
		}
	});
	ReflectionUtils.doWithFields(getJavaType(), new FieldCallback() {
		public void doWith(Field field) {
			if (field.getAnnotation(DynamoDBIndexRangeKey.class) != null) {
				if ((field.getAnnotation(DynamoDBIndexRangeKey.class).localSecondaryIndexName() != null && field
						.getAnnotation(DynamoDBIndexRangeKey.class).localSecondaryIndexName().trim().length() > 0)
						|| (field.getAnnotation(DynamoDBIndexRangeKey.class).localSecondaryIndexNames() != null && field
								.getAnnotation(DynamoDBIndexRangeKey.class).localSecondaryIndexNames().length > 0)) {
					propertyNames.add(getPropertyNameForField(field));
				}
			}
		}
	});
	return propertyNames;
}
 
开发者ID:michaellavelle,项目名称:spring-data-dynamodb,代码行数:30,代码来源:DynamoDBHashAndRangeKeyExtractingEntityMetadataImpl.java


示例10: getOverriddenAttributeName

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
public String getOverriddenAttributeName(Method method) {

		if (method != null) {
			if (method.getAnnotation(DynamoDBAttribute.class) != null
					&& StringUtils.isNotEmpty(method.getAnnotation(DynamoDBAttribute.class).attributeName())) {
				return method.getAnnotation(DynamoDBAttribute.class).attributeName();
			}
			if (method.getAnnotation(DynamoDBHashKey.class) != null
					&& StringUtils.isNotEmpty(method.getAnnotation(DynamoDBHashKey.class).attributeName())) {
				return method.getAnnotation(DynamoDBHashKey.class).attributeName();
			}
			if (method.getAnnotation(DynamoDBRangeKey.class) != null
					&& StringUtils.isNotEmpty(method.getAnnotation(DynamoDBRangeKey.class).attributeName())) {
				return method.getAnnotation(DynamoDBRangeKey.class).attributeName();
			}
			if (method.getAnnotation(DynamoDBIndexRangeKey.class) != null
					&& StringUtils.isNotEmpty(method.getAnnotation(DynamoDBIndexRangeKey.class).attributeName())) {
				return method.getAnnotation(DynamoDBIndexRangeKey.class).attributeName();
			}
			if (method.getAnnotation(DynamoDBIndexHashKey.class) != null
					&& StringUtils.isNotEmpty(method.getAnnotation(DynamoDBIndexHashKey.class).attributeName())) {
				return method.getAnnotation(DynamoDBIndexHashKey.class).attributeName();
			}
			if (method.getAnnotation(DynamoDBVersionAttribute.class) != null
					&& StringUtils.isNotEmpty(method.getAnnotation(DynamoDBVersionAttribute.class).attributeName())) {
				return method.getAnnotation(DynamoDBVersionAttribute.class).attributeName();
			}
		}
		return null;

	}
 
开发者ID:michaellavelle,项目名称:spring-data-dynamodb,代码行数:32,代码来源:DynamoDBEntityMetadataSupport.java


示例11: getTime

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBAttribute(attributeName="time") 
@DynamoDBIndexRangeKey(attributeName="time", globalSecondaryIndexName="by-time-index") 
public long getTime() {return time; }
 
开发者ID:fivedogit,项目名称:hn_firebase_listener,代码行数:4,代码来源:HNItemItem.java


示例12: getLsiRangeKey

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBIndexRangeKey(localSecondaryIndexName = "LSI")
public String getLsiRangeKey() {
    return lsiRangeKey;
}
 
开发者ID:awslabs,项目名称:aws-dynamodb-encryption-java,代码行数:5,代码来源:MapperQueryExpressionCryptoTest.java


示例13: getIsbn

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBIndexHashKey(attributeName="isbn", globalSecondaryIndexNames={GLOBAL_INDEX_ISBN, GLOBAL_INDEX_ISBN_STATUS})
@DynamoDBIndexRangeKey(attributeName="isbn", globalSecondaryIndexNames={GLOBAL_INDEX_LIBRARY_ISBN})
public String getIsbn() {
	return isbn;
}
 
开发者ID:shagwood,项目名称:micro-genie,代码行数:6,代码来源:Book.java


示例14: getStatus

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBIndexRangeKey(attributeName="status", globalSecondaryIndexName=GLOBAL_INDEX_ISBN_STATUS)
public String getStatus() {
	return status;
}
 
开发者ID:shagwood,项目名称:micro-genie,代码行数:5,代码来源:Book.java


示例15: getPosttimestamp

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBRangeKey(attributeName="PostTimestamp")
@DynamoDBIndexRangeKey(globalSecondaryIndexNames={"CraftId-PostTimestamp-index","FandomId-PostTimestamp-index"}, attributeName="PostTimestamp")
public String getPosttimestamp() {
	return posttimestamp;
}
 
开发者ID:Moliholy,项目名称:Fancraft,代码行数:6,代码来源:Post.java


示例16: getMessage

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey; //导入依赖的package包/类
@DynamoDBIndexRangeKey(attributeName = "Message")
public String getMessage() {
	return message;
}
 
开发者ID:michaellavelle,项目名称:spring-data-dynamodb-demo,代码行数:5,代码来源:Thread.java



注:本文中的com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBIndexRangeKey类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ProjectionConstants类代码示例发布时间:2022-05-23
下一篇:
Java DataBuffer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap