@CompileStatic class QueryStringTransformer extends ClassCodeExpressionTransformer
This class handles type checking of HQL queries declared in Query annotations
| Type | Name and description |
|---|---|
java.util.Map<java.lang.String, ClassNode> |
declaredQueryTargets |
SourceUnit |
sourceUnit |
VariableScope |
variableScope |
| Constructor and description |
|---|
QueryStringTransformer(SourceUnit sourceUnit, VariableScope variableScope) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.util.List<java.lang.String> |
calculatePropertyPath(PropertyExpression p) |
|
protected java.lang.String |
formatDomainClassVariable(ClassNode domainType, java.lang.String variableName)Formats a domain class variable |
|
protected java.lang.String |
formatPropertyPath(java.util.List<java.lang.String> propertyPath, java.lang.String variableName)Formats a declaration for the given property path |
|
protected java.lang.String |
formatPropertyReference(VariableExpression declaringObject, java.lang.String propertyName, java.lang.String variableName)Formats a reference to a property of a declared domain class |
|
Expression |
transform(Expression exp) |
|
Expression |
transformDeclarationExpression(DeclarationExpression dec) |
|
Expression |
transformPropertyExpressions(Expression exp) |
|
GStringExpression |
transformQuery(GStringExpression query) |
Formats a domain class variable
domainType - The domain class typevariableName - The variable nameFormats a declaration for the given property path
propertyPath - The path to the property as a listvariableName - The variable nameFormats a reference to a property of a declared domain class
declaringObject - The variable that references the declared domain classpropertyName - The property of the domain classvariableName - The variable name