public class Sentence extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CONTEXT
This token type means the possible choices of the item depend on the context.
|
| Constructor and Description |
|---|
Sentence() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String n,
String string,
int type)
Add a word to the set of next tokens.
|
void |
addAlias(String alias,
DbTableOrView table)
Add an alias name and object
|
void |
addTable(DbTableOrView table)
Add a table.
|
HashMap<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.
|
String |
getQuery()
Get the query string.
|
String |
getQueryUpper()
Get the uppercase version of the query string.
|
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(String query)
Set the query string.
|
public static final int CONTEXT
public void add(String n, String string, int type)
n - the token namestring - an example texttype - the token typepublic void addAlias(String alias, DbTableOrView table)
alias - the alias nametable - the alias tablepublic void addTable(DbTableOrView table)
table - the tablepublic HashSet<DbTableOrView> getTables()
public HashMap<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(String query)
query - the query stringpublic String getQuery()
public String getQueryUpper()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.