com.arsdigita.toolbox.ui
Class DataTable.DataBuilderAdapter

java.lang.Object
  extended bycom.arsdigita.util.LockableImpl
      extended bycom.arsdigita.toolbox.ui.DataTable.DataBuilderAdapter
All Implemented Interfaces:
Lockable, TableModelBuilder
Enclosing class:
DataTable

protected static class DataTable.DataBuilderAdapter
extends LockableImpl
implements TableModelBuilder

Adapts a DataQueryBuilder into a TableModelBuilder. Wraps the query returned by the builder in a DataQueryTableModel.

See Also:
DataTable.DataQueryTableModel

Field Summary
 
Fields inherited from interface com.arsdigita.bebop.table.TableModelBuilder
versionId
 
Constructor Summary
DataTable.DataBuilderAdapter()
          Create a new DataBuilderAdapter
 
Method Summary
protected  DataQuery createQuery(DataTable t, PageState s)
          Obtain a DataQuery and apply query events to it.
 TableModel makeModel(Table table, PageState s)
          Construct a DataQueryTableModel by wrapping the query.
 
Methods inherited from class com.arsdigita.util.LockableImpl
isLocked, lock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked, lock
 

Constructor Detail

DataTable.DataBuilderAdapter

public DataTable.DataBuilderAdapter()
Create a new DataBuilderAdapter

Method Detail

createQuery

protected DataQuery createQuery(DataTable t,
                                PageState s)
Obtain a DataQuery and apply query events to it. The query events may add additional filters to the query, among other things. Finally, retrieve the current sort column from the parent DataTable and apply it to the query

Parameters:
t - the parent DataTable
s - the current page state
Returns:
the final DataQuery, which is now ready to be wrapped in a DataQueryTableModel
See Also:
DataTable.DataQueryTableModel

makeModel

public TableModel makeModel(Table table,
                            PageState s)
Construct a DataQueryTableModel by wrapping the query.

Specified by:
makeModel in interface TableModelBuilder
Parameters:
table - the parent DataTable
s - the current page state
Returns:
a DataQueryTableModel that will iterate through the query
See Also:
DataTable.DataQueryTableModel


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC