|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.samskivert.jdbc.depot.clause.QueryClause
com.samskivert.jdbc.depot.clause.SelectClause<T>
public class SelectClause<T extends PersistentRecord>
Builds actual SQL given a main persistent type and some QueryClause objects.
| Field Summary | |
|---|---|
protected Map<String,FieldDefinition> |
_disMap
Persistent class fields mapped to field override clauses. |
protected String[] |
_fields
The persistent fields to select. |
protected ForUpdate |
_forUpdate
The For Update clause, if any. |
protected FromOverride |
_fromOverride
The from override clause, if any. |
protected GroupBy |
_groupBy
The group by clause, if any. |
protected List<Join> |
_joinClauses
A list of join clauses, each potentially referencing a new class. |
protected Limit |
_limit
The limit clause, if any. |
protected OrderBy |
_orderBy
The order by clause, if any. |
protected Class<T> |
_pClass
The persistent class this select defines. |
protected WhereClause |
_where
The where clause. |
| Constructor Summary | |
|---|---|
SelectClause(Class<T> pClass,
String[] fields,
List<QueryClause> clauses)
Creates a new Query object to generate one or more instances of the specified persistent class, as dictated by the key and query clauses. |
|
SelectClause(Class<T> pClass,
String[] fields,
QueryClause... clauses)
A varargs version of the constructor. |
|
| Method Summary | |
|---|---|
void |
accept(ExpressionVisitor builder)
Most uses of this class have been implemented with a visitor pattern. |
void |
addClasses(Collection<Class<? extends PersistentRecord>> classSet)
Adds all persistent classes that are brought into the SQL context by this clause: FROM clauses, JOINs, UPDATEs, anything that could create a new table abbreviation. |
Collection<FieldDefinition> |
getFieldDefinitions()
|
String[] |
getFields()
|
ForUpdate |
getForUpdate()
|
FromOverride |
getFromOverride()
|
GroupBy |
getGroupBy()
|
List<Join> |
getJoinClauses()
|
Limit |
getLimit()
|
OrderBy |
getOrderBy()
|
Class<T> |
getPersistentClass()
|
WhereClause |
getWhereClause()
|
FieldDefinition |
lookupDefinition(String field)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,FieldDefinition> _disMap
protected Class<T extends PersistentRecord> _pClass
protected String[] _fields
protected FromOverride _fromOverride
protected WhereClause _where
protected List<Join> _joinClauses
protected OrderBy _orderBy
protected GroupBy _groupBy
protected Limit _limit
protected ForUpdate _forUpdate
| Constructor Detail |
|---|
public SelectClause(Class<T> pClass,
String[] fields,
List<QueryClause> clauses)
public SelectClause(Class<T> pClass,
String[] fields,
QueryClause... clauses)
| Method Detail |
|---|
public FieldDefinition lookupDefinition(String field)
public Collection<FieldDefinition> getFieldDefinitions()
public Class<T> getPersistentClass()
public String[] getFields()
public FromOverride getFromOverride()
public WhereClause getWhereClause()
public List<Join> getJoinClauses()
public OrderBy getOrderBy()
public GroupBy getGroupBy()
public Limit getLimit()
public ForUpdate getForUpdate()
public void addClasses(Collection<Class<? extends PersistentRecord>> classSet)
SQLExpression
public void accept(ExpressionVisitor builder)
throws Exception
SQLExpressionExpressionVisitor and call this method with it.
ExceptionSQLBuilder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||