|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ninja_squad.dbsetup.operation.SqlOperation
@Immutable public final class SqlOperation
An operation which simply executes a SQL statement (using Statement.executeUpdate(String)). It can be useful,
for example, to disable or re-enable constraints before/after deleting everything from tables, or inserting into
tables having cross references.
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
void |
execute(java.sql.Connection connection,
BinderConfiguration configuration)
Executes the operation |
int |
hashCode()
|
static Operation |
of(java.util.List<java.lang.String> sqlStatements)
Creates a sequence of SqlOperation for the given SQL statements. |
static Operation |
of(java.lang.String... sqlStatements)
Creates a sequence of SqlOperation for the given SQL statements. |
static SqlOperation |
of(java.lang.String sqlStatement)
Creates a SqlOperation for the given SQL statement |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void execute(java.sql.Connection connection,
BinderConfiguration configuration)
throws java.sql.SQLException
Operation
execute in interface Operationconnection - the connection used to execute the operationconfiguration - the binder configuration, used to get appropriate binders based on the metadata of
the prepared statements
java.sql.SQLException - if the execution throws a SQLException
public static SqlOperation of(@Nonnull
java.lang.String sqlStatement)
sqlStatement - the SQL statement to execute
public static Operation of(@Nonnull
java.lang.String... sqlStatements)
sqlStatements - the SQL statements to execute
public static Operation of(@Nonnull
java.util.List<java.lang.String> sqlStatements)
sqlStatements - the SQL statements to execute
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||