org.hibernate.tool.ide.completion
Class HQLAnalyzer
java.lang.Object
org.hibernate.tool.ide.completion.HQLAnalyzer
public class HQLAnalyzer
- extends Object
The HQLAnalyzer can answer certain questions about a HQL String.
- Author:
- leon, max.andersen@jboss.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HQLAnalyzer
public HQLAnalyzer()
getLexer
protected SimpleHQLLexer getLexer(char[] chars,
int end)
getLexer
protected SimpleHQLLexer getLexer(char[] chars)
shouldShowEntityNames
public boolean shouldShowEntityNames(String query,
int cursorPosition)
- Returns true if the position is at a location where an entityname makes sense.
e.g. "from Pr| where x"
- Parameters:
query
- cursorPosition
-
- Returns:
shouldShowEntityNames
public boolean shouldShowEntityNames(char[] chars,
int cursorPosition)
getVisibleSubQueries
public List getVisibleSubQueries(char[] chars,
int position)
getVisibleEntityNames
public List getVisibleEntityNames(char[] chars,
int position)
getSubQueries
protected org.hibernate.tool.ide.completion.HQLAnalyzer.SubQueryList getSubQueries(char[] query,
int position)
getEntityNamePrefix
public static String getEntityNamePrefix(char[] chars,
int position)
- Returns reference name found from position and backwards in the array.