ariba.ui.table
Class AWTDataSource

java.lang.Object
  extended by ariba.ui.table.AWTDataSource
Direct Known Subclasses:
AWTCSVDataSource, DetailDataSource, ObjectContextDataSource

public abstract class AWTDataSource
extends java.lang.Object


Constructor Summary
AWTDataSource()
           
 
Method Summary
 boolean dataSourceDoesSort()
          Apps that wish to sort in the database and *re-fetch* upon a user sort change should do so by implementing a AWTDataSource subclass and binding that to the AWTDisplayGroup for their table.
 void delete(java.lang.Object object)
           
 AWTEntity entity()
           
abstract  java.util.List fetchObjects()
          Returns the list of objects.
 boolean hasChanges()
          Should return true when underlying changes in the datasource indicate that the DisplayGroup should automatcally call fetchObjects() as soon as possible to present the user with recent changes.
 java.lang.Object insert()
           
 void setSortOrderings(java.util.List<AWTSortOrdering> orderings)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTDataSource

public AWTDataSource()
Method Detail

fetchObjects

public abstract java.util.List fetchObjects()
Returns the list of objects. Should list should be sorted if dataSourceDoesSort() has been overridden to return true

Returns:
array of fetched objects

entity

public AWTEntity entity()

hasChanges

public boolean hasChanges()
Should return true when underlying changes in the datasource indicate that the DisplayGroup should automatcally call fetchObjects() as soon as possible to present the user with recent changes. Datasources for which fetching is not "free" should override this method to return false either always, or at least unless a special event has occured that indicates re-performing a fetch is warrented.

Returns:
true if a fetch should be triggered immediately.

setSortOrderings

public void setSortOrderings(java.util.List<AWTSortOrdering> orderings)

dataSourceDoesSort

public boolean dataSourceDoesSort()
Apps that wish to sort in the database and *re-fetch* upon a user sort change should do so by implementing a AWTDataSource subclass and binding that to the AWTDisplayGroup for their table. When using a DataSource, the app should *not* assign objects directly to the DisplayGroup via setObjectArray(), *nor* should it use the DataTable's `list` binding. Instead, it should rely on the DataSource's fetch method to return the (sorted) list of objects.

Returns:
whether data source fetchObjects() method will return objects sorted according the most recent sort order set via setSortOrderings()

insert

public java.lang.Object insert()

delete

public void delete(java.lang.Object object)


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.