Oracle Data-aware Controls Reference

oracle.dacf.control.swing
Class GridSortDelegate

java.lang.Object
  extended byoracle.dacf.control.swing.GridSortDelegate
All Implemented Interfaces:
SortDelegate

public class GridSortDelegate
extends java.lang.Object
implements SortDelegate

Sort by changing the order by clause

Version:
SDK

Constructor Summary
GridSortDelegate()
           
 
Method Summary
protected  boolean _applyChanges(javax.infobus.ScrollableRowsetAccess scr, int doWhat)
          Propogate changes to the DbAccess.
protected  void _applyChangesToDbAccess(javax.infobus.ScrollableRowsetAccess scr, int doWhat)
           
 boolean isPostAlways()
          indicates if the transaction changes are posted always when sorting.
 void postSort(javax.infobus.ScrollableRowsetAccess scr)
          Implementation may use this method to cleanup
 boolean preSort(javax.infobus.ScrollableRowsetAccess scr)
          GridControl invokes this method, so that the implementation can prepare to sort.
 void setPostAlways(boolean bflag)
          If this flag is true, the transaction changes are posted and the rowset sorted by changing orderby clause.
 boolean sort(javax.infobus.ScrollableRowsetAccess scr, java.lang.String columnName, java.lang.String orderBy)
          GridControl invokes this method to perform the actual sorting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridSortDelegate

public GridSortDelegate()
Method Detail

preSort

public boolean preSort(javax.infobus.ScrollableRowsetAccess scr)
GridControl invokes this method, so that the implementation can prepare to sort. The implementation for example may post changes to the database or prompt the user The return value of this method determines if sorting should continue

Specified by:
preSort in interface SortDelegate
Returns:
true if sorting should continue

sort

public boolean sort(javax.infobus.ScrollableRowsetAccess scr,
                    java.lang.String columnName,
                    java.lang.String orderBy)
GridControl invokes this method to perform the actual sorting. The return value is used by the GridControl to decide if the icon in the table header should change Irrespective of the value returned by this method, the postSort method is always invoked return true if sort was succsessful

Specified by:
sort in interface SortDelegate
Parameters:
columnName - which column to sort

postSort

public void postSort(javax.infobus.ScrollableRowsetAccess scr)
Implementation may use this method to cleanup

Specified by:
postSort in interface SortDelegate

setPostAlways

public void setPostAlways(boolean bflag)
If this flag is true, the transaction changes are posted and the rowset sorted by changing orderby clause. If this flag is false and transaction is dirty, user is prompted to either rollback or commit the transaction. The default value is false


isPostAlways

public boolean isPostAlways()
indicates if the transaction changes are posted always when sorting. The alternative is to commit/rollback.


_applyChanges

protected boolean _applyChanges(javax.infobus.ScrollableRowsetAccess scr,
                                int doWhat)
Propogate changes to the DbAccess. Overrider this method to process the exception


_applyChangesToDbAccess

protected void _applyChangesToDbAccess(javax.infobus.ScrollableRowsetAccess scr,
                                       int doWhat)
                                throws java.sql.SQLException,
                                       javax.infobus.RowsetValidationException
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.