|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object butler.sql.query.Query butler.sql.query.ScrollQuery
public class ScrollQuery
Scrollable query. This means that the query returns a maximum number of records, and uses a record as start record. This query should be used by client that can't show a infinite number of queries. The client is supposed to have "Page down" and "Page up" functions which uses this query. This query takes another query and modifies the where-clause and order by so scroll functionality is possible. If the original query has no sort criterias, the primary key will be used. If it has, the sort criteria must be unique.
Field Summary |
---|
Fields inherited from class butler.sql.query.Query |
---|
_cols, _comparator, _filter, _maxNoOfRec, _name, _table, _uniqueSort |
Constructor Summary | |
---|---|
ScrollQuery(Query nestedQuery,
boolean down,
int maxNo,
boolean first)
|
Method Summary | |
---|---|
void |
addColumn(Column col)
Adds a column to retrieve. |
QueryInstance |
createInstance()
Creates a instance of this query. |
java.util.List |
getColumns()
Returns a list of the columns to retrieve. |
RecordComparator |
getComparator()
|
Join |
getJoinByAlias(java.lang.String alias)
|
java.util.List |
getJoins()
Returns the joins for this query. |
java.lang.String |
getName()
Returns the query name. |
ScrollFilter |
getScrollFilter()
|
Table |
getTable()
|
Join |
join(ForeignKey fk)
Joins another table to this query by a given foreign key. |
Join |
join(Table table)
Joins another table to this query by a given table. |
java.util.Iterator |
newIterator(java.sql.ResultSet rs)
|
Join |
outerJoin(ForeignKey fk)
Joins another table to this query by a given foreign key, using left outer join. |
Join |
outerJoin(Table table)
Joins another table to this query by a given table, using left outer join. |
static ScrollQuery |
parseScrollQuery(org.dom4j.Element element)
|
protected void |
registerJoin(java.lang.String alias,
Join join)
|
void |
setAscending(boolean asc)
|
void |
setFilter(Filter filter)
Sets the filter (where-clause). |
void |
setName(java.lang.String name)
Sets the query name |
void |
toXML(org.xml.sax.ContentHandler handler)
|
Methods inherited from class butler.sql.query.Query |
---|
addColumn, addFunctionColumn, addSortCriteria, addSortCriteria, addSortCriteria, addSortCriteria, addSubQuery, checkPermission, copy, createTableDictonary, getColumn, getFilter, getFilter, getHaving, getMainTable, getMaxNoOfRecords, getPhysicalColumns, getSortCriterias, getSQL, getSubQueries, getUnions, is2D, isNested, isUnion, isUniqueSort, join, join, modifyFilter, newIterator, outerJoin, parse, parse, parseQuery, recursiveJoin, run, setAggregate, setAlias, setDistinct, setHaving, setMaxNoOfRecords, setNested, setRecordComparator, setSortCriterias, setUnion, setUniqueSort, toXML, union |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScrollQuery(Query nestedQuery, boolean down, int maxNo, boolean first) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void setAscending(boolean asc)
public ScrollFilter getScrollFilter()
public void setName(java.lang.String name)
setName
in class Query
public java.lang.String getName()
getName
in class Query
public void addColumn(Column col)
addColumn
in class Query
public java.util.List getColumns()
getColumns
in class Query
public void setFilter(Filter filter) throws java.lang.Exception
setFilter
in class Query
java.lang.Exception
public Join join(ForeignKey fk) throws java.lang.Exception
join
in interface Joinable
join
in class Query
java.lang.Exception
public Join outerJoin(ForeignKey fk) throws java.lang.Exception
outerJoin
in interface Joinable
outerJoin
in class Query
java.lang.Exception
public Join join(Table table) throws java.lang.Exception
join
in class Query
java.lang.Exception
public Join outerJoin(Table table) throws java.lang.Exception
outerJoin
in class Query
java.lang.Exception
public java.util.List getJoins()
getJoins
in class Query
public QueryInstance createInstance()
createInstance
in class Query
public Table getTable()
getTable
in class Query
public Join getJoinByAlias(java.lang.String alias)
getJoinByAlias
in class Query
protected void registerJoin(java.lang.String alias, Join join)
registerJoin
in class Query
public RecordComparator getComparator() throws java.lang.Exception
getComparator
in class Query
java.lang.Exception
public java.util.Iterator newIterator(java.sql.ResultSet rs) throws java.lang.Exception
java.lang.Exception
public void toXML(org.xml.sax.ContentHandler handler) throws java.lang.Exception
toXML
in class Query
java.lang.Exception
public static ScrollQuery parseScrollQuery(org.dom4j.Element element) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |