public.javadoc.org.spincast.plugins.jdbc.statements.UpdateStatementDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
UpdateStatementDefault (org.spincast:spincast-framework 1.0.0 API)
org.spincast.plugins.jdbc.statements
Class UpdateStatementDefault
- java.lang.Object
-
- org.spincast.plugins.jdbc.statements.StatementBase
-
- org.spincast.plugins.jdbc.statements.UpdateStatementDefault
-
- All Implemented Interfaces:
- Statement, UpdateStatement
public class UpdateStatementDefault
extends StatementBase
implements UpdateStatement
-
-
Constructor Summary
Constructors
Constructor and Description
UpdateStatementDefault(Connection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
protected String
createUniqueParamName()
protected PreparedStatement
getStatementWithParamsAdded(Connection connection)
void
setCase(String paramName,
String columnNameToCheck,
Map<?,?> map)
Adds a CASE
statement, using the key and values
of the given map.
int
update()
Execute the update and return the number
of affected rows.
<T> List<T>
update(ResultSetHandler<T> resultSetHandler)
Execute the update and return a result set.
-
Methods inherited from class org.spincast.plugins.jdbc.statements.StatementBase
addCurrentParamsToStatement, addParam, addParamsToStatement, clearParams, clearSql, clearSql, close, close, copyParamsAndStaticTokensTo, getConnection, getIndexMap, getOriginalQuery, getParams, getParsedQuery, getQueryBuilder, getSql, getSqlFormmatter, getStaticTokens, parse, setBoolean, setDate, setDouble, setFloat, setInInteger, setInLong, setInstant, setInString, setInStringFromEnumNames, setInStringFromEnumNames, setInteger, setLong, setLongList, setParams, setStaticTokens, setString, sql, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.spincast.plugins.jdbc.statements.Statement
clearSql, clearSql, getSql, setBoolean, setDate, setDouble, setFloat, setInInteger, setInLong, setInstant, setInString, setInStringFromEnumNames, setInStringFromEnumNames, setInteger, setLong, setLongList, setString, sql
-
-
Constructor Detail
-
UpdateStatementDefault
public UpdateStatementDefault(Connection connection)
-
Method Detail
-
getStatementWithParamsAdded
protected PreparedStatement getStatementWithParamsAdded(Connection connection)
-
update
public int update()
Description copied from interface: UpdateStatement
Execute the update and return the number
of affected rows.
- Specified by:
update
in interface UpdateStatement
-
update
public <T> List<T> update(ResultSetHandler<T> resultSetHandler)
Description copied from interface: UpdateStatement
Execute the update and return a result set.
This can be used with a RETURNING
clause.
- Specified by:
update
in interface UpdateStatement
-
setCase
public void setCase(String paramName,
String columnNameToCheck,
Map<?,?> map)
Description copied from interface: UpdateStatement
Adds a CASE
statement, using the key and values
of the given map.
For example :
CASE
WHEN mapKey1 = 1 then mapVal1
WHEN mapKey2 = 2 then mapVal2
END
- Specified by:
setCase
in interface UpdateStatement
-
createUniqueParamName
protected String createUniqueParamName()
Copyright © 2019. All rights reserved.