|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.bnf.Sentence
public class Sentence
A query context object. It contains the list of table and alias objects. Used for autocomplete.
Field Summary | |
---|---|
static int |
CONTEXT
This token type means the possible choices of the item depend on the context. |
Constructor Summary | |
---|---|
Sentence()
|
Method Summary | |
---|---|
void |
add(java.lang.String n,
java.lang.String string,
int type)
Add a word to the set of next tokens. |
void |
addAlias(java.lang.String alias,
DbTableOrView table)
Add an alias name and object |
void |
addTable(DbTableOrView table)
Add a table. |
java.util.HashMap<java.lang.String,DbTableOrView> |
getAliases()
Get the alias map. |
DbSchema |
getLastMatchedSchema()
Get the last matched schema if the last match was a schema. |
DbTableOrView |
getLastMatchedTable()
Get the last matched table if the last match was a table. |
DbTableOrView |
getLastTable()
Get the last added table. |
java.lang.String |
getQuery()
Get the query string. |
java.lang.String |
getQueryUpper()
Get the uppercase version of the query string. |
java.util.HashSet<DbTableOrView> |
getTables()
Get the set of tables. |
void |
setLastMatchedSchema(DbSchema schema)
Set the last matched schema if the last match was a schema, or null if it was not. |
void |
setLastMatchedTable(DbTableOrView table)
Set the last matched table if the last match was a table. |
void |
setQuery(java.lang.String query)
Set the query string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CONTEXT
Constructor Detail |
---|
public Sentence()
Method Detail |
---|
public void add(java.lang.String n, java.lang.String string, int type)
n
- the token namestring
- an example texttype
- the token typepublic void addAlias(java.lang.String alias, DbTableOrView table)
alias
- the alias nametable
- the alias tablepublic void addTable(DbTableOrView table)
table
- the tablepublic java.util.HashSet<DbTableOrView> getTables()
public java.util.HashMap<java.lang.String,DbTableOrView> getAliases()
public DbTableOrView getLastTable()
public DbSchema getLastMatchedSchema()
public void setLastMatchedSchema(DbSchema schema)
schema
- the last matched schema or nullpublic void setLastMatchedTable(DbTableOrView table)
table
- the last matched table or nullpublic DbTableOrView getLastMatchedTable()
public void setQuery(java.lang.String query)
query
- the query stringpublic java.lang.String getQuery()
public java.lang.String getQueryUpper()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |