public interface BrowseModel
Modifier and Type | Method and Description |
---|---|
boolean |
applyEnhancedConfig(EnhancedBrowseConfig config)
Apply the given enhanced browse configuration to this browse.
|
java.lang.String[] |
getColumnFiltersMappedDataTypes()
For enhanced filtering: get data types of the fields mapped using
DB-FILTER-FIELD-MAPPING . |
int |
getCurrentRow()
Get current row in the model.
|
WidgetConfig[] |
getEditorsConfigs()
Get configurations of editors (fill-ins, toggle-boxes or combo-boxes) used for in-browse
editing.
|
EnhancedBrowseSaveTarget[] |
getEnhancedBrowseResetTargets()
Get enhanced browse configuration reset targets available for the current browse and the
current user.
|
EnhancedBrowseSaveTarget[] |
getEnhancedBrowseSaveTargets()
Get save targets for an enhanced browse configuration, which are available for the current
user.
|
int |
getRowCount()
Get the number of rows iterated by the query (for preselect queries - matches result size,
for adaptive queries - matches the size of the part of the result set the query has already
iterated over).
|
int |
getRowCount(int startRow)
Get number of available rows starting from the given one.
|
BrowseRow[] |
getRows(char searchChar,
int searchColumn,
int viewportTopRow,
int viewportBottomRow,
int rowDisplayTriggerId,
ScreenBuffer[] sb)
This function is used when search by key is performed in a browse.
|
BrowseRow[] |
getRows(int startRowIndex,
int count,
boolean forward,
int rowDisplayTriggerId,
ScreenBuffer[] sb,
RowDisplayStrategy displayStrategy)
Retrieves several subsequent rows from the database.
|
boolean |
isRowAvailable(int rowIndex)
Determines if the specified browse row is "available", i.e.
|
void |
moveColumn(int src,
int dest)
Implements the MOVE-COLUMN() widget method.
|
void |
notifyBrowseLayoutPerformed()
Notify server that browse layout has been performed on the client side.
|
void |
resetEditorsConfigsCache()
Reset cache of editors configurations.
|
EhBrowseConfigKey |
resetEnhancedConfig(EnhancedBrowseSaveTarget resetTarget)
Reset (delete) an enhanced configuration at the certain level for this browse.
|
boolean |
runReport(java.lang.String outputFileName,
MediaType outputFormat)
Run browse report.
|
EnhancedBrowseConfig |
saveOrCacheEnhancedConfig(EnhancedBrowseSaveTarget saveTarget)
Save the current enhanced browse configuration using the specified save target.
|
int |
setCurrentRow(int rowIndex)
Inform server about current row in the browse.
|
void |
setDynamicFiltering(int[] columnOrdinals,
BaseDataType[] values)
Set dynamic filtering for the browse.
|
void |
setDynamicSorting(int[] columnOrdinals,
boolean[] ascending)
Set dynamic sorting for the browse.
|
void |
updateRow(int rowIndex,
int[] cellIndices,
BaseDataType[] cellValues,
boolean onlyNotifyRowReleased)
Updates selected cells in the given row.
|
WidgetConfig[] getEditorsConfigs()
null
if the
column is not editable. Return value is null
if the browse is
read-only.void resetEditorsConfigsCache()
int getRowCount()
int getRowCount(int startRow)
startRow
- Initial row to start count rows from.BrowseRow[] getRows(int startRowIndex, int count, boolean forward, int rowDisplayTriggerId, ScreenBuffer[] sb, RowDisplayStrategy displayStrategy)
startRowIndex
- Index of the first row to retrieve (0-based).count
- Maximum count of rows to return. -1
for no limit.forward
- true
if rows are retrieved in the forward direction,
false
if rows are retrieved in the backward direction.rowDisplayTriggerId
- Trigger ID of the ROW-DISPLAY trigger. -1
if there is no ROW-DISPLAY
trigger for this browse.sb
- Screen buffer for the ROW-DISPLAY trigger. null
if there is no
ROW-DISPLAY trigger for this browse.displayStrategy
- Specifies type of action for which rows are fetched and defines how rows are
iterated / displayed.null
is returned.BrowseRow[] getRows(char searchChar, int searchColumn, int viewportTopRow, int viewportBottomRow, int rowDisplayTriggerId, ScreenBuffer[] sb)
searchChar
- Character to be searched for. Search is performed using only the first character
(in the visual data representation) in the current column. Specifying a character
puts this function in the search mode. This parameter is null
for
non-search mode.searchColumn
- For search mode: 0-based index of the column to be searched.viewportTopRow
- For search mode: 0-based index (in the result set) of the top row in the current
view.viewportBottomRow
- For search mode: 0-based index (in the result set) of the bottom row in the
current view.rowDisplayTriggerId
- Trigger ID of the ROW-DISPLAY trigger. -1
if there is no ROW-DISPLAY
trigger for this browse.sb
- Screen buffer for the ROW-DISPLAY trigger. null
if there is no
ROW-DISPLAY trigger for this browse.null
is returned.void updateRow(int rowIndex, int[] cellIndices, BaseDataType[] cellValues, boolean onlyNotifyRowReleased) throws DataValidationException
rowIndex
- Index of the row to update.cellIndices
- Cells for update indexes.cellValues
- Cells for update new values.onlyNotifyRowReleased
- Only notify server that the row has been released. Data is not updated.DataValidationException
- New values don't passed database validation rules.int setCurrentRow(int rowIndex)
rowIndex
- 0-based index of the current row.int getCurrentRow()
boolean isRowAvailable(int rowIndex)
rowIndex
- 0-base index of the target row in the browse model.true
if the row is "available", i.e. it is not deleted.void moveColumn(int src, int dest)
Repositions a column in the browse widget.
src
- 0-based position of the column to be moved (column ordinal).dest
- 0-based position to which the column is moved (column ordinal).void notifyBrowseLayoutPerformed()
boolean runReport(java.lang.String outputFileName, MediaType outputFormat)
outputFileName
- Name of the output file.outputFormat
- Format of the output format.true
on success.EnhancedBrowseSaveTarget[] getEnhancedBrowseSaveTargets()
java.lang.String[] getColumnFiltersMappedDataTypes()
DB-FILTER-FIELD-MAPPING
.
They are used in column filters. E.g. if a column has DB-FILTER-FIELD-MAPPING
set to
"some-table.some-date-field", data type from this column would be "date".DB-FILTER-FIELD-MAPPING
set, corresponding array element is null
.EnhancedBrowseSaveTarget[] getEnhancedBrowseResetTargets()
EhBrowseConfigKey resetEnhancedConfig(EnhancedBrowseSaveTarget resetTarget)
resetTarget
- Defines the level at which the configuration will be reset.null
if there is
no configuration at this level.boolean applyEnhancedConfig(EnhancedBrowseConfig config)
config
- Enhanced browse configuration to apply.true
on success.EnhancedBrowseConfig saveOrCacheEnhancedConfig(EnhancedBrowseSaveTarget saveTarget)
saveTarget
- Save target (if configuration is applied to "all browses" / "specific browse" and
"all users" / "current user").null
on error.void setDynamicSorting(int[] columnOrdinals, boolean[] ascending)
columnOrdinals
- Array of the ordinals of the sort columns. Inside the array ordinals are positioned
from the column which defines the most coarse sorting to the most granular.ascending
- Array of the sorting directions of the sort columns. true
for ascending,
false
for descending. Inside the array directions are positioned
from the column which defines the most coarse sorting to the most granular.void setDynamicFiltering(int[] columnOrdinals, BaseDataType[] values)
columnOrdinals
- Array of the ordinals of the filtered columns.values
- Array of the filter values for the filtered columns..