public class JoSQLSwingTableModel extends Query implements TableModel
| 构造器和说明 |
|---|
JoSQLSwingTableModel() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addTableModelListener(TableModelListener l) |
void |
clearResults()
Clear any results.
|
QueryResults |
execute(List l)
Exectute the query and return the results.
|
Class |
getColumnClass(int i)
The expected class of the object at column i.
|
int |
getColumnCount()
Get the number of columns.
|
String |
getColumnName(int ind)
Get the name of the column, if the query has not yet been parsed then
null is returned,
if the column does not have an alias then "ind + 1" is returned. |
QueryResults |
getResults()
Get any results, will be null unless
execute(List) has been called. |
int |
getRowCount()
Number of rows.
|
Object |
getValueAt(int r,
int c)
Get the object at row r, column c.
|
boolean |
isCellEditable(int r,
int c)
Cells are not editable since we do not store the results separately.
|
void |
parse(String sql)
Parse the SQL.
|
void |
removeTableModelListener(TableModelListener l) |
QueryResults |
reorder(List objs,
SortedMap dirs)
Re-order the columns according to the column indices provided in dirs.
|
QueryResults |
reorder(List objs,
String orderBys)
Re-order the columns according to the string representation provided by orderBys.
|
void |
setValueAt(Object v,
int r,
int c)
Not supported, always throws a:
UnsupportedOperationException. |
addBindVariableChangedListener, addFunctionHandler, addSaveValueChangedListener, addTiming, doExecuteOn, execute, execute, fireBindVariableChangedEvent, fireSaveValueChangedEvent, getAliases, getAllObjects, getAnonymousBindVariableName, getClassLoader, getColumns, getCurrentObject, getDefaultFunctionHandlers, getExecuteOnFunctions, getFrom, getFromObjectClass, getFunctionHandler, getFunctionHandlers, getGroupByColumns, getGroupBySaveValue, getGroupBySaveValues, getGroupByVariable, getHavingClause, getLimit, getObjectComparator, getOrderByColumns, getOrderByComparator, getParent, getQuery, getQueryResults, getSaveValue, getTopLevelQuery, getVariable, getVariable, getVariableClass, getVariables, getWhereClause, getWildcardCharacter, init, initOrderByComparator, isWantObjects, isWhereTrue, loadClass, parseAndExec, parsed, removeBindVariableChangedListener, removeSaveValueChangedListener, setAllObjects, setClassLoader, setClassName, setColumns, setCurrentGroupByObjects, setCurrentObject, setExecuteOnFunctions, setFrom, setFromObjectClass, setGroupByColumns, setGroupByLimit, setGroupByOrderColumns, setHaving, setLimit, setObjectComparator, setOrderByColumns, setParent, setSaveValue, setSaveValues, setVariable, setVariable, setVariables, setWantDistinctResults, setWantObjects, setWantTimings, setWhere, setWildcardCharacter, toStringpublic void parse(String sql) throws QueryParseException
parse 在类中 Querysql - The SQL.QueryParseException - If the sql cannot be parsed or if the query will not return
columns.public QueryResults reorder(List objs, SortedMap dirs) throws QueryExecutionException, QueryParseException
reorder 在类中 Queryobjs - The objects to reorder.dirs - The columns to order by.QueryExecutionException - If something goes wrong during execution of the
query.QueryParseException - If the column indices are out of range for the statement.Query.reorder(List,SortedMap)public QueryResults reorder(List objs, String orderBys) throws QueryParseException, QueryExecutionException
reorder 在类中 Queryobjs - The objects to reorder.orderBys - The columns to order by.QueryExecutionException - If something goes wrong during execution of the
query.QueryParseException - If the column indices are out of range for the statement.Query.reorder(List,String)public QueryResults execute(List l) throws QueryExecutionException
execute 在类中 Queryl - The List of objects to execute the query on.QueryExecutionException - If the query cannot be executed, or if the query
is set to return objects rather than "columns".public QueryResults getResults()
execute(List) has been called.public void clearResults()
public String getColumnName(int ind)
null is returned,
if the column does not have an alias then "ind + 1" is returned.getColumnName 在接口中 TableModelpublic Class getColumnClass(int i)
getColumnClass 在接口中 TableModelpublic Object getValueAt(int r, int c)
getValueAt 在接口中 TableModelr - The row.c - The column.public void setValueAt(Object v, int r, int c) throws UnsupportedOperationException
UnsupportedOperationException.setValueAt 在接口中 TableModelv - The object to set at the location.r - The row.c - The column.UnsupportedOperationException - Not supported.public boolean isCellEditable(int r,
int c)
isCellEditable 在接口中 TableModelr - The row.c - The columns.false.public int getRowCount()
getRowCount 在接口中 TableModelpublic int getColumnCount()
getColumnCount 在接口中 TableModelpublic void removeTableModelListener(TableModelListener l)
removeTableModelListener 在接口中 TableModelpublic void addTableModelListener(TableModelListener l)
addTableModelListener 在接口中 TableModelCopyright © 2021. All rights reserved.