Class InsertStatementDefault
java.lang.Object
org.spincast.plugins.jdbc.statements.StatementBase
org.spincast.plugins.jdbc.statements.InsertStatementDefault
- All Implemented Interfaces:
InsertStatement
,Statement
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
insert()
Runs the insert query, returns the number of affected rows.insertGetGeneratedId
(String primaryKeyColumnName) Runs the insert query and return the generated idprotected Long
insertPrivate
(String primaryKeyColumnName) IfprimaryKeyColumnName
is null, returns the affected rows number.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 Details
-
InsertStatementDefault
-
-
Method Details
-
insert
public int insert()Description copied from interface:InsertStatement
Runs the insert query, returns the number of affected rows.- Specified by:
insert
in interfaceInsertStatement
-
insertGetGeneratedId
Description copied from interface:InsertStatement
Runs the insert query and return the generated id- Specified by:
insertGetGeneratedId
in interfaceInsertStatement
-
insertPrivate
IfprimaryKeyColumnName
is null, returns the affected rows number. Otherwise returns the generated id.
-