public class NamedParameterPreparedStatementCreatorFactory
extends org.springframework.jdbc.core.PreparedStatementCreatorFactory
| 构造器和说明 |
|---|
NamedParameterPreparedStatementCreatorFactory(String sql)
Create a new factory.
|
NamedParameterPreparedStatementCreatorFactory(String sql,
int... types)
Create a new factory with the given SQL and JDBC types.
|
NamedParameterPreparedStatementCreatorFactory(String sql,
List<org.springframework.jdbc.core.SqlParameter> declaredParameters)
Create a new factory with the given SQL and parameters.
|
| 限定符和类型 | 方法和说明 |
|---|---|
List<org.springframework.jdbc.core.SqlParameter> |
getDeclaredParameters() |
String[] |
getGeneratedKeysColumnNames() |
int |
getResultSetType() |
boolean |
isReturnGeneratedKeys() |
boolean |
isUpdatableResults() |
org.springframework.jdbc.core.PreparedStatementCreator |
newPreparedStatementCreator(List<?> params)
Return a new PreparedStatementCreator for the given parameters.
|
org.springframework.jdbc.core.PreparedStatementCreator |
newPreparedStatementCreator(Object[] params)
Return a new PreparedStatementCreator for the given parameters.
|
org.springframework.jdbc.core.PreparedStatementCreator |
newPreparedStatementCreator(String sqlToUse,
Object[] params)
Return a new PreparedStatementCreator for the given parameters.
|
org.springframework.jdbc.core.PreparedStatementSetter |
newPreparedStatementSetter(List<?> params)
Return a new PreparedStatementSetter for the given parameters.
|
org.springframework.jdbc.core.PreparedStatementSetter |
newPreparedStatementSetter(Object[] params)
Return a new PreparedStatementSetter for the given parameters.
|
void |
setDeclaredParameters(List<org.springframework.jdbc.core.SqlParameter> declaredParameters) |
void |
setGeneratedKeysColumnNames(String[] generatedKeysColumnNames) |
void |
setResultSetType(int resultSetType) |
void |
setReturnGeneratedKeys(boolean returnGeneratedKeys) |
void |
setSql(String sql) |
void |
setUpdatableResults(boolean updatableResults) |
public NamedParameterPreparedStatementCreatorFactory(String sql)
PreparedStatementCreatorFactory.addParameter(org.springframework.jdbc.core.SqlParameter) method or have no parameters.sql - the SQL statement to executepublic NamedParameterPreparedStatementCreatorFactory(String sql, int... types)
sql - the SQL statement to executetypes - int array of JDBC typespublic NamedParameterPreparedStatementCreatorFactory(String sql, List<org.springframework.jdbc.core.SqlParameter> declaredParameters)
sql - the SQL statement to executedeclaredParameters - list of SqlParameter objectspublic org.springframework.jdbc.core.PreparedStatementSetter newPreparedStatementSetter(List<?> params)
newPreparedStatementSetter 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactoryparams - list of parameters (may be null)public org.springframework.jdbc.core.PreparedStatementSetter newPreparedStatementSetter(Object[] params)
newPreparedStatementSetter 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactoryparams - the parameter array (may be null)public org.springframework.jdbc.core.PreparedStatementCreator newPreparedStatementCreator(List<?> params)
newPreparedStatementCreator 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactoryparams - list of parameters (may be null)public org.springframework.jdbc.core.PreparedStatementCreator newPreparedStatementCreator(Object[] params)
newPreparedStatementCreator 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactoryparams - the parameter array (may be null)public org.springframework.jdbc.core.PreparedStatementCreator newPreparedStatementCreator(String sqlToUse, Object[] params)
newPreparedStatementCreator 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactorysqlToUse - the actual SQL statement to use (if different from
the factory's, for example because of named parameter expanding)params - the parameter array (may be null)public void setSql(String sql)
public List<org.springframework.jdbc.core.SqlParameter> getDeclaredParameters()
public void setDeclaredParameters(List<org.springframework.jdbc.core.SqlParameter> declaredParameters)
public int getResultSetType()
public void setResultSetType(int resultSetType)
setResultSetType 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactorypublic boolean isUpdatableResults()
public void setUpdatableResults(boolean updatableResults)
setUpdatableResults 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactorypublic boolean isReturnGeneratedKeys()
public void setReturnGeneratedKeys(boolean returnGeneratedKeys)
setReturnGeneratedKeys 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactorypublic String[] getGeneratedKeysColumnNames()
public void setGeneratedKeysColumnNames(String[] generatedKeysColumnNames)
setGeneratedKeysColumnNames 在类中 org.springframework.jdbc.core.PreparedStatementCreatorFactoryCopyright © 2021. All rights reserved.