@Target(value=METHOD) @Retention(value=RUNTIME) public @interface StatementAttributes
Delete
, Insert
, Query
, Select
or Update
).
If you decorate a DAO method with this, it will use those values when constructing the bound statement. Note that the method can also take a function argument to modify the statement at runtime; in that case, the values from this annotation will be applied first, and the function second.
Modifier and Type | Optional Element and Description |
---|---|
String |
consistencyLevel
The consistency level to use for the statement.
|
String |
executionProfileName
The name of the execution profile to use.
|
boolean[] |
idempotence
Whether the request is idempotent; that is, whether applying the request twice leaves the
database in the same state.
|
int |
pageSize
The page size to use.
|
String |
routingKeyspace
The keyspace to use for token-aware routing.
|
String |
serialConsistencyLevel
The serial consistency level to use for the statement.
|
String |
timeout
How long to wait for this request to complete.
|
public abstract String executionProfileName
public abstract int pageSize
If unset, the mapper won't set any value on the statement (letting it default to the value defined in the configuration).
Statement.setPageSize(int)
public abstract boolean[] idempotence
If unset, the mapper won't set any value on the statement (letting it default to the value * defined in the configuration).
Note that this attribute is an array only to allow an empty default; only the first element will be considered.
Statement.setIdempotent(Boolean)
public abstract String consistencyLevel
If unset, the mapper won't set any value on the statement (letting it default to the value defined in the configuration).
public abstract String serialConsistencyLevel
If unset, the mapper won't set any value on the statement (letting it default to the value defined in the configuration).
public abstract String timeout
This expects a string in the format accepted by Duration.parse(CharSequence)
.
If unset, the mapper won't set any value on the statement (letting it default to the value defined in the configuration).
Statement.setTimeout(Duration)
public abstract String routingKeyspace
If unset, the mapper won't set any value on the statement.
Statement.setRoutingKeyspace(String)
Copyright © 2017–2019. All rights reserved.