|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.farrago.ddl.DdlStmt net.sf.farrago.ddl.DdlTruncateStmt
public class DdlTruncateStmt
DdlTruncateStmt represents a DDL TRUNCATE statement of any kind.
Field Summary | |
---|---|
private List<String> |
indexMofIds
|
private RefClass |
tableClass
|
private String |
tableMofId
|
Constructor Summary | |
---|---|
DdlTruncateStmt(CwmModelElement truncatedElement)
Constructs a new DdlTruncateStmt. |
Method Summary | |
---|---|
void |
completeAfterExecuteUnlocked(FarragoSessionDdlValidator ddlValidator,
FarragoSession session,
boolean success)
Provides access to the repository after execution of the DDL. |
boolean |
completeRequiresWriteTxn()
Checks whether the DdlMultipleTransactionStmt.completeAfterExecuteUnlocked(
FarragoSessionDdlValidator, FarragoSession, boolean) method requires a
repository write transaction. |
void |
executeUnlocked(FarragoSessionDdlValidator ddlValidator,
FarragoSession session)
Executes long-running DDL actions. |
void |
prepForExecuteUnlocked(FarragoSessionDdlValidator ddlValidator,
FarragoSession session)
Provides access to the repository in preparation for the execution of DdlStmt. |
void |
visit(DdlVisitor visitor)
Invokes a visitor on this statement. |
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 |
Field Detail |
---|
private String tableMofId
private RefClass tableClass
private List<String> indexMofIds
Constructor Detail |
---|
public DdlTruncateStmt(CwmModelElement truncatedElement)
truncatedElement
- top-level element truncated by this stmtMethod Detail |
---|
public void visit(DdlVisitor visitor)
DdlStmt
visit
in class DdlStmt
visitor
- DdlVisitor to invokepublic void prepForExecuteUnlocked(FarragoSessionDdlValidator ddlValidator, FarragoSession session)
DdlMultipleTransactionStmt
prepForExecuteUnlocked
in interface DdlMultipleTransactionStmt
ddlValidator
- DDL validator for this statementFarragoReposTxnContext
public void executeUnlocked(FarragoSessionDdlValidator ddlValidator, FarragoSession session)
DdlMultipleTransactionStmt
executeUnlocked
in interface DdlMultipleTransactionStmt
ddlValidator
- DDL validator for this statementsession
- reentrant Farrago session which may be used to execute DML
statementspublic boolean completeRequiresWriteTxn()
DdlMultipleTransactionStmt
DdlMultipleTransactionStmt.completeAfterExecuteUnlocked(
FarragoSessionDdlValidator, FarragoSession, boolean)
method requires a
repository write transaction.
completeRequiresWriteTxn
in interface DdlMultipleTransactionStmt
public void completeAfterExecuteUnlocked(FarragoSessionDdlValidator ddlValidator, FarragoSession session, boolean success)
DdlMultipleTransactionStmt
DdlMultipleTransactionStmt.executeUnlocked(FarragoSessionDdlValidator, FarragoSession)
.
This method is invoked in a locked
repository
transaction. The method DdlMultipleTransactionStmt.completeRequiresWriteTxn()
controls
whether the transaction read-only or not. This method may not access
and/or modify repository objects loaded in a previous transaction unless
they are reloaded by MOF ID. Be aware that objects may have been modified
by another session unless some external mechanism (for instance, the
"table-in-use" collection) guarantees that they have not been modified by
another statement.
Note that any repository modifications made during the execution of
this method will not be post-processed by DdlValidator
.
For instance, DdlValidator.checkJmiConstraints(RefObject)
is not
called, and therefore any mandatory default primitives are not
automatically set, which will cause errors later if the attributes have
not been explicitly initialized. See JmiObjUtil.setMandatoryPrimitiveDefaults(javax.jmi.reflect.RefObject)
.
completeAfterExecuteUnlocked
in interface DdlMultipleTransactionStmt
ddlValidator
- DDL validator for this statementsession
- reentrant Farrago session which may be used to execute DML
statementssuccess
- whether the execution succeeded; detection of failure can
be used to recover
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |