if (attribute != null && !attribute.attributeName().isEmpty()) { return attribute.attributeName();
/** * Maps the attributes from the {@link DynamoDBFlattened} annotation. */ public Map<String,String> attributes() { final Map<String,String> attributes = new LinkedHashMap<String,String>(); for (final DynamoDBAttribute a : actualOf(DynamoDBFlattened.class).attributes()) { if (a.mappedBy().isEmpty() || a.attributeName().isEmpty()) { throw new DynamoDBMappingException("@DynamoDBFlattened must specify mappedBy and attributeName"); } else if (attributes.put(a.mappedBy(), a.attributeName()) != null) { throw new DynamoDBMappingException("@DynamoDBFlattened must not duplicate mappedBy=" + a.mappedBy()); } } if (attributes.isEmpty()) { throw new DynamoDBMappingException("@DynamoDBFlattened must specify one or more attributes"); } return attributes; }
@DynamoDBAttribute(attributeName="ISBN") public String getISBN() { return ISBN; } public void setISBN(String ISBN) { this.ISBN = ISBN; }
@DynamoDBAttribute(attributeName = "Authors") public Set<String> getBookAuthors() { return bookAuthors; } public void setBookAuthors(Set<String> bookAuthors) { this.bookAuthors = bookAuthors; }
@DynamoDBAttribute(attributeName="ISBN") public String getISBN() { return ISBN; } public void setISBN(String ISBN) { this.ISBN = ISBN;}
attributeName = attribute.attributeName(); if ( attributeName != null && attributeName.length() > 0 ) return cacheAttributeName(getter, attributeName);
/** * Maps the attributes from the {@link DynamoDBFlattened} annotation. */ public Map<String,String> attributes() { final Map<String,String> attributes = new LinkedHashMap<String,String>(); for (final DynamoDBAttribute a : actualOf(DynamoDBFlattened.class).attributes()) { if (a.mappedBy().isEmpty() || a.attributeName().isEmpty()) { throw new DynamoDBMappingException("@DynamoDBFlattened must specify mappedBy and attributeName"); } else if (attributes.put(a.mappedBy(), a.attributeName()) != null) { throw new DynamoDBMappingException("@DynamoDBFlattened must not duplicate mappedBy=" + a.mappedBy()); } } if (attributes.isEmpty()) { throw new DynamoDBMappingException("@DynamoDBFlattened must specify one or more attributes"); } return attributes; }
@DynamoDBAttribute(attributeName="PageCount") public int getPageCount() { return pageCount; } public void setPageCount(int pageCount) { this.pageCount = pageCount;}
public String getOverriddenAttributeName(Method method) { if (method != null) { if (method.getAnnotation(DynamoDBAttribute.class) != null && !StringUtils.isEmpty(method.getAnnotation(DynamoDBAttribute.class).attributeName())) { return method.getAnnotation(DynamoDBAttribute.class).attributeName(); } if (method.getAnnotation(DynamoDBHashKey.class) != null && !StringUtils.isEmpty(method.getAnnotation(DynamoDBHashKey.class).attributeName())) { return method.getAnnotation(DynamoDBHashKey.class).attributeName(); } if (method.getAnnotation(DynamoDBRangeKey.class) != null && !StringUtils.isEmpty(method.getAnnotation(DynamoDBRangeKey.class).attributeName())) { return method.getAnnotation(DynamoDBRangeKey.class).attributeName(); } if (method.getAnnotation(DynamoDBIndexRangeKey.class) != null && !StringUtils.isEmpty(method.getAnnotation(DynamoDBIndexRangeKey.class).attributeName())) { return method.getAnnotation(DynamoDBIndexRangeKey.class).attributeName(); } if (method.getAnnotation(DynamoDBIndexHashKey.class) != null && !StringUtils.isEmpty(method.getAnnotation(DynamoDBIndexHashKey.class).attributeName())) { return method.getAnnotation(DynamoDBIndexHashKey.class).attributeName(); } if (method.getAnnotation(DynamoDBVersionAttribute.class) != null && !StringUtils.isEmpty(method.getAnnotation(DynamoDBVersionAttribute.class).attributeName())) { return method.getAnnotation(DynamoDBVersionAttribute.class).attributeName(); } } return null; }
@DynamoDBAttribute(attributeName="Title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; }
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; }
@DynamoDBAttribute(attributeName="Description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; }
if (method != null) { if (method.getAnnotation(DynamoDBAttribute.class) != null && !StringUtils.isEmpty(method.getAnnotation(DynamoDBAttribute.class).attributeName())) { return Optional.of(method.getAnnotation(DynamoDBAttribute.class).attributeName()); if (field != null) { if (field.getAnnotation(DynamoDBAttribute.class) != null && !StringUtils.isEmpty(field.getAnnotation(DynamoDBAttribute.class).attributeName())) { return Optional.of(field.getAnnotation(DynamoDBAttribute.class).attributeName());
@DynamoDBAttribute(attributeName="BicycleType") public String getBicycleType() { return bicycleType; } public void setBicycleType(String bicycleType) { this.bicycleType = bicycleType; }
if (method != null) { if (method.getAnnotation(DynamoDBAttribute.class) != null && StringUtils.isNotEmpty(method.getAnnotation(DynamoDBAttribute.class).attributeName())) { return method.getAnnotation(DynamoDBAttribute.class).attributeName(); if (field != null) { if (field.getAnnotation(DynamoDBAttribute.class) != null && StringUtils.isNotEmpty(field.getAnnotation(DynamoDBAttribute.class).attributeName())) { return field.getAnnotation(DynamoDBAttribute.class).attributeName();
@DynamoDBAttribute(attributeName="Color") public Set<String> getColor() { return color; } public void setColor(Set<String> color) { this.color = color; }
if (attribute != null && !attribute.attributeName().isEmpty()) { return attribute.attributeName();
@DynamoDBAttribute(attributeName="Replies") public int getReplies() { return replies; } public void setReplies(int replies) { this.replies = replies; }
attributeName = attribute.attributeName(); if ( attributeName != null && attributeName.length() > 0 ) return cacheAttributeName(getter, attributeName);
@DynamoDBAttribute(attributeName="Title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; }