public class SqlCommand extends Object
Constructor and Description |
---|
SqlCommand() |
SqlCommand(String command,
int suppressedErrorCode)
Instantiates a new sql command.
|
SqlCommand(String command,
List<Integer> suppressedErrorCodes)
Instantiates a new sql command.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canHandleInJdbcTemplate()
Checks if this command can handle execution directly
in a given jdbc template.
|
static SqlCommand |
from(String command)
Convenience method returning new instance.
|
static SqlCommand |
from(String command,
int suppressedErrorCode)
Convenience method returning new instance.
|
String |
getCommand()
Gets the command.
|
List<Integer> |
getSuppressedErrorCodes()
Gets the suppressed error codes.
|
void |
handle(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
Connection connection)
Handle command in a given jdbc template.
|
public SqlCommand()
public SqlCommand(String command, int suppressedErrorCode)
command
- the commandsuppressedErrorCode
- the suppressed error codepublic static SqlCommand from(String command)
command
- the commandpublic static SqlCommand from(String command, int suppressedErrorCode)
command
- the commandsuppressedErrorCode
- the suppressed error codepublic String getCommand()
public List<Integer> getSuppressedErrorCodes()
public boolean canHandleInJdbcTemplate()
public void handle(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, Connection connection)
jdbcTemplate
- the jdbc templateCopyright © 2020 Pivotal Software, Inc.. All rights reserved.