public class FTablePivotDataSource
extends com.jidesoft.pivot.TableModelPivotDataSource
FTableAtm.
This class retrieves data from an FTableAtm instance and
presents it in a pivoted format. It is designed for efficient data access,
particularly for large datasets, by using an internal caching mechanism
and asynchronous prefetching of data for slow columns.
| Constructor and Description |
|---|
FTablePivotDataSource(FTableAtm _atm)
Constructs a new
FTablePivotDataSource with the specified FTableAtm instance. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFieldName(int idx)
Returns the field name for a column at the specified index.
|
java.lang.Object |
getValueAt(int row,
int col)
Retrieves the value at the specified row and column.
|
void |
prefetch(int col)
Prefetches data for a specific column asynchronously.
|
void |
reset()
Resets the internal state of the data source, particularly the column prefetching status.
|
addTableModelListener, applyFilters, applyFilters, clearFilters, getActualRowIndex, getFieldCount, getFieldTitle, getFieldType, getFilteredRowIndex, getPossibleValues, getRowCount, getTableModel, hasFilter, removeTableModelListener, setExcludeFilter, setFilter, setFilter, setTableModel, setValueAtpublic void reset()
This method initializes the prefetchedColumns array. Columns that are
not marked as "slow" are considered already prefetched, while others will be subject to
future asynchronous prefetching.
public java.lang.String getFieldName(int idx)
This method retrieves the field name based on the column's display property. If the display property is ".", it falls back to the column's title. Otherwise, it uses the display property itself as the field name.
getFieldName in interface com.jidesoft.pivot.PivotDataSourcegetFieldName in class com.jidesoft.pivot.TableModelPivotDataSourceidx - The index of the column.String.public java.lang.Object getValueAt(int row,
int col)
This method first checks if the column's data has been prefetched.
If not, it triggers a synchronous prefetch operation. It then retrieves
the annotated value from the underlying FTableAtm and returns its
raw value.
getValueAt in interface com.jidesoft.pivot.PivotDataSourcegetValueAt in class com.jidesoft.pivot.TableModelPivotDataSourcerow - The row index.col - The column index.public void prefetch(int col)
This method triggers an asynchronous prefetch operation for all rows
in the specified column. It uses the SPU class to execute the prefetch
task off the Event Dispatch Thread (EDT) and blocks until the operation
is complete, ensuring that the data is ready before it is accessed.
col - The index of the column to prefetch.Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.