T - The type of POJO associated with this statement.public class UpdateImpl<T> extends StatementImpl<Void,VoidFuture,T> implements Update<T>
UpdateImpl class extends the functionality of Cassandra's
Update class to provide support
for POJOs.| Modifier and Type | Class and Description |
|---|---|
static class |
UpdateImpl.AssignmentsImpl<T>
The
AssignmentsImpl class defines the assignments of an UPDATE
statement. |
static class |
UpdateImpl.ConditionsImpl<T>
Conditions for an UDPATE statement.
|
static class |
UpdateImpl.OptionsImpl<T>
The
OptionsImpl class defines the options of an UPDATE statement. |
static class |
UpdateImpl.WhereImpl<T>
The
WhereImpl class defines a WHERE clause for an UPDATE statement. |
Update.Assignments<T>, Update.Conditions<T>, Update.Options<T>, Update.Where<T>bridge, CI_PREFIX, idempotent, isCounterOp, mgr, MK_PREFIX, resultClass, simpleSize, UDT_C_PREFIX| Constructor and Description |
|---|
UpdateImpl(ClassInfoImpl.POJOContext context,
StatementManagerImpl mgr,
StatementBridge bridge)
Instantiates a new
UpdateImpl object. |
UpdateImpl(ClassInfoImpl.POJOContext context,
String[] tables,
StatementManagerImpl mgr,
StatementBridge bridge)
Instantiates a new
UpdateImpl object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendGroupSubType(StringBuilder builder)
Appends the sub-type of group this is; used when building a query string.
|
protected void |
appendGroupType(StringBuilder builder)
Appends the type of group this is; used when building a query string.
|
protected StringBuilder[] |
buildQueryStrings()
Builds the query strings (one per underlying statement) to be collected if
the statement represents some a batch, sequence, or a group statement.
|
VoidFuture |
executeAsync0()
Executes this statement asynchronously.
|
<U> Optional<Using<U>> |
getUsing(String name) |
Update<T> |
ifExists() |
Update.Conditions<T> |
onlyIf() |
Update.Conditions<T> |
onlyIf(Clause condition) |
Update.Conditions<T> |
previouslyIf() |
Update.Conditions<T> |
previouslyIf(Clause condition) |
protected int |
simpleSize()
Gets the number of simple statements in this statement.
|
java.util.stream.Stream<TableInfo<T>> |
tables() |
Update.Options<T> |
using(Using<?> using) |
java.util.stream.Stream<Using<?>> |
usings() |
Update.Where<T> |
where() |
Update.Where<T> |
where(Clause clause) |
Update.Assignments<T> |
with() |
Update.Assignments<T> |
with(Assignment... assignments) |
appendOptions, buildQueryString, buildStatements, clearKeyspace, disable, disableErrorTracing, disableTracing, enable, enableErrorTracing, enableErrorTracing, enableTracing, enableTracing, execute, executeAsync, executeAsyncRaw, executeAsyncRaw0, executeRaw, getClassInfo, getClassInfoImpl, getConsistencyLevel, getContext, getDefaultTimestamp, getFetchSize, getKeyspace, getObject, getObjectClass, getPOJOContext, getQueryString, getReadTimeoutMillis, getRetryPolicy, getSerialConsistencyLevel, getUserData, init, init, isCounterOp, isDirty, isEnabled, isErrorTracing, isIdempotent, isTracing, setConsistencyLevel, setCounterOp, setDefaultTimestamp, setDirty, setDirty, setFetchSize, setIdempotent, setReadTimeoutMillis, setRetryPolicy, setSerialConsistencyLevel, setUserData, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetObjectgetClassInfo, getObjectClassdisable, disableErrorTracing, disableTracing, enable, enableErrorTracing, enableErrorTracing, enableTracing, enableTracing, execute, executeAsync, executeAsyncRaw, executeRaw, getConsistencyLevel, getDefaultTimestamp, getFetchSize, getKeyspace, getQueryString, getReadTimeoutMillis, getRetryPolicy, getSerialConsistencyLevel, getUserData, isEnabled, isErrorTracing, isIdempotent, isTracing, setConsistencyLevel, setDefaultTimestamp, setFetchSize, setIdempotent, setReadTimeoutMillis, setRetryPolicy, setSerialConsistencyLevel, setUserDatapublic UpdateImpl(ClassInfoImpl.POJOContext context, StatementManagerImpl mgr, StatementBridge bridge)
UpdateImpl object.context - the non-null class info context for the POJO
associated with this statementmgr - the non-null statement managerbridge - the non-null statement bridgeNullPointerException - if context is nullIllegalArgumentException - if unable to compute the keyspace or table
names based from the given objectpublic UpdateImpl(ClassInfoImpl.POJOContext context, String[] tables, StatementManagerImpl mgr, StatementBridge bridge)
UpdateImpl object.context - the non-null class info context for the POJO
associated with this statementtables - the tables to updatemgr - the non-null statement managerbridge - the non-null statement bridgeNullPointerException - if context is nullIllegalArgumentException - if any of the specified tables are not
defined in the POJOprotected int simpleSize()
simpleSize in class StatementImpl<Void,VoidFuture,T>StatementImpl.simpleSize()protected StringBuilder[] buildQueryStrings()
buildQueryStrings in class StatementImpl<Void,VoidFuture,T>null if nothing to batchStatementImpl.buildQueryStrings()protected void appendGroupType(StringBuilder builder)
appendGroupType in class StatementImpl<Void,VoidFuture,T>builder - the builder to which to append the type of groupStatementImpl.appendGroupType(java.lang.StringBuilder)protected void appendGroupSubType(StringBuilder builder)
appendGroupSubType in class StatementImpl<Void,VoidFuture,T>builder - the builder to which to append the sub-type of groupStatementImpl.appendGroupSubType(java.lang.StringBuilder)public java.util.stream.Stream<TableInfo<T>> tables()
tables in interface Update<T>Update.tables()public Update.Assignments<T> with(Assignment... assignments)
with in interface Update<T>Update.with(org.helenus.driver.Assignment[])public Update.Assignments<T> with()
with in interface Update<T>Update.with()public Update.Where<T> where(Clause clause)
where in interface Update<T>Update.where(org.helenus.driver.Clause)public Update.Where<T> where()
where in interface Update<T>Update.where()public Update<T> ifExists()
ifExists in interface Update<T>Update.ifExists()public Update.Conditions<T> onlyIf(Clause condition)
onlyIf in interface Update<T>Update.onlyIf(org.helenus.driver.Clause)public Update.Conditions<T> onlyIf()
onlyIf in interface Update<T>Update.onlyIf()public Update.Conditions<T> previouslyIf(Clause condition)
previouslyIf in interface Update<T>Update.previouslyIf(org.helenus.driver.Clause)public Update.Conditions<T> previouslyIf()
previouslyIf in interface Update<T>Update.previouslyIf()public Update.Options<T> using(Using<?> using)
using in interface Update<T>Update.using(org.helenus.driver.Using)public java.util.stream.Stream<Using<?>> usings()
usings in interface Update<T>Insert.usings()public <U> Optional<Using<U>> getUsing(String name)
getUsing in interface Update<T>Insert.getUsing(java.lang.String)public VoidFuture executeAsync0()
ResultSetFuture.
Note that for queries that doesn't return a result (INSERT, UPDATE and
DELETE), you will need to access the result future (that is call one of
its get method to make sure the statement's execution was successful.executeAsync0 in class StatementImpl<Void,VoidFuture,T>StatementImpl.executeAsync0()Copyright (C) 2015-2017 The Helenus Driver Project Authors.