Package com.j_spaces.jdbc
Class UpdateQuery
java.lang.Object
com.j_spaces.jdbc.AbstractDMLQuery
com.j_spaces.jdbc.UpdateQuery
-
Field Summary
Fields inherited from class com.j_spaces.jdbc.AbstractDMLQuery
_buildOnly, _containsQuery, _convertResultToArray, _executor, _operationID, _projectionTemplate, _queryResultType, _tablesData, expTree, isPrepared, preparedValues, queryColumns, rownum, securityInterceptor, tables, valueMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUpdateColumn(UpdateColumn updateColumn) Adds a column name to the update columns list of the update query.clone()executeOnSpace(ISpaceProxy space, Transaction txn) Will execute this query on the space and return a ResponsePacketexecutePreparedValuesBatch(ISpaceProxy space, Transaction transaction, GPreparedStatement.PreparedValuesCollection preparedValuesCollection) Executes a query with batched prepared values.Gets the update columns list of the update query.booleanisByUid()booleanGets whether this query is forced to be executed under transaction.voidsetByUid(boolean byUid) voidsetSelfIncrementedUpdateColumn(boolean selfIncrementedUpdateColumn) Sets whether the query contains an update column which is self incremented.voidsetUpdatedValues(List<LiteralNode> values) Methods inherited from class com.j_spaces.jdbc.AbstractDMLQuery
addColumn, addTableWithAlias, assignParameters, build, buildTemplates, containsSubQueries, executeSubQueries, filterByRownum, getBuilder, getExplainPlan, getExpTree, getIfExists, getMinEntriesToWaitFor, getOperationID, getPreparedValues, getProjectionTemplate, getQueryColumnByAlias, getQueryColumns, getQueryResultType, getReadModifier, getRouting, getRownum, getRownumLimit, getSecurityInterceptor, getSession, getTableByAlias, getTableData, getTableData, getTableName, getTablesData, getTablesNames, getTemplatePacketIfExists, getTimeout, getTypeInfo, isBuildOnly, isContainsQuery, isConvertResultToArray, isDirtyState, isJoined, isPrepared, isReturnResult, isSelectQuery, prepare, readExternal, setBuildOnly, setContainsQuery, setContainsSubQueries, setConvertResultToArray, setExplainPlan, setExpTree, setIfExists, setMaxResults, setMinEntriesToWaitFor, setOperationID, setPrepared, setPreparedValues, setProjectionTemplate, setQueryResultType, setReadModifier, setReturnResult, setRouting, setRownum, setSecurityInterceptor, setSession, setTableName, setTemplatePreparedValues, setTimeout, validateBuiltTemplates, validateQuery, validateQuery, writeExternal
-
Constructor Details
-
UpdateQuery
public UpdateQuery()
-
-
Method Details
-
executeOnSpace
Description copied from interface:QueryWill execute this query on the space and return a ResponsePacket- Throws:
SQLException
-
setUpdatedValues
-
isByUid
public boolean isByUid()- Returns:
- Returns the byUid.
-
setByUid
public void setByUid(boolean byUid) - Parameters:
byUid- The byUid to set.
-
clone
- Specified by:
clonein classAbstractDMLQuery
-
addUpdateColumn
Adds a column name to the update columns list of the update query. -
getUpdatedColumns
Gets the update columns list of the update query. -
setSelfIncrementedUpdateColumn
public void setSelfIncrementedUpdateColumn(boolean selfIncrementedUpdateColumn) Sets whether the query contains an update column which is self incremented. -
isForceUnderTransaction
public boolean isForceUnderTransaction()Gets whether this query is forced to be executed under transaction. If the query contains a column which is self incremented a TXN should be created for emulating compare & set.- Specified by:
isForceUnderTransactionin interfaceQuery- Overrides:
isForceUnderTransactionin classAbstractDMLQuery
-
executePreparedValuesBatch
public BatchResponsePacket executePreparedValuesBatch(ISpaceProxy space, Transaction transaction, GPreparedStatement.PreparedValuesCollection preparedValuesCollection) throws SQLException Description copied from class:AbstractDMLQueryExecutes a query with batched prepared values. This is the default implementation - NOT optimized.- Overrides:
executePreparedValuesBatchin classAbstractDMLQuery- Returns:
- BatchResponsePacket
- Throws:
SQLException
-