T
- The object type.V
- The field model type.DynamoDbAutoGenerator<V>
, DynamoDbTypeConverter<AttributeValue,V>
public class DynamoDbMapperFieldModel<T,V> extends Object implements DynamoDbAutoGenerator<V>, DynamoDbTypeConverter<AttributeValue,V>
Modifier and Type | Class | Description |
---|---|---|
static class |
DynamoDbMapperFieldModel.DynamoDbAttributeType |
DynamoDbAutoGenerator.AbstractGenerator<T>
DynamoDbTypeConverter.AbstractConverter<S,T>, DynamoDbTypeConverter.DelegateConverter<S,T>, DynamoDbTypeConverter.ExtendedConverter<S,U,T>, DynamoDbTypeConverter.NullSafeConverter<S,T>
Modifier and Type | Method | Description |
---|---|---|
DynamoDbMapperFieldModel.DynamoDbAttributeType |
attributeType() |
Gets the DynamoDB attribute type.
|
Condition |
beginsWith(V value) |
Creates a condition which filters on the specified value.
|
Condition |
between(V lo,
V hi) |
Creates a condition which filters on the specified values.
|
Condition |
betweenAny(V lo,
V hi) |
Creates a condition which filters on any non-null argument; if
lo
is null a LE condition is applied on hi , if hi
is null a GE condition is applied on lo . |
Condition |
contains(V value) |
Creates a condition which filters on the specified value.
|
AttributeValue |
convert(V object) |
Turns an object of type T into an object of type S.
|
Condition |
eq(V value) |
Creates a condition which filters on the specified value.
|
Condition |
ge(V value) |
Creates a condition which filters on the specified value.
|
V |
generate(V currentValue) |
Generates a new value given the current value (or null) if applicable.
|
V |
get(T object) |
Gets the value from the object instance.
|
AttributeValue |
getAndConvert(T object) |
Get the current value from the object and convert it.
|
String |
getDynamoDbAttributeName() |
Deprecated.
replaced by
name() |
DynamoDbMapperFieldModel.DynamoDbAttributeType |
getDynamoDbAttributeType() |
Deprecated.
replaced by
attributeType |
DynamoDbAutoGenerateStrategy |
getGenerateStrategy() |
Gets the auto-generate strategy.
|
List<String> |
globalSecondaryIndexNames(KeyType keyType) |
Gets the global secondary indexes.
|
Condition |
gt(V value) |
Creates a condition which filters on the specified value.
|
Condition |
in(Collection<V> values) |
Creates a condition which filters on the specified values.
|
Condition |
in(V... values) |
Creates a condition which filters on the specified values.
|
boolean |
indexed() |
Returns true if the field has any indexes.
|
Condition |
isNull() |
Creates a condition which filters on the specified value.
|
KeyType |
keyType() |
Gets the key type.
|
Condition |
le(V value) |
Creates a condition which filters on the specified value.
|
List<String> |
localSecondaryIndexNames() |
Gets the local secondary indexes.
|
Condition |
lt(V value) |
Creates a condition which filters on the specified value.
|
String |
name() |
Gets the attribute name.
|
Condition |
ne(V value) |
Creates a condition which filters on the specified value.
|
Condition |
notContains(V value) |
Creates a condition which filters on the specified value.
|
Condition |
notNull() |
Creates a condition which filters on the specified value.
|
void |
set(T object,
V value) |
Sets the value on the object instance.
|
V |
unconvert(AttributeValue object) |
Turns an object of type S into an object of type T.
|
void |
unconvertAndSet(T object,
AttributeValue value) |
Unconverts the value and sets it on the object.
|
boolean |
versioned() |
Indicates if this attribute is a version attribute.
|
@Deprecated public String getDynamoDbAttributeName()
name()
@Deprecated public DynamoDbMapperFieldModel.DynamoDbAttributeType getDynamoDbAttributeType()
attributeType
public final String name()
public final V get(T object)
object
- The object instance.public final void set(T object, V value)
object
- The object instance.value
- The value.public final DynamoDbAutoGenerateStrategy getGenerateStrategy()
getGenerateStrategy
in interface DynamoDbAutoGenerator<T>
public final V generate(V currentValue)
generate
in interface DynamoDbAutoGenerator<T>
public final AttributeValue convert(V object)
convert
in interface DynamoDbTypeConverter<T,V>
public final V unconvert(AttributeValue object)
unconvert
in interface DynamoDbTypeConverter<T,V>
public final AttributeValue getAndConvert(T object)
object
- The object instance.public final void unconvertAndSet(T object, AttributeValue value)
object
- The object instance.value
- The attribute value.public final DynamoDbMapperFieldModel.DynamoDbAttributeType attributeType()
public final KeyType keyType()
public final boolean versioned()
public final List<String> globalSecondaryIndexNames(KeyType keyType)
keyType
- The key type.public final List<String> localSecondaryIndexNames()
public final boolean indexed()
public final Condition beginsWith(V value)
value
- The value.ComparisonOperator.BEGINS_WITH
,
Condition
public final Condition between(V lo, V hi)
lo
- The start of the range (inclusive).hi
- The end of the range (inclusive).ComparisonOperator.BETWEEN
,
Condition
public final Condition contains(V value)
value
- The value.ComparisonOperator.CONTAINS
,
Condition
public final Condition eq(V value)
value
- The value.ComparisonOperator.EQ
,
Condition
public final Condition ge(V value)
value
- The value.ComparisonOperator.GE
,
Condition
public final Condition gt(V value)
value
- The value.ComparisonOperator.GT
,
Condition
public final Condition in(Collection<V> values)
values
- The values.ComparisonOperator.IN
,
Condition
public final Condition in(V... values)
values
- The values.ComparisonOperator.IN
,
Condition
public final Condition isNull()
ComparisonOperator.NULL
,
Condition
public final Condition le(V value)
value
- The value.ComparisonOperator.LE
,
Condition
public final Condition lt(V value)
value
- The value.ComparisonOperator.LT
,
Condition
public final Condition ne(V value)
value
- The value.ComparisonOperator.NE
,
Condition
public final Condition notContains(V value)
value
- The value.ComparisonOperator.NOT_CONTAINS
,
Condition
public final Condition notNull()
ComparisonOperator.NOT_NULL
,
Condition
public final Condition betweenAny(V lo, V hi)
lo
is null a LE
condition is applied on hi
, if hi
is null a GE
condition is applied on lo
.lo
- The start of the range (inclusive).hi
- The end of the range (inclusive).ComparisonOperator.BETWEEN
,
ComparisonOperator.EQ
,
ComparisonOperator.GE
,
ComparisonOperator.LE
,
Condition
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.