[英]How to sort the data in Amazon dynamodb using java
如何使用java在amazon dynamodb中按升序或降序對countryCode
列數據進行排序
如何在代碼中使用SortOrder enum
。
SortOrder
枚舉在com.amazonaws.services.codedeploy.model.SortOrder
包中com.amazonaws.services.codedeploy.model.SortOrder
。
import java.io.Serializable;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAutoGeneratedKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;
@DynamoDBTable(tableName = "cd_country")
public class Country implements Serializable {
private static final long serialVersionUID = 5698425418072128936L;
@DynamoDBAutoGeneratedKey
@DynamoDBHashKey
private String countryId;
private String countryCode;
private String countryName;
private Long isActive;
public String getCountryId() {
return countryId;
}
public void setCountryId(String countryId) {
this.countryId = countryId;
}
public String getCountryCode() {
return countryCode;
}
public void setCountryCode(String countryCode) {
this.countryCode = countryCode;
}
public String getCountryName() {
return countryName;
}
public void setCountryName(String countryName) {
this.countryName = countryName;
}
public Long getIsActive() {
return isActive;
}
public void setIsActive(Long isActive) {
this.isActive = isActive;
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.