Class EJBQLTranslationContext
java.lang.Object
org.apache.cayenne.access.translator.ejbql.EJBQLTranslationContext
public class EJBQLTranslationContext extends Object
A context used for translating of EJBQL to SQL.
- Since:
- 3.0
- 
Field SummaryFields Modifier and Type Field Description protected Map<String,Object>namedParametersprotected Map<Integer,Object>positionalParameters
- 
Constructor SummaryConstructors Constructor Description EJBQLTranslationContext(EntityResolver entityResolver, EJBQLQuery query, EJBQLCompiledExpression compiledExpression, EJBQLTranslatorFactory translatorFactory, QuotingStrategy quotingStrategy)
- 
Method SummaryModifier and Type Method Description EJBQLTranslationContextappend(char chunk)Appends a piece of SQL to the internal buffer.EJBQLTranslationContextappend(String chunk)Appends a piece of SQL to the internal buffer.ClassDescriptorgetEntityDescriptor(String id)Looks up entity descriptor for an identifier that can be a compiled expression id or one of the aliases.QueryMetadatagetMetadata()SQLTemplategetQuery()QuotingStrategygetQuotingStrategy()protected StringgetTableAlias(String idPath, String tableName)Retrieves a SQL alias for the combination of EJBQL id variable and a table name.booleanisAppendingResultColumns()booleanisCaseInsensitive()booleanisUsingAliases()StringmakeDistinctMarker()voidonSubselect()voidpushMarker(String marker, boolean reset)Switches the current buffer to a marked buffer, pushing the currently used buffer on the stack.voidsetCaseInsensitive(boolean caseInsensitive)voidsetUsingAliases(boolean useAliases)
- 
Field Details- 
namedParameters
- 
positionalParameters
 
- 
- 
Constructor Details- 
EJBQLTranslationContextpublic EJBQLTranslationContext(EntityResolver entityResolver, EJBQLQuery query, EJBQLCompiledExpression compiledExpression, EJBQLTranslatorFactory translatorFactory, QuotingStrategy quotingStrategy)
 
- 
- 
Method Details- 
getQuery
- 
getMetadata
- 
getEntityDescriptorLooks up entity descriptor for an identifier that can be a compiled expression id or one of the aliases.
- 
pushMarkerSwitches the current buffer to a marked buffer, pushing the currently used buffer on the stack. Note that this can be done even before the marker is inserted in the main buffer. If "reset" is true, any previous contents of the marker are cleared.
- 
appendAppends a piece of SQL to the internal buffer.
- 
appendAppends a piece of SQL to the internal buffer.
- 
getTableAliasRetrieves a SQL alias for the combination of EJBQL id variable and a table name. If such alias hasn't been used, it is created on the fly.
- 
isAppendingResultColumnspublic boolean isAppendingResultColumns()
- 
isUsingAliasespublic boolean isUsingAliases()
- 
setUsingAliasespublic void setUsingAliases(boolean useAliases)
- 
isCaseInsensitivepublic boolean isCaseInsensitive()
- 
setCaseInsensitivepublic void setCaseInsensitive(boolean caseInsensitive)
- 
getQuotingStrategy
- 
onSubselectpublic void onSubselect()
- 
makeDistinctMarker
 
-