1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.hadoop.hbase.hbql.statement.args;
22
23 import org.apache.expreval.expr.ArgumentListTypeSignature;
24 import org.apache.expreval.expr.ExpressionProperty;
25 import org.apache.expreval.expr.PropertyType;
26 import org.apache.expreval.expr.node.DateValue;
27 import org.apache.expreval.expr.node.GenericValue;
28 import org.apache.expreval.expr.node.IntegerValue;
29 import org.apache.expreval.expr.node.StringValue;
30
31 public abstract class SelectStatementArgs extends ExpressionProperty {
32
33 public static enum ArgType implements PropertyType {
34
35 NOARGSKEY(new ArgumentListTypeSignature(), ""),
36 SINGLEKEY(new ArgumentListTypeSignature(StringValue.class), ""),
37 KEYRANGE(new ArgumentListTypeSignature(StringValue.class, StringValue.class), ""),
38 TIMESTAMPRANGE(new ArgumentListTypeSignature(DateValue.class, DateValue.class), "TIMESTAMP"),
39 LIMIT(new ArgumentListTypeSignature(IntegerValue.class), "LIMIT"),
40 SCANNERCACHE(new ArgumentListTypeSignature(IntegerValue.class), "SCANNER_CACHE"),
41 VERSION(new ArgumentListTypeSignature(IntegerValue.class), "VERSION"),
42 WIDTH(new ArgumentListTypeSignature(IntegerValue.class), "WIDTH");
43
44 private final ArgumentListTypeSignature typeSignature;
45 private final String description;
46
47 ArgType(final ArgumentListTypeSignature typeSignature, final String description) {
48 this.typeSignature = typeSignature;
49 this.description = description;
50 }
51
52 public ArgumentListTypeSignature getTypeSignature() {
53 return typeSignature;
54 }
55
56 public String getDescription() {
57 return this.description;
58 }
59 }
60
61 protected SelectStatementArgs(final ArgType argType, final GenericValue... exprs) {
62 super(argType, exprs);
63 }
64 }