butler.sql.query
Class SQLQuery

java.lang.Object
  extended by butler.sql.query.Query
      extended by butler.sql.query.SQLQuery
All Implemented Interfaces:
Joinable, java.lang.Cloneable

public class SQLQuery
extends Query

Query constructed by a raw SQL.

Author:
Fredrik Bertilsson

Field Summary
 
Fields inherited from class butler.sql.query.Query
_cols, _comparator, _filter, _maxNoOfRec, _name, _table, _uniqueSort
 
Constructor Summary
SQLQuery(java.lang.String sql, Schema schema)
           
SQLQuery(java.lang.String sql, Table tab)
           
 
Method Summary
 java.lang.String getSQL()
          Returns the resulting select SQL statement.
 java.util.Iterator newIterator(java.sql.ResultSet rs)
           
static Query parseSQLQuery(org.dom4j.Element element)
           
 void toXML(org.xml.sax.ContentHandler handler)
           
 
Methods inherited from class butler.sql.query.Query
addColumn, addColumn, addFunctionColumn, addSortCriteria, addSortCriteria, addSortCriteria, addSortCriteria, addSubQuery, checkPermission, copy, createInstance, createTableDictonary, getColumn, getColumns, getComparator, getFilter, getFilter, getHaving, getJoinByAlias, getJoins, getMainTable, getMaxNoOfRecords, getName, getPhysicalColumns, getSortCriterias, getSubQueries, getTable, getUnions, is2D, isNested, isUnion, isUniqueSort, join, join, join, join, modifyFilter, newIterator, outerJoin, outerJoin, outerJoin, parse, parse, parseQuery, recursiveJoin, registerJoin, run, setAggregate, setAlias, setDistinct, setFilter, setHaving, setMaxNoOfRecords, setName, 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

SQLQuery

public SQLQuery(java.lang.String sql,
                Table tab)
         throws java.lang.Exception
Throws:
java.lang.Exception

SQLQuery

public SQLQuery(java.lang.String sql,
                Schema schema)
         throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getSQL

public java.lang.String getSQL()
Description copied from class: Query
Returns the resulting select SQL statement.

Overrides:
getSQL in class Query

newIterator

public java.util.Iterator newIterator(java.sql.ResultSet rs)
                               throws java.lang.Exception
Throws:
java.lang.Exception

toXML

public void toXML(org.xml.sax.ContentHandler handler)
           throws java.lang.Exception
Overrides:
toXML in class Query
Throws:
java.lang.Exception

parseSQLQuery

public static Query parseSQLQuery(org.dom4j.Element element)
                           throws java.lang.Exception
Throws:
java.lang.Exception