|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TableNavigationV2Interface
Defines an interface that adds to the TableNavigationInterface, which is used for navigating through a table. Implementations of the TableNavigationV2Interface can add support for various commit levels, the ability to page through the table in larger increments, and a simple means for cancelling or refreshing data.
The following table is the recommended implementation for commit level behavior. Some implementations support cell level updates, and these implementations will have distinctions between row and cell level commits. Also, the isModified method should be used to determine when data is "dirty". This can be used to determine whether an autocommit is necessary. It can also be used to throw exceptions or deliver a warning to users who may lose changes that have been made.
COMMITLEVEL_NONE | COMMITLEVEL_ROW | COMMITLEVEL_CELL | |
first, last, next, previous, move, insert, pageForward, pageBackWard | No | Yes | Yes |
cancel | No | No | No |
refresh | No | Yes | Yes |
commit | Yes | Yes | Yes |
The com.sas.models.databean.BaseDataBean class is one class that implements this interface.
TableNavigationInterface
Field Summary | |
---|---|
static int |
COMMITLEVEL_CELL
Automatically commit cells |
static int |
COMMITLEVEL_NONE
Do not automatically commit |
static int |
COMMITLEVEL_ROW
Automatically commit rows |
static int |
DEFAULT_PAGESIZE
Default amount to move when paging through records |
Method Summary | |
---|---|
boolean |
cancel()
Cancels any changes to the current row of the table. |
int |
getAutoCommitLevel()
Gets the the level at which the data will be committed. |
int |
getPageSize()
Gets the number of records in a page. |
java.lang.Exception |
getStatusException()
Gets a status exception. |
boolean |
isCancelSupported()
Determines whether the cancel method can be called. |
boolean |
isPageBackwardSupported()
Determines whether the pageBackward method can be called. |
boolean |
isPageForwardSupported()
Determines whether the pageForward method can be called. |
boolean |
isRefreshSupported()
Determines whether the refresh method can be called. |
boolean |
pageBackward()
Moves the cursor backward one page, which is determined by pageAmount. |
boolean |
pageForward()
Moves the cursor forward one page, which is determined by pageAmount. |
boolean |
refresh()
Refreshes the data in the table. |
void |
setAutoCommitLevel(int autoCommitLevel)
Sets the level at which data will be committed. |
void |
setPageSize(int pageSize)
Sets the number of records in a page. |
Methods inherited from interface com.sas.table.TableNavigationInterface |
---|
commit, delete, first, insert, isCommitSupported, isCursorValid, isDeleteSupported, isFirstSupported, isInsertSupported, isLastSupported, isModified, isNextSupported, isPreviousSupported, last, move, next, previous |
Field Detail |
---|
static final int DEFAULT_PAGESIZE
static final int COMMITLEVEL_NONE
static final int COMMITLEVEL_ROW
static final int COMMITLEVEL_CELL
Method Detail |
---|
boolean cancel()
Cancels any changes to the current row of the table. This includes any updates or inserting a new row into the table.
boolean refresh()
Refreshes the data in the table.
boolean pageForward()
Moves the cursor forward one page, which is determined by pageAmount.
boolean pageBackward()
Moves the cursor backward one page, which is determined by pageAmount.
void setPageSize(int pageSize)
Sets the number of records in a page. To be used when paging forward or backward.
pageSize
- Number of records in a page.int getPageSize()
Gets the number of records in a page. To be used when paging forward or backward.
void setAutoCommitLevel(int autoCommitLevel)
Sets the level at which data will be committed. Valid values are COMMITLEVEL_NONE, COMMITLEVEL_ROW, and COMMITLEVEL_CELL. COMMITLEVEL_NONE is the default.
autoCommitLevel
- Level at which the data will be committed.int getAutoCommitLevel()
Gets the the level at which the data will be committed. Valid values are COMMITLEVEL_NONE, COMMITLEVEL_ROW, and COMMITLEVEL_CELL. COMMITLEVEL_NONE is the default.
java.lang.Exception getStatusException()
Gets a status exception. Many methods on the TableNavigationInterface and TableNaviationV2Interface return false rather than throwing an exception when a method fails. The statusException can be used to communicate a more detail explanation for the failure and this method gets that value.
boolean isCancelSupported()
Determines whether the cancel method can be called.
boolean isRefreshSupported()
Determines whether the refresh method can be called.
boolean isPageForwardSupported()
Determines whether the pageForward method can be called.
boolean isPageBackwardSupported()
Determines whether the pageBackward method can be called.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |