com.sas.table
Interface InsertRowInterface

All Known Implementing Classes:
JDBCToTableModelAdapter, SortableTableModelAdapter, TableModelAdapter

public interface InsertRowInterface

Interface for inserting rows to a table. A row can be inserted in the table or extended on the table. If extended then the row will be inserted at the default location (usually the end of the table).


Field Summary
static int DEFAULT_INDEX
          Default index constant.
 
Method Summary
 void cancelUncommittedRow()
          Removes the "fake" row from the model, effectively performing a cancel.
 void commitUncommittedRow()
          Commits the data in the row to the underlying model.
 int getUncommittedRowNumber()
          Returns the index of the "fake" row.
 void insertUncommittedRow(int row)
          Adds a "fake" row to the table model at the specified location.
 boolean isRowInsertionAllowed()
          Indicates whether rows can be inserted into the existing table.
 boolean isTableExtendOnly()
          Indicates whether rows can only be inserted at the default location (usually at the end) of the existing table.
 boolean isUncommittedRowPresent()
          Returns true if the "fake" row exists.
 

Field Detail

DEFAULT_INDEX

static final int DEFAULT_INDEX
Default index constant. Use as the index with insertRow to insert at the default position (usually the end).

See Also:
Constant Field Values
Method Detail

insertUncommittedRow

void insertUncommittedRow(int row)
                          throws com.sas.util.UncheckedException
Adds a "fake" row to the table model at the specified location.

Parameters:
row - The row to add the "fake" row before.
Throws:
com.sas.util.UncheckedException - Provides a catch-all for all Exceptions.

commitUncommittedRow

void commitUncommittedRow()
                          throws com.sas.util.UncheckedException
Commits the data in the row to the underlying model.

Throws:
com.sas.util.UncheckedException - Provides a catch-all for all Exceptions.

cancelUncommittedRow

void cancelUncommittedRow()
                          throws com.sas.util.UncheckedException
Removes the "fake" row from the model, effectively performing a cancel.

Throws:
com.sas.util.UncheckedException - Provides a catch-all for all Exceptions.

isUncommittedRowPresent

boolean isUncommittedRowPresent()
Returns true if the "fake" row exists. Once the row is committed or cancelled then the uncommittedRowPresent is false.

Returns:
true if an uncommitted row exists

getUncommittedRowNumber

int getUncommittedRowNumber()
Returns the index of the "fake" row. Returns -1 if no "fake" row is present.

Returns:
the index of the "fake" row

isRowInsertionAllowed

boolean isRowInsertionAllowed()
Indicates whether rows can be inserted into the existing table.

Returns:
true if new rows can be inserted, false otherwise.

isTableExtendOnly

boolean isTableExtendOnly()
Indicates whether rows can only be inserted at the default location (usually at the end) of the existing table.

Returns:
true if isRowInsertionAllowed is true and the table is only allowed to be extended.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.