com.nqadmin.swingSet
Interface SSDBNav

All Known Implementing Classes:
SSDBNavAdapter, SSDBNavImp

public interface SSDBNav

SSDBNav.java

SwingSet - Open Toolkit For Making Swing Controls Database-Aware

 Interface that provides a set of functions to perform some custom operation
 before a record is added, after a record is added, before a record is deleted
 and after a record is deleted.

 These functions are called by the SSDataNavigator if the SSDBNav datamember of
 the SSDataNavigator is set using the setDBNav() function of the
 SSDataNavigator.

      performPreInsertOps() is called when the user presses the insert button.

      performPostInsertOps() is called when the user presses the commit button
           after updating the values for the newly inserted row. If the user
           presses the Undo button after the insert button is pressed the
           insertion is cancelled and this function will not be called.

      performPreDeletionOps() is called when the user presses the delete
           button, but just before the deleteRow() method is called on the
           SSRowSet.

      performPostDeletionOps() is called when the user presses the delete
           button and after the deleteRow() method is called on the SSRowSet.

      Note that both the performPreDeletionOps() and performPostDeletionOps()
      will be executed when the user presses the delete button.

Version:
$Revision: 1.14 $
Author:
$Author: prasanth $

Field Summary
static int NAVIGATION_FIRST
          Constant indicating the navigation button first.
static int NAVIGATION_LAST
          Constant indicating the navigation button last.
static int NAVIGATION_NEXT
          Constant indicating the navigation button next.
static int NAVIGATION_PREVIOUS
          Constant indicating the navigation button previous.
 
Method Summary
 boolean allowDeletion()
          This function will be called after performPreDeletionOps is called but before the row is deleted.
 boolean allowInsertion()
          This function is called just before inserting the row into the database
 boolean allowUpdate()
          This functions is called just before calling the updateRow on the rowset.
 void performCancelOps()
          Method to perform operations when the user is on the insert row and cancels the insert by clicking on the undo button.
 void performNavigationOps(int _navigationType)
          Method to perform navigation-related operations.
 void performPostDeletionOps()
          Method to perform post-deletion operations.
 void performPostInsertOps()
          Method to perform post-insertion operations.
 void performPostUpdateOps()
          Method to perform operations after the updateRow has been called.
 void performPreDeletionOps()
          Method to perform pre-deletion operations.
 void performPreInsertOps()
          Method to perform pre-insertion operations.
 void performRefreshOps()
          Method to perform operations when the user hits the refresh button.
 

Field Detail

NAVIGATION_NEXT

static final int NAVIGATION_NEXT
Constant indicating the navigation button next.

See Also:
Constant Field Values

NAVIGATION_PREVIOUS

static final int NAVIGATION_PREVIOUS
Constant indicating the navigation button previous.

See Also:
Constant Field Values

NAVIGATION_FIRST

static final int NAVIGATION_FIRST
Constant indicating the navigation button first.

See Also:
Constant Field Values

NAVIGATION_LAST

static final int NAVIGATION_LAST
Constant indicating the navigation button last.

See Also:
Constant Field Values
Method Detail

performPreInsertOps

void performPreInsertOps()
Method to perform pre-insertion operations.


allowInsertion

boolean allowInsertion()
This function is called just before inserting the row into the database

Returns:
true is row can be inserted else false.

performPostInsertOps

void performPostInsertOps()
Method to perform post-insertion operations. In addition to this you can have a listener on the SSRowSet attached to a SSDataNavigator to get notified when a row is inserted.


performCancelOps

void performCancelOps()
Method to perform operations when the user is on the insert row and cancels the insert by clicking on the undo button.


allowDeletion

boolean allowDeletion()
This function will be called after performPreDeletionOps is called but before the row is deleted.

Returns:
true if the row can be deleted else false.

performPreDeletionOps

void performPreDeletionOps()
Method to perform pre-deletion operations. SSRowSet provides notification before the deletion of a row.


performPostDeletionOps

void performPostDeletionOps()
Method to perform post-deletion operations. The SSRowSet listener also provides the notification after the deletion of the row.


performNavigationOps

void performNavigationOps(int _navigationType)
Method to perform navigation-related operations. Possible values are NAVIGATION_NEXT, NAVIGATION_PREVIOUS, NAVIGATION_FIRST, NAVIGATION_LAST.

Parameters:
_navigationType - this indicates the type of navigation.

performRefreshOps

void performRefreshOps()
Method to perform operations when the user hits the refresh button.


allowUpdate

boolean allowUpdate()
This functions is called just before calling the updateRow on the rowset.

Returns:
true is the row can be updated else false.

performPostUpdateOps

void performPostUpdateOps()
Method to perform operations after the updateRow has been called.