Modifier and Type | Method and Description |
---|---|
void |
appendRow()
Appends a new row at the end of the table.
|
void |
appendRows(int numRows)
Appends the specified number of empty rows at the end of the table.
|
void |
clear()
Clears the table by deleting all rows.
|
void |
deleteAllRows()
Deletes all rows of table.
|
void |
deleteRow()
Deletes the current row.
|
void |
deleteRow(int pos)
Deletes the row at the specified position.
|
void |
ensureBufferCapacity(int minRows)
Checks the size of the internal buffer and allocates new memory,
if necessary, and initializes the rows.
|
void |
firstRow()
Moves the row pointer to the first row.
|
int |
getNumColumns()
Returns the number of columns in this table.
|
int |
getNumRows()
Returns the number of rows.
|
JCoRecordFieldIterator |
getRecordFieldIterator()
Returns an iterator over JCoRecordFieldIterator.
|
JCoRecordMetaData |
getRecordMetaData()
Returns the appropriated metadata object, that was used for the
creation of this table.
|
int |
getRow()
Returns the current row number.
|
void |
insertRow(int pos)
Inserts a new empty row before the specified position.
|
boolean |
isEmpty()
Checks whether the table is empty.
|
boolean |
isFirstRow()
Retrieves whether the row pointer is on the first row of this table.
|
boolean |
isLastRow()
Retrieves whether the row pointer is on the last row of this table.
|
void |
lastRow()
Moves the row pointer to the last row.
|
boolean |
nextRow()
Moves the row pointer to the next row.
|
boolean |
previousRow()
Moves the row pointer to the previous row.
|
void |
setRow(int pos)
Sets the row pointer to the specified position.
The first row is at position 0, the second is at position 1, and so on. |
void |
trimToRows()
Trims the capacity of this table to be the table's current number
of rows.
|
clone, copyFrom, getAbapObject, getAbapObject, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBinaryStream, getBinaryStream, getByte, getByte, getByteArray, getByteArray, getChar, getChar, getCharacterStream, getCharacterStream, getCharArray, getCharArray, getClassNameOfValue, getDate, getDate, getDouble, getDouble, getField, getField, getFieldCount, getFieldIterator, getFloat, getFloat, getInt, getInt, getLong, getLong, getMetaData, getShort, getShort, getString, getString, getStructure, getStructure, getTable, getTable, getTime, getTime, getValue, getValue, isInitialized, isInitialized, iterator, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toJSON, toJSON, toXML, toXML, toXML, write, write
JCoRecordMetaData getRecordMetaData()
void ensureBufferCapacity(int minRows)
minRows
- the minimum number of rows to allocate memory forvoid trimToRows()
Note: The reallocation of the internal table buffer increases the temporary memory consumption.
boolean isEmpty()
true
if the table is empty, false
otherwise.boolean isFirstRow()
true
if the row pointer is on the first row, false
otherwise.boolean isLastRow()
true
if the row pointer is on the last row, false
otherwise.int getNumRows()
int getNumColumns()
getFieldCount()
.JCoRecord.getFieldCount()
void clear()
void deleteAllRows()
clear()
.clear()
void firstRow()
void lastRow()
boolean nextRow()
if (table.getNumRows()>0) { table.firstRow(); do { ... } while(table.nextRow()); }
false
if the row pointer is already positioned on the last row of the table, true
otherwiseboolean previousRow()
if (table.getNumRows()>0) { table.lastRow(); do { ... } while(table.previousRow()); }
false
if the row pointer is already positioned on the first row of the table, true
otherwiseint getRow()
void setRow(int pos)
int numRows=table.getNumRows(); for (int irow=0; i<numRows; irow++) { table.setRow(irow); ... }Note: If a negative value is specified, the row pointer is set to position 0, and if the specified value is greater than the number of rows, it is moved to the last row.
pos
- the position to set the row pointer tovoid appendRow()
void appendRows(int numRows)
numRows
- the number of empty rows to appendvoid insertRow(int pos)
pos
- the index of the row, before which the new row
shall be insertedvoid deleteRow()
Note:The row pointer is left untouched unless
it would point to a row that would have become invalid
due to the deletion operation. In this case the row pointer
will be repositioned to the row at (getNumRows() - 1)
.
void deleteRow(int pos)
Note:The row pointer is left untouched unless
it would point to a row that would have become invalid
due to the deletion operation. In this case the row pointer
will be repositioned to the row at (getNumRows() - 1)
.
Example:
If the row pointer points to row 10, it will still point to row 10
after the deletion operation, even if a row with pos < 10 was deleted.
pos
- the index of the row to deleteJCoRecordFieldIterator getRecordFieldIterator()
JCoRecord.iterator()
Copyright © 2016 SAP. All Rights Reserved.