|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ninja_squad.dbsetup.operation.DeleteAll
@Immutable public final class DeleteAll
An operation which deletes everything from a given database table.
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
void |
execute(java.sql.Connection connection,
BinderConfiguration configuration)
Executes the operation |
static Operation |
from(java.util.List<java.lang.String> tables)
Returns a composite operation which deletes all the rows from the given tables, in the same order as the tables. |
static Operation |
from(java.lang.String... tables)
Returns a composite operation which deletes all the rows from the given tables, in the same order as the tables. |
static DeleteAll |
from(java.lang.String table)
Returns an operation which deletes all the rows from the given table. |
int |
hashCode()
|
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 Operation
connection
- 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 SQLExceptionpublic static DeleteAll from(@Nonnull java.lang.String table)
table
- the table to delete everything from.public static Operation from(@Nonnull java.lang.String... tables)
SqlOperation
to disable the foreign key constraints, then delete everything
from the tables, then use another sequence of SqlOperation
to re-enable the foreign key constraints.
tables
- the tables to delete everything from.public static Operation from(@Nonnull java.util.List<java.lang.String> tables)
SqlOperation
to disable the foreign key constraints, then delete everything
from the tables, then use another sequence of SqlOperation
to re-enable the foreign key constraints.
tables
- the tables to delete everything from.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |