public abstract class AbstractOptionsForCRUDUpdate<T extends AbstractOptionsForCRUDUpdate<T>> extends AbstractOptionsForSelect<T>
| Modifier and Type | Field and Description |
|---|---|
protected Optional<Boolean> |
ifExists |
protected info.archinnov.achilles.type.strategy.InsertStrategy |
insertStrategy
Force the insert strategy to be NOT NULL FIELDS for CRUD update() method
|
protected Optional<List<info.archinnov.achilles.type.lightweighttransaction.LWTResultListener>> |
lwtResultListeners |
| Constructor and Description |
|---|
AbstractOptionsForCRUDUpdate() |
| Modifier and Type | Method and Description |
|---|---|
info.archinnov.achilles.type.strategy.InsertStrategy |
getOverridenStrategy(AbstractEntityProperty<?> property) |
T |
ifExists()
Generate a ...
|
T |
ifExists(boolean ifExists)
Generate a ...
|
T |
usingTimestamp(long timestamp)
Generate a USING TIMESTAMP ?
|
T |
usingTimeToLive(int timeToLive)
Generate a USING TTL ?
|
T |
withLwtResultListener(info.archinnov.achilles.type.lightweighttransaction.LWTResultListener lwtResultListener)
Add a single LWT result listeners.
|
T |
withLwtResultListeners(List<info.archinnov.achilles.type.lightweighttransaction.LWTResultListener> lwtResultListeners)
Add a list of LWT result listeners.
|
getOptions, getThis, isIdempotent, isIdempotent, withConsistencyLevel, withDMLResultsDisplaySize, withFetchSize, withOptionalConsistencyLevel, withOptionalOutgoingPayload, withOptionalPagingState, withOptionalPagingStateString, withOptionalRetryPolicy, withOptionalSerialConsistencyLevel, withOutgoingPayload, withPagingState, withPagingState, withReadTimeoutInMillis, withResultSetAsyncListener, withResultSetAsyncListeners, withRetryPolicy, withRowAsyncListener, withRowAsyncListeners, withSerialConsistencyLevel, withTracing, withTracingprotected info.archinnov.achilles.type.strategy.InsertStrategy insertStrategy
public T ifExists(boolean ifExists)
public T ifExists()
public T withLwtResultListeners(List<info.archinnov.achilles.type.lightweighttransaction.LWTResultListener> lwtResultListeners)
LWTResultListener lwtListener = new LWTResultListener() {
public void onError(LWTResult lwtResult) {
//Get type of LWT operation that fails
LWTResult.Operation operation = lwtResult.operation();
// Print out current values
TypedMap currentValues = lwtResult.currentValues();
currentValues
.entrySet()
.forEach(entry -> System.out.println(String.format("%s = %s",entry.getKey(), entry.getValue())));
}
};
public T withLwtResultListener(info.archinnov.achilles.type.lightweighttransaction.LWTResultListener lwtResultListener)
LWTResultListener lwtListener = new LWTResultListener() {
public void onError(LWTResult lwtResult) {
//Get type of LWT operation that fails
LWTResult.Operation operation = lwtResult.operation();
// Print out current values
TypedMap currentValues = lwtResult.currentValues();
currentValues
.entrySet()
.forEach(entry -> System.out.println(String.format("%s = %s",entry.getKey(), entry.getValue())));
}
};
public T usingTimestamp(long timestamp)
public T usingTimeToLive(int timeToLive)
public info.archinnov.achilles.type.strategy.InsertStrategy getOverridenStrategy(AbstractEntityProperty<?> property)
Copyright © 2012-2021. All Rights Reserved.