net.sf.farrago.ddl
Class DdlRebuildTableStmt

java.lang.Object
  extended by net.sf.farrago.ddl.DdlStmt
      extended by net.sf.farrago.ddl.DdlReloadTableStmt
          extended by net.sf.farrago.ddl.DdlRebuildTableStmt
All Implemented Interfaces:
DdlMultipleTransactionStmt, FarragoSessionDdlStmt

public class DdlRebuildTableStmt
extends DdlReloadTableStmt

DdlRebuildTableStmt represents an ALTER TABLE ... REBUILD statement. The statement compacts data stored in a table's indexes by removing deleted entries.

Note: Although DdlRebuildTableStmt is an ALTER statement, it does not extend DdlAlterStmt. This avoids the complexity of having subclasses of DdlAlterStmt which may or may not also be implementations of DdlMultipleTransactionStmt.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/ddl/DdlRebuildTableStmt.java#14 $
Author:
John Pham

Constructor Summary
DdlRebuildTableStmt(CwmTable table)
          Constructs a DdlRebuildTableStmt.
 
Method Summary
protected  String getReloadDml(SqlPrettyWriter writer)
          Generates the query: "insert into T select * from T"
 
Methods inherited from class net.sf.farrago.ddl.DdlReloadTableStmt
completeAfterExecuteUnlocked, completeRequiresWriteTxn, executeUnlocked, getOldTableStructureForIndexMap, getTable, prepForExecuteUnlocked, recoverFromFailure, setRecoveryRef, shouldRebuildIndexes, visit
 
Methods inherited from class net.sf.farrago.ddl.DdlStmt
getModelElement, isDropRestricted, postCommit, postExecute, preExecute, preValidate, requiresCommit, runsAsDml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.farrago.session.FarragoSessionDdlStmt
getModelElement, isDropRestricted, postCommit, postExecute, preExecute, preValidate, requiresCommit, runsAsDml
 

Constructor Detail

DdlRebuildTableStmt

public DdlRebuildTableStmt(CwmTable table)
Constructs a DdlRebuildTableStmt.

Method Detail

getReloadDml

protected String getReloadDml(SqlPrettyWriter writer)
Generates the query: "insert into T select * from T"

Specified by:
getReloadDml in class DdlReloadTableStmt
Parameters:
writer - writer to uses for generating SQL
Returns:
DML statement which accomplishes reload