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 GXITableRowCollection
public int getRowCount()
getRowCount
in interface GXITableRowCollection
public GXITableRow getRow(int rowIndex)
getRow
in interface GXITableRowCollection
rowIndex
- the row's index. Should range between 0 to rowCount - 1.GXITableRowCollection.getRowCount()
public void addRow(GXITableRow row)
GXITableRowCollection
addRow
in interface GXITableRowCollection
row
- the row to add.public void removeRow(int rowIndex)
GXITableRowCollection
removeRow
in interface GXITableRowCollection
rowIndex
- row index to be removed. Should range between 0 to rowCount - 1.public void removeRow(GXITableRow row)
GXITableRowCollection
removeRow
in interface GXITableRowCollection
row
- the row to remove.public void addFilter(GXIRowsFilter filter)
GXITableRowCollection
addFilter
in interface GXITableRowCollection
filter
- the filter to be added.GXIRowsFilter
,
GXITableRowCollection.filterRows()
public GXIRowsFilter[] getFilters()
getFilters
in interface GXITableRowCollection
public void removeFilter(GXIRowsFilter filter)
GXITableRowCollection
removeFilter
in interface GXITableRowCollection
filter
- the filter to remove.public GXITableRowCollection filterRows()
GXITableRowCollection
filterRows
in interface GXITableRowCollection
GXIRowsFilter.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 GXITableRowCollection
rowIndex
- should range between 0 - rowsCount - 1.columnIndex
- should range between 0 - columnsCount - 1.public GXITableCell getItem(int rowIndex, String columnName)
getItem
in interface GXITableRowCollection
rowIndex
- should range between 0 - rowsCount - 1.columnName
- the name of the column.public String getItemContent(int rowIndex, int columnIndex)
getItemContent
in interface GXITableRowCollection
rowIndex
- should range between 0 - rowsCount - 1.columnIndex
- should range between 0 - columnsCount - 1.public String getItemContent(int rowIndex, String columnName)
getItemContent
in interface GXITableRowCollection
rowIndex
- should range between 0 - rowsCount - 1.columnName
- the name of the column.public void setItemContent(int rowIndex, int columnIndex, String content)
GXITableRowCollection
setItemContent
in interface GXITableRowCollection
rowIndex
- 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)
GXITableRowCollection
setItemContent
in interface GXITableRowCollection
rowIndex
- 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)
GXITableRowCollection
getRowByKey
in interface GXITableRowCollection
primaryKey
- 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)
GXITableRowCollection
getRowByKey
in interface GXITableRowCollection
primaryKey
- the requested primary key.GXITable.getPrimaryKey()
public void sort(GXAbstractSorter sorter, GXIComparator comparator)
GXITableRowCollection
sort
in interface GXITableRowCollection
sorter
- 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 Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright 2021 Software AG. All rights reserved. Use is subject to license terms.