|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQDataSet
Collection of AQDataRows stored in memory. An instance of this object can be constructed by calling one of the aqua.data.newDataSet() methods.
Sorting This data set object supports sorting. In order to sort the set, sorting criteria must be established by calling setSorting*** method for a desired column, followed bysort()
method.
The sorting criteria can be set for more than one
column, in which case the sorting priority will be determined by the order of setSorting*** calls.
Method Summary | |
---|---|
void |
add(AQDataRow row)
Append a new row at the end of the data set. |
AQDataRow |
addRow()
Add a new row to the end of the list of rows. |
AQDataRow |
addRowWithValues(Object... values)
Add a new row with the specified column values at the end of the data set. |
void |
append(AQDataSet data)
Appends another data set. |
void |
clear()
Removes all of the elements from this list. |
void |
clearSorting()
Clears the sorting criteria set on the columns previously with setSortingXXX() methods. |
AQDataRow |
get(int index)
Returns the data row at the specified position. |
byte[] |
getAsExcel2003()
Returns the data set as a byte array representing an Excel 2003 file. |
byte[] |
getAsExcel2003(AQDataSetSettings settings,
AQChart chart)
Returns the data set, with chart enabled, as a byte array representing an Excel 2003 file. |
byte[] |
getAsExcel2007()
Returns the data set as a byte array representing an Excel 2007 file. |
byte[] |
getAsExcel2007(AQDataSetSettings settings,
AQChart chart)
Returns the data set, with chart enabled, as a byte array representing an Excel 2007 file. |
int |
getColumnCount()
Returns number of columns in this data set. |
String[] |
getColumnNames()
Returns an array of column names. |
AQColumnStructure |
getColumnStructure()
Returns column structure information. |
AQDataReader |
getReader()
Creates a new reader (with its own cursor) suitable for sequential access. |
int |
getRowCount()
Returns the number of rows in this data set. |
Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the data value at columnIndex and
rowIndex . |
void |
importData(AQDataReader in)
Imports data row by row, performing necessary structural conversion. |
void |
insert(int index,
AQDataRow row)
Insert row at the specified index. |
AQDataRow |
insertRow(int index)
Insert a new row at specified index. |
AQDataRow |
insertRowWithValues(int index,
Object... values)
Insert a new row at specified index with the specified column values. |
boolean |
isSortingAscending(int column)
Returns true if the specified column has been configured for sorting in ascending direction. |
boolean |
isSortingAscending(String column)
Returns true if the specified column has been configured for sorting in ascending direction. |
boolean |
isSortingDescending(int column)
Returns true if the specified column has been configured for sorting in descending direction. |
boolean |
isSortingDescending(String column)
Returns true if the specified column has been configured for sorting in descending direction. |
boolean |
isSortingNone(int column)
Returns true if the specified column has no sorting configured. |
boolean |
isSortingNone(String column)
Returns true if the specified column has no sorting configured. |
void |
read(AQDataReader in)
Reads in data from a data stream. |
AQDataRow |
remove(int index)
Removes the element at the specified position in the data set. |
String |
renderHtml()
Converts the data set to a HTML document using the default grid settings . |
String |
renderHtml(AQDataSetSettings settings)
Converts the data set to a HTML document using the specified grid settings . |
String |
renderHtml(AQDataSetSettings settings,
AQChart chart)
Converts the data set to a HTML document, with chart enabled, using the specified grid settings . |
String |
renderText()
Converts the data set to a formatted plain text grid using the default grid settings . |
String |
renderText(AQDataSetSettings settings)
Converts the data set to a formatted plain text grid using the specified grid settings . |
String |
renderText(int lineCount)
Converts the data set, up to lineCount rows, to a formatted plain text grid using the default
grid settings . |
void |
saveAsExcel2003(String filename)
Saves the data set to an Excel2003 file. |
void |
saveAsExcel2003(String fileName,
AQDataSetSettings settings,
AQChart chart)
Saves the data set, with chart enabled, as an Excel 2003 file. |
void |
saveAsExcel2007(String filename)
Saves the data set to an Excel2007 file. |
void |
saveAsExcel2007(String fileName,
AQDataSetSettings settings,
AQChart chart)
Saves the data set, with chart enabled, as an Excel 2007 file. |
void |
setColumnNames(String[] columnNames)
Sets column names. |
void |
setSortingAscending(int column)
Sets ascending sorting direction for the specified column. |
void |
setSortingAscending(String column)
Sets ascending sorting direction for the specified column. |
void |
setSortingCollator(int column,
Collator collator)
Sets collator for the specified column. |
void |
setSortingCollator(String column,
Collator collator)
Sets collator for the specified column. |
void |
setSortingDescending(int column)
Sets descending sorting direction for the specified column. |
void |
setSortingDescending(String column)
Sets descending sorting direction for the specified column. |
void |
setSortingNone(int column)
Sets no sorting for the specified column, discarding any sorting options set for that column. |
void |
setSortingNone(String column)
Sets no sorting for the specified column, discarding any sorting options set for that column. |
void |
setSortingUseToString(int column,
boolean useToString)
Sets whether sorting should use binary value or toString() representation. |
void |
setSortingUseToString(String column,
boolean useToString)
Sets whether sorting should use binary value or toString() representation. |
void |
sort()
Sorts data set using sorting criteria configured previously by calls to setSortingXXX() methods. |
void |
sort(int column,
boolean ascending)
Sorts the data set using natural ordering. |
void |
sort(int column,
boolean ascending,
Comparator comparator)
Sorts the data set using specified comparator. |
void |
sort(String column,
boolean ascending)
Sorts the data set using natural ordering. |
void |
sort(String column,
boolean ascending,
Comparator comparator)
Sorts the data set using specified comparator. |
Method Detail |
---|
void read(AQDataReader in) throws Exception
importData(com.aquafold.openapi.io.AQDataReader)
instead.
in
- Source data reader.
Exception
AQDataReader getReader()
AQColumnStructure getColumnStructure()
void setColumnNames(String[] columnNames)
columnNames
- Column names.String[] getColumnNames()
void add(AQDataRow row)
row
- Source data row.void insert(int index, AQDataRow row)
index
- 0-based row index.row
- Source data row.AQDataRow addRow()
AQDataRow insertRow(int index)
index
- 0-based index at which new row is inserted.
AQDataRow addRowWithValues(Object... values)
values
- Vararg sequence of column values for the new row.
AQDataRow insertRowWithValues(int index, Object... values)
index
- 0-based index at which new row is inserted.values
- Vararg sequence of column values for the new row.
AQDataRow get(int index)
index
- 0-based row index.AQDataRow remove(int index)
index
- 0-based row index.void clear()
int getRowCount()
int getColumnCount()
void importData(AQDataReader in) throws Exception
in
- Source data reader.
Exception
void append(AQDataSet data) throws Exception
data
- Source data set.
Exception
void sort(String column, boolean ascending)
column
- Column name.ascending
- Sort order.void sort(int column, boolean ascending)
column
- Column index.ascending
- Sort order.void sort(String column, boolean ascending, Comparator comparator)
column
- Column name.ascending
- Sort order.comparator
- Comparator to use.void sort(int column, boolean ascending, Comparator comparator)
column
- Column index.ascending
- Sort order.comparator
- Comparator to use.void setSortingAscending(String column)
sort()
to actually sort the data.
column
- Column name.void setSortingAscending(int column)
sort()
to actually sort the data.
column
- Column index.void setSortingDescending(String column)
sort()
to actually sort the data.
column
- Column name.void setSortingDescending(int column)
sort()
to actually sort the data.
column
- Column index.void setSortingNone(String column)
sort()
to actually sort the data.
column
- Column name.void setSortingNone(int column)
sort()
to actually sort the data.
column
- Column index.boolean isSortingAscending(String column)
column
- Column name.boolean isSortingAscending(int column)
column
- Column index.boolean isSortingDescending(String column)
column
- Column name.boolean isSortingDescending(int column)
column
- Column index.boolean isSortingNone(String column)
column
- Column name.boolean isSortingNone(int column)
column
- Column index.void setSortingCollator(String column, Collator collator)
column
- Column name.collator
- void setSortingCollator(int column, Collator collator)
column
- Column index.collator
- void setSortingUseToString(String column, boolean useToString)
sort()
to actually sort the data.
column
- Column name.useToString
- void setSortingUseToString(int column, boolean useToString)
sort()
to actually sort the data.
column
- Column index.useToString
- void clearSorting()
void sort()
clearSorting()
has been called.
This method allows sorting using multiple columns.
void saveAsExcel2003(String filename) throws Exception
filename
- File name.
Exception
void saveAsExcel2003(String fileName, AQDataSetSettings settings, AQChart chart) throws Exception
fileName
- the name of the file where the data set to be savedsettings
- a data set settings, default settings are used if nullchart
- an object that describes how chart to be presented; ignored if null
Exception
byte[] getAsExcel2003() throws Exception
Exception
byte[] getAsExcel2003(AQDataSetSettings settings, AQChart chart) throws Exception
settings
- a data set settings, default settings are used if nullchart
- an object that describes how chart to be presented; ignored if null
Exception
void saveAsExcel2007(String filename) throws Exception
filename
- File name.
Exception
void saveAsExcel2007(String fileName, AQDataSetSettings settings, AQChart chart) throws Exception
fileName
- the name of the file where the data set to be savedsettings
- a data set settings, default settings are used if nullchart
- an object that describes how chart to be presented; ignored if null
Exception
byte[] getAsExcel2007() throws Exception
Exception
byte[] getAsExcel2007(AQDataSetSettings settings, AQChart chart) throws Exception
settings
- a data set settings, default settings are used if nullchart
- an object that describes how chart to be presented; ignored if null
Exception
Object getValueAt(int rowIndex, int columnIndex)
columnIndex
and
rowIndex
. This method returns null instead of throwing an exception
when row or column index are outside of the data set range.
rowIndex
- 0-based row index.columnIndex
- 0-based column index.String renderText()
grid settings
.
String renderText(int lineCount)
lineCount
rows, to a formatted plain text grid using the default
grid settings
.
lineCount
- the maximum number of rows to display
String renderText(AQDataSetSettings settings)
settings
.
settings
- a grid settings
String renderHtml()
settings
.
String renderHtml(AQDataSetSettings settings)
settings
.
settings
- a grid settings
String renderHtml(AQDataSetSettings settings, AQChart chart)
settings
.
settings
- a grid settingschart
- an object that describes how chart to be presented; ignored if null
|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |