public class GXTableRowCollection extends Object implements GXITableRowCollection, Externalizable
| Constructor and Description |
|---|
GXTableRowCollection() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(GXIRowsFilter filter)
Adds a new filter to the table.
|
void |
addRow(GXITableRow row)
Adds a new row as the last row in the table.
|
boolean |
equals(Object obj) |
GXITableRowCollection |
filterRows()
Filters the table's rows according to the filters added to the table.
|
GXIRowsFilter[] |
getFilters() |
GXITableCell |
getItem(int rowIndex,
int columnIndex) |
GXITableCell |
getItem(int rowIndex,
String columnName) |
String |
getItemContent(int rowIndex,
int columnIndex) |
String |
getItemContent(int rowIndex,
String columnName) |
GXITableRow |
getRow(int rowIndex) |
GXITableRow |
getRowByKey(String primaryKey)
Finds a row according to the specified primary key.
|
GXITableRow |
getRowByKey(String[] primaryKey)
Finds a row with the specified primary key values.
|
int |
getRowCount() |
GXITableRow[] |
getRows() |
void |
readExternal(ObjectInput in) |
void |
removeFilter(GXIRowsFilter filter)
Removes the specified filter.
|
void |
removeRow(GXITableRow row)
removes the specified row.
|
void |
removeRow(int rowIndex)
Removes the row at the specified index.
|
void |
setItemContent(int rowIndex,
int columnIndex,
String content)
Sets the contents of the cell at the specified row / column coordinates.
|
void |
setItemContent(int rowIndex,
String columnName,
String content)
Sets the contents of the cell at the specified row / column coordinates.
|
void |
sort(GXAbstractSorter sorter,
GXIComparator comparator)
Sorts the row's data using the specified sorter and comparator.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public GXITableRow[] getRows()
getRows in interface GXITableRowCollectionpublic int getRowCount()
getRowCount in interface GXITableRowCollectionpublic GXITableRow getRow(int rowIndex)
getRow in interface GXITableRowCollectionrowIndex - the row's index. Should range between 0 to rowCount - 1.GXITableRowCollection.getRowCount()public void addRow(GXITableRow row)
GXITableRowCollectionaddRow in interface GXITableRowCollectionrow - the row to add.public void removeRow(int rowIndex)
GXITableRowCollectionremoveRow in interface GXITableRowCollectionrowIndex - row index to be removed. Should range between 0 to rowCount - 1.public void removeRow(GXITableRow row)
GXITableRowCollectionremoveRow in interface GXITableRowCollectionrow - the row to remove.public void addFilter(GXIRowsFilter filter)
GXITableRowCollectionaddFilter in interface GXITableRowCollectionfilter - the filter to be added.GXIRowsFilter,
GXITableRowCollection.filterRows()public GXIRowsFilter[] getFilters()
getFilters in interface GXITableRowCollectionpublic void removeFilter(GXIRowsFilter filter)
GXITableRowCollectionremoveFilter in interface GXITableRowCollectionfilter - the filter to remove.public GXITableRowCollection filterRows()
GXITableRowCollectionfilterRows in interface GXITableRowCollectionGXIRowsFilter.filter(com.sabratec.applinx.baseobject.table.GXITableRowCollection),
GXITableRowCollection.addFilter(com.sabratec.applinx.baseobject.table.GXIRowsFilter)public GXITableCell getItem(int rowIndex, int columnIndex)
getItem in interface GXITableRowCollectionrowIndex - should range between 0 - rowsCount - 1.columnIndex - should range between 0 - columnsCount - 1.public GXITableCell getItem(int rowIndex, String columnName)
getItem in interface GXITableRowCollectionrowIndex - should range between 0 - rowsCount - 1.columnName - the name of the column.public String getItemContent(int rowIndex, int columnIndex)
getItemContent in interface GXITableRowCollectionrowIndex - should range between 0 - rowsCount - 1.columnIndex - should range between 0 - columnsCount - 1.public String getItemContent(int rowIndex, String columnName)
getItemContent in interface GXITableRowCollectionrowIndex - should range between 0 - rowsCount - 1.columnName - the name of the column.public void setItemContent(int rowIndex,
int columnIndex,
String content)
GXITableRowCollectionsetItemContent in interface GXITableRowCollectionrowIndex - should range between 0 - rowsCount - 1.columnIndex - should range between 0 - columnsCount - 1.content - the cell's new content.GXITableCell.setContent(String content)public void setItemContent(int rowIndex,
String columnName,
String content)
GXITableRowCollectionsetItemContent in interface GXITableRowCollectionrowIndex - should range between 0 - rowsCount - 1.columnName - the name of the column.content - the cell's new content.GXITableCell.setContent(String content)public GXITableRow getRowByKey(String[] primaryKey)
GXITableRowCollectiongetRowByKey in interface GXITableRowCollectionprimaryKey - the values of the primary key's columns.Example: If the primary key was defined to be the columns "first name" and "last name", the primaryKey parameter should hold the String array "John", "Doe".
GXITable.getPrimaryKey()public GXITableRow getRowByKey(String primaryKey)
GXITableRowCollectiongetRowByKey in interface GXITableRowCollectionprimaryKey - the requested primary key.GXITable.getPrimaryKey()public void sort(GXAbstractSorter sorter,
GXIComparator comparator)
GXITableRowCollectionsort in interface GXITableRowCollectionsorter - the sorter.comparator - the comparator used for sorting.GXITable.sort(int[] columnIndices, boolean[] isAscending),
GXITable.sort(int columnIndex, boolean isAscending),
GXITable.sort(String columnName, boolean isAscending),
GXITable.sort(String[] columnNames, boolean[] isAscending)public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright 2022 Software AG. All rights reserved. Use is subject to license terms.