01: package net.sourceforge.squirrel_sql.plugins.hibernate.completion;
02:
03: import java.util.ArrayList;
04:
05: public class HQLKeywordInfo extends SimpleHQLCompletionInfo {
06: private static final String[] hqlKeywords = { "between", "class",
07: "delete", "desc", "distinct", "elements", "escape",
08: "exists", "false", "fetch", "from", "full", "group",
09: "having", "in", "indices", "inner", "insert", "into", "is",
10: "join", "left", "like", "new", "not", "null", "or",
11: "order", "outer", "properties", "right", "select", "set",
12: "some", "true", "union", "update", "versioned", "where",
13: "and", "or", "as", "on", "with",
14:
15: // -- EJBQL tokens --
16: "both", "empty", "leading", "member", "object", "of",
17: "trailing", };
18: private String _toString;
19:
20: public static ArrayList<HQLKeywordInfo> createInfos() {
21: ArrayList<HQLKeywordInfo> ret = new ArrayList<HQLKeywordInfo>(
22: hqlKeywords.length);
23:
24: for (String hqlKeyword : hqlKeywords) {
25: ret.add(new HQLKeywordInfo(hqlKeyword));
26: }
27:
28: return ret;
29: }
30:
31: public HQLKeywordInfo(String infoString) {
32: super (infoString);
33: _toString = super .toString() + " (keyword)";
34: }
35:
36: public String toString() {
37: return _toString;
38: }
39: }
|