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