public class SelectTranslator extends QueryAssembler
| Modifier and Type | Field and Description |
|---|---|
protected static int[] |
UNSUPPORTED_DISTINCT_TYPES |
adapter, attributes, cachedSqlString, connection, entityResolver, logger, parameterIndex, query, queryMetadata, values| Constructor and Description |
|---|
SelectTranslator(Query query,
DataNode dataNode,
Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendLimitAndOffsetClauses(StringBuilder buffer)
Handles appending optional limit and offset clauses.
|
protected void |
appendSelectColumns(StringBuilder buffer,
List<String> selectColumnExpList) |
protected List<ColumnDescriptor> |
buildResultColumns() |
protected JoinStack |
createJoinStack() |
String |
createSqlString()
Returns query translated to SQL.
|
void |
dbRelationshipAdded(DbRelationship relationship,
JoinType joinType,
String joinSplitAlias)
Appends a join with given semantics to the query.
|
Map<ObjAttribute,ColumnDescriptor> |
getAttributeOverrides()
Returns a map of ColumnDescriptors keyed by ObjAttribute for columns that
may need to be reprocessed manually due to incompatible mappings along
the inheritance hierarchy.
|
String |
getCurrentAlias()
Returns an alias of the table which is currently at the top of the join
stack.
|
JoinStack |
getJoinStack() |
ColumnDescriptor[] |
getResultColumns()
Returns a list of ColumnDescriptors for the query columns.
|
boolean |
isSuppressingDistinct()
Returns true if SelectTranslator determined that a query requiring
DISTINCT can't be run with DISTINCT keyword for internal reasons.
|
protected static boolean |
isUnsupportedForDistinct(int type) |
void |
resetJoinStack()
A callback invoked by a child qualifier or ordering processor allowing
query assembler to reset its join stack.
|
boolean |
supportsTableAliases()
Always returns true.
|
addToParamList, createStatement, getAdapter, getEntityResolver, getJdbcEventLogger, getPathAliases, getQuery, getQueryMetadata, getRootDbEntity, getRootEntity, initStatementpublic SelectTranslator(Query query, DataNode dataNode, Connection connection)
protected static boolean isUnsupportedForDistinct(int type)
public JoinStack getJoinStack()
protected JoinStack createJoinStack()
public String createSqlString() throws Exception
createSqlString in class QueryAssemblerExceptionprotected void appendSelectColumns(StringBuilder buffer, List<String> selectColumnExpList)
protected void appendLimitAndOffsetClauses(StringBuilder buffer)
public String getCurrentAlias()
QueryAssemblergetCurrentAlias in class QueryAssemblerpublic ColumnDescriptor[] getResultColumns()
public Map<ObjAttribute,ColumnDescriptor> getAttributeOverrides()
public boolean isSuppressingDistinct()
protected List<ColumnDescriptor> buildResultColumns()
public void resetJoinStack()
QueryAssemblerresetJoinStack in class QueryAssemblerpublic void dbRelationshipAdded(DbRelationship relationship, JoinType joinType, String joinSplitAlias)
QueryAssemblerdbRelationshipAdded in class QueryAssemblerpublic boolean supportsTableAliases()
supportsTableAliases in class QueryAssemblerCopyright © 2001–2015 Apache Cayenne. All rights reserved.