Copyright 2009,2010, Lapetus Systems Ltd. (All rights reserved)

com.lapetus_ltd.api.db.control
Interface ILptsFactoryStatementListener


public interface ILptsFactoryStatementListener

Class Description : The listener for statement events.

When a new statement is created or closed this interface's implementations are informed.

$LastChangedRevision: 620 $
$LastChangedDate:: 2010-05-27 15:26:51#$


Method Summary
 void newStatementCreated(TLptsConnection connection, TLptsStatement statement)
          This informs the implementation that a new statements has been successfully created.
 void newStatementFailed(TLptsConnection connection)
          This informs of a failed attempt to create a statement.
 void newStatementProcessStarted(TLptsConnection connection)
          This is called when a new statement is being created.
 void removedAndClosedStatement(TLptsConnection connection, TLptsStatement statement)
          The TLptsFactoryStatement.removeStatement(TLptsStatement) has been called for removal of the statement from the system.
 

Method Detail

newStatementCreated

void newStatementCreated(TLptsConnection connection,
                         TLptsStatement statement)
This informs the implementation that a new statements has been successfully created. See TLptsFactoryStatement.createNewStatement(com.lapetus_ltd.api.db.control.TLptsConnection, com.lapetus_ltd._2009.xml.types.XLptsDBStatementType) for more information.

Parameters:
connection - The connection used for the creation.
statement - The new statement that contains all the table and column information from the connection.

newStatementFailed

void newStatementFailed(TLptsConnection connection)
This informs of a failed attempt to create a statement.
The logger needs to be checked for details of the actual error.

Parameters:
connection - The connection used for the failed attempt to create a statement.

newStatementProcessStarted

void newStatementProcessStarted(TLptsConnection connection)
This is called when a new statement is being created.

Some statement take a long time to process as there can be literally thousands of columns im many tables.

If the TLptsMainDatabase.setApplicationMainFrame(javax.swing.JFrame) has been set on the main frame of the application,
then the cursor will change to the WAIT mode until #newStatementFailed, #newStatementCreated or an error occurs.

Parameters:
connection - The connection for the creation of the statment.

removedAndClosedStatement

void removedAndClosedStatement(TLptsConnection connection,
                               TLptsStatement statement)
The TLptsFactoryStatement.removeStatement(TLptsStatement) has been called for removal of the statement from the system.
This could also be called internally when a call to TLptsFactoryConnection.removeConnection(com.lapetus_ltd.api.db.control.TLptsConnection, boolean) is made with forceful set to true.
When the command TLptsFactoryStatement.executeOtherStatement(TLptsStatement) is issued, this is function is called after the statement
has completed its task.

Parameters:
connection - The connection that relates to the statement has been closed and removed from the system.
statement - The statement that was removed. This statement is closed and cannot be used for any processing.


Copyright 2009,2010, Lapetus Systems Ltd. (All rights reserved)