API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.persistance.builders. JOTSelectQuery View Source
Author(s)
tcolar
Since
Version
Serial
Hierarchy
 Object
      JOTQueryBase
          JOTSelectQuery
Implements
Subclasses
Description
public class JOTSelectQuery
Query builder for select type queries Use through JOQueryBuilder
See also:   
Constructors
protected JOTSelectQuery ()
Methods
Hide/Show inherited methods
public JOTSelectQuery appendToSQL (String append)
  append generic SQL to the query, use with precautions !
public void dumpToCSV (OutputStream out) throws Exception
  Dump matching data into a stream(ie file) in CSV format with column names
public JOTQueryResult find () throws Exception
  Execute the query and return a Vector of "modelClass"(JOTModel).
public JOTModel findOne () throws Exception
public JOTModel findOrCreateOne () throws Exception
  Find one, and if none found, then create a new instance (not saved yet)
public JOTSelectQuery limit (int limit)
  add a "limit" to the number of returned results should only be called once NOTE: if does not use the SQL limit synatx has this is not the same on all DB's Instead it's gonna call setMaxRows() on the statement
public JOTSelectQuery orderBy (String orderBy)
public JOTSelectQuery orderBy (String orderBy, boolean ascending)
public JOTSelectQuery orWhere (JOTSQLCondition cond)
public JOTSelectQuery orWhere (String where)
protected void setModelClass (Class modelClass) [Inherited From JOTQueryBase]
public String showFlags () [Inherited From JOTQueryBase]
  Show special statement flags (if any)
public String showSQL () [Inherited From JOTQueryBase]
  return sql generated by query.
public JOTSelectQuery where (JOTSQLCondition cond)
public JOTSelectQuery where (String where)
  It's much safer to use where(JOTSQLCondition cond)
public JOTSelectQuery withParams (String pms)
  Pass the (prepared statement )parameters (ie: values)
Fields
Hide/Show inherited fields
protected JOTStatementFlags flags [Inherited From JOTQueryBase]
protected Class modelClass [Inherited From JOTQueryBase]
protected int nbWhere [Inherited From JOTQueryBase]
protected Vector params [Inherited From JOTQueryBase]
protected StringBuffer sql [Inherited From JOTQueryBase]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar