com.nqadmin.swingSet
Class SSDBNavAdapter

java.lang.Object
  extended by com.nqadmin.swingSet.SSDBNavAdapter
All Implemented Interfaces:
SSDBNav, java.io.Serializable
Direct Known Subclasses:
SSDBNavImp

public class SSDBNavAdapter
extends java.lang.Object
implements SSDBNav, java.io.Serializable

SSDBNavAdapter.java

SwingSet - Open Toolkit For Making Swing Controls Database-Aware

 Abstract class that provides empty implementations of all the methods for the
 SSDBNav interface.

 This class is provided for convenience. so that users wishing to write their
 own SSDBNav implementations can just extend the abstract class and override
 the desired methods.

Version:
$Revision: 1.12 $
Author:
$Author: prasanth $
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.nqadmin.swingSet.SSDBNav
NAVIGATION_FIRST, NAVIGATION_LAST, NAVIGATION_NEXT, NAVIGATION_PREVIOUS
 
Constructor Summary
SSDBNavAdapter()
           
 
Method Summary
 boolean allowDeletion()
          This function returns true by default.
 boolean allowInsertion()
          This function always return true.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSDBNavAdapter

public SSDBNavAdapter()
Method Detail

performPreInsertOps

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

Specified by:
performPreInsertOps in interface SSDBNav

allowInsertion

public boolean allowInsertion()
This function always return true. This would allow the insertions if an implementation is not provided.

Specified by:
allowInsertion in interface SSDBNav
Returns:
true is row can be inserted else false.

performPostInsertOps

public 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.

Specified by:
performPostInsertOps in interface SSDBNav

performCancelOps

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

Specified by:
performCancelOps in interface SSDBNav

performPreDeletionOps

public void performPreDeletionOps()
Method to perform pre-deletion operations. SSRowSet does not provide any notifications before the deletion of a row. but a notification will be received after the deletion if you have listener for the SSRowSet.

Specified by:
performPreDeletionOps in interface SSDBNav

allowDeletion

public boolean allowDeletion()
This function returns true by default. This allows for deletion of rows if an implementation is not provided.

Specified by:
allowDeletion in interface SSDBNav
Returns:
returns true.

performPostDeletionOps

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

Specified by:
performPostDeletionOps in interface SSDBNav

performNavigationOps

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

Specified by:
performNavigationOps in interface SSDBNav
Parameters:
_navigationType - this indicates the type of navigation.

performRefreshOps

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

Specified by:
performRefreshOps in interface SSDBNav

allowUpdate

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

Specified by:
allowUpdate in interface SSDBNav
Returns:
true is the row can be updated else false.

performPostUpdateOps

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

Specified by:
performPostUpdateOps in interface SSDBNav