|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.makumba.providers.query.hql.HqlAnalyzer
public class HqlAnalyzer
| Constructor Summary | |
|---|---|
HqlAnalyzer(String query1)
|
|
| Method Summary | |
|---|---|
String |
getHackedQuery(String query)
|
DataDefinition |
getLabelType(String labelName)
Gets the type of a label used within the query FIXME: remove, inline everywhere as getLabelTypes().get(labelName) for that to work, OQL and MQL need to put their aliases also in the Map returned by getLabelTypes() HQL does not support aliases in the first place |
Map<String,DataDefinition> |
getLabelTypes()
Gets the type of the fields between FROM and WHERE |
DataDefinition |
getParameterTypes()
Gets the types of the query parameters, as resulted from the query analysis. |
DataDefinition |
getProjectionType()
Gets the type of the fields between SELECT and FROM |
String |
getQuery()
Gets the original query that is analyzed by this object |
(package private) String |
getTypeName(int i)
|
int |
parameterAt(int index)
Gets the number of the parameter mentioned at the position indicated by the given index. query parameters may not get mentioned in the order of their $number, for example $1 may not appear first in the query, $2 may not appear second in the query, etc. |
int |
parameterNumber()
Gets the total number of parameters in the query; like $1, $2 etc. |
String |
toString()
|
String |
writeInSQLQuery(NameResolver nr)
generate SQL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HqlAnalyzer(String query1)
| Method Detail |
|---|
public DataDefinition getProjectionType()
QueryAnalysis
getProjectionType in interface QueryAnalysispublic DataDefinition getLabelType(String labelName)
QueryAnalysis
getLabelType in interface QueryAnalysislabelName - the name of the label
public DataDefinition getParameterTypes()
QueryAnalysis
getParameterTypes in interface QueryAnalysispublic int parameterNumber()
QueryAnalysis
parameterNumber in interface QueryAnalysisQueryAnalysis.parameterAt(int)public int parameterAt(int index)
QueryAnalysis
parameterAt in interface QueryAnalysisQueryAnalysis.parameterNumber()String getTypeName(int i)
public String toString()
toString in class Objectpublic String getHackedQuery(String query)
public String getQuery()
QueryAnalysis
getQuery in interface QueryAnalysispublic Map<String,DataDefinition> getLabelTypes()
QueryAnalysis
getLabelTypes in interface QueryAnalysispublic String writeInSQLQuery(NameResolver nr)
QueryAnalysis
writeInSQLQuery in interface QueryAnalysisnr - the NameResolver that maps DataDefinition names to database names
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||