to.etc.webapp.qsql
Class JdbcQuery<T>
java.lang.Object
to.etc.webapp.qsql.JdbcQuery<T>
public class JdbcQuery<T>
- extends java.lang.Object
Encapsulates an actual query.
- Author:
- Frits Jalvingh
Created on Aug 25, 2009
Constructor Summary |
JdbcQuery(java.lang.String sql,
java.util.List<to.etc.webapp.qsql.IInstanceMaker> retrieverList,
java.util.List<IQValueSetter> vl,
int start,
int limit,
int timeout)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcQuery
public JdbcQuery(java.lang.String sql,
java.util.List<to.etc.webapp.qsql.IInstanceMaker> retrieverList,
java.util.List<IQValueSetter> vl,
int start,
int limit,
int timeout)
query
public java.util.List<?> query(QDataContext dc)
throws java.lang.Exception
- Throws:
java.lang.Exception
create
public static <T> JdbcQuery<T> create(QCriteria<T> q)
throws java.lang.Exception
- Throws:
java.lang.Exception
create
public static <T> JdbcQuery<T> create(QSelection<T> q)
throws java.lang.Exception
- Throws:
java.lang.Exception
dump
public void dump()
find
public static <T> T find(QDataContext dc,
java.lang.Class<T> clz,
java.lang.Object pk)
throws java.lang.Exception
- Type Parameters:
T
- - Parameters:
clz
- pk
-
- Returns:
-
- Throws:
java.lang.Exception
getInstance
public static <T> T getInstance(QDataContext dc,
java.lang.Class<T> clz,
java.lang.Object pk)
throws java.lang.Exception
- Get an instance; this will return an instance by first trying to load it; if that fails
it will create one but only fill the PK. Use is questionable though.
- Throws:
java.lang.Exception
- See Also:
QDataContext.getInstance(java.lang.Class, java.lang.Object)
query
public static <T> java.util.List<T> query(QDataContext dc,
QCriteria<T> q)
throws java.lang.Exception
- Throws:
java.lang.Exception
query
public static java.util.List<java.lang.Object[]> query(QDataContext dc,
QSelection<?> sel)
throws java.lang.Exception
- Throws:
java.lang.Exception
queryOne
public static <T> T queryOne(QDataContext dc,
QCriteria<T> q)
throws java.lang.Exception
- Throws:
java.lang.Exception
queryOne
public static java.lang.Object[] queryOne(QDataContext dc,
QSelection<?> q)
throws java.lang.Exception
- Throws:
java.lang.Exception