Package com.jcabi.dynamo
Class Conditions
- java.lang.Object
-
- com.jcabi.dynamo.Conditions
-
@Immutable @Loggable(1) public final class Conditions extends Object implements Map<String,com.amazonaws.services.dynamodbv2.model.Condition>
DynamoDB query conditions.It's a convenient immutable builder of a map of conditions for DynamoDB query/scan operations. Use it like this:
Map<String, Condition> conditions = new Conditions() .with("hash", Conditions.equalTo("some value")) .with("range", Conditions.equalTo(12345));
- Since:
- 0.1
-
-
Constructor Summary
Constructors Constructor Description Conditions()
Public ctor.Conditions(Map<String,com.amazonaws.services.dynamodbv2.model.Condition> map)
Public ctor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<String,com.amazonaws.services.dynamodbv2.model.Condition>>
entrySet()
static com.amazonaws.services.dynamodbv2.model.Condition
equalTo(com.amazonaws.services.dynamodbv2.model.AttributeValue value)
Equal to static condition builder (factory method).static com.amazonaws.services.dynamodbv2.model.Condition
equalTo(Integer value)
Equal to static condition builder (factory method).static com.amazonaws.services.dynamodbv2.model.Condition
equalTo(Long value)
Equal to static condition builder (factory method).static com.amazonaws.services.dynamodbv2.model.Condition
equalTo(Object value)
Equal to static condition builder (factory method).com.amazonaws.services.dynamodbv2.model.Condition
get(Object key)
boolean
isEmpty()
Set<String>
keySet()
com.amazonaws.services.dynamodbv2.model.Condition
put(String key, com.amazonaws.services.dynamodbv2.model.Condition value)
void
putAll(Map<? extends String,? extends com.amazonaws.services.dynamodbv2.model.Condition> map)
com.amazonaws.services.dynamodbv2.model.Condition
remove(Object key)
int
size()
String
toString()
Collection<com.amazonaws.services.dynamodbv2.model.Condition>
values()
Conditions
with(String name, com.amazonaws.services.dynamodbv2.model.Condition value)
With this condition.Conditions
with(String name, Object value)
With this condition.Conditions
with(Map<String,com.amazonaws.services.dynamodbv2.model.Condition> map)
With these conditions.Conditions
withAttributes(Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> map)
With these conditions.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
equalTo
public static com.amazonaws.services.dynamodbv2.model.Condition equalTo(Long value)
Equal to static condition builder (factory method).- Parameters:
value
- The value to equal to- Returns:
- The condition just created
-
equalTo
public static com.amazonaws.services.dynamodbv2.model.Condition equalTo(Integer value)
Equal to static condition builder (factory method).- Parameters:
value
- The value to equal to- Returns:
- The condition just created
-
equalTo
public static com.amazonaws.services.dynamodbv2.model.Condition equalTo(Object value)
Equal to static condition builder (factory method).- Parameters:
value
- The value to equal to- Returns:
- The condition just created
-
equalTo
public static com.amazonaws.services.dynamodbv2.model.Condition equalTo(com.amazonaws.services.dynamodbv2.model.AttributeValue value)
Equal to static condition builder (factory method).- Parameters:
value
- The value to equal to- Returns:
- The condition just created
-
with
public Conditions with(String name, com.amazonaws.services.dynamodbv2.model.Condition value)
With this condition.- Parameters:
name
- Attribute namevalue
- The condition- Returns:
- New map of conditions
-
with
public Conditions with(String name, Object value)
With this condition.- Parameters:
name
- Attribute namevalue
- The condition- Returns:
- New map of conditions
- Since:
- 0.18
-
withAttributes
public Conditions withAttributes(Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> map)
With these conditions.- Parameters:
map
- The conditions- Returns:
- New map of conditions
-
with
public Conditions with(Map<String,com.amazonaws.services.dynamodbv2.model.Condition> map)
With these conditions.- Parameters:
map
- The conditions- Returns:
- New map of conditions
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<String,com.amazonaws.services.dynamodbv2.model.Condition>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<String,com.amazonaws.services.dynamodbv2.model.Condition>
-
get
public com.amazonaws.services.dynamodbv2.model.Condition get(Object key)
-
values
public Collection<com.amazonaws.services.dynamodbv2.model.Condition> values()
-
entrySet
public Set<Map.Entry<String,com.amazonaws.services.dynamodbv2.model.Condition>> entrySet()
-
put
public com.amazonaws.services.dynamodbv2.model.Condition put(String key, com.amazonaws.services.dynamodbv2.model.Condition value)
-
remove
public com.amazonaws.services.dynamodbv2.model.Condition remove(Object key)
-
putAll
public void putAll(Map<? extends String,? extends com.amazonaws.services.dynamodbv2.model.Condition> map)
-
-