01: package net.sourceforge.squirrel_sql.plugins.hibernate.completion;
02:
03: import net.sourceforge.squirrel_sql.fw.completion.CompletionInfo;
04: import net.sourceforge.squirrel_sql.fw.completion.util.CompletionParser;
05:
06: public class SimpleHQLCompletionInfo extends CompletionInfo {
07: private String _infoString;
08:
09: public SimpleHQLCompletionInfo(String infoString) {
10: _infoString = infoString;
11: }
12:
13: public String getCompareString() {
14: return _infoString;
15: }
16:
17: public boolean matches(CompletionParser parser) {
18: return 1 == parser.size()
19: && _infoString.startsWith(parser.getToken(0));
20: }
21: }
|