public class QueryProcessor extends Object implements QueryProcessorIF
Modifier and Type | Field and Description |
---|---|
protected RDBMSAccess |
access |
protected LocatorIF |
base |
protected QueryProcessor |
bprocessor |
protected RDBMSMapping |
mapping |
protected TologParser |
parser |
protected PredicateFactoryIF |
predicateFactory |
protected TopicMapIF |
topicmap |
protected TransactionIF |
txn |
Constructor and Description |
---|
QueryProcessor(TopicMapIF topicmap) |
QueryProcessor(TopicMapIF topicmap,
LocatorIF base) |
Modifier and Type | Method and Description |
---|---|
QueryResultIF |
execute(String query)
PUBLIC: Parses and executes the query, returning the results.
|
QueryResultIF |
execute(String query,
DeclarationContextIF context)
PUBLIC: Parses and executes the query in the given context,
returning the results.
|
QueryResultIF |
execute(String query,
Map arguments)
PUBLIC: Parses and executes the query binding the parameters in
the query to the values given in the 'arguments' map, returning
the results.
|
QueryResultIF |
execute(String query,
Map arguments,
DeclarationContextIF context)
PUBLIC: Parses and executes the query in the given context
binding the parameters in the query to the values given in the
'arguments' map, returning the results.
|
QueryProcessor |
getBasicQueryProcessor() |
ObjectRelationalMappingIF |
getMapping() |
String |
getProperty(String name) |
TopicMapIF |
getTopicMap() |
TransactionIF |
getTransaction() |
void |
load(Reader ruleset)
DEPRECATED: Loads a set of rules into the query processor from a
reader object.
|
void |
load(String ruleset)
DEPRECATED: Loads a set of rules into the query processor from a
string.
|
ParsedQueryIF |
parse(String query)
PUBLIC: Parses the query, returning an object representing the
result.
|
ParsedQueryIF |
parse(String query,
DeclarationContextIF context)
PUBLIC: Parses the query in the given context, returning an
object representing the result.
|
protected ParsedQuery |
parseQuery(String query,
DeclarationContextIF context) |
ParsedModificationStatementIF |
parseUpdate(String statement)
PUBLIC: Parses the update statement, returning an object
representing the result.
|
ParsedModificationStatementIF |
parseUpdate(String statement,
DeclarationContextIF context)
PUBLIC: Parses the update statement in the given context,
returning an object representing the result.
|
void |
setContext(DeclarationContextIF context) |
int |
update(String query)
PUBLIC: Runs the update statement, returning the number of
modified objects.
|
int |
update(String query,
DeclarationContextIF context)
PUBLIC: Runs the update statement in the given declaration
context, returning the number of modified objects.
|
int |
update(String query,
Map<String,?> arguments)
PUBLIC: Runs the update statement with the given parameters,
returning the number of modified objects.
|
int |
update(String query,
Map<String,?> arguments,
DeclarationContextIF context)
PUBLIC: Runs the update statement in the given declaration
context with the given parameters, returning the number of
modified objects.
|
protected PredicateFactoryIF predicateFactory
protected TopicMapIF topicmap
protected LocatorIF base
protected TologParser parser
protected TransactionIF txn
protected RDBMSAccess access
protected RDBMSMapping mapping
protected QueryProcessor bprocessor
public QueryProcessor(TopicMapIF topicmap)
public QueryProcessor(TopicMapIF topicmap, LocatorIF base)
public QueryResultIF execute(String query) throws InvalidQueryException
QueryProcessorIF
execute
in interface QueryProcessorIF
InvalidQueryException
public QueryResultIF execute(String query, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
execute
in interface QueryProcessorIF
InvalidQueryException
public QueryResultIF execute(String query, Map arguments) throws InvalidQueryException
QueryProcessorIF
execute
in interface QueryProcessorIF
InvalidQueryException
public QueryResultIF execute(String query, Map arguments, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
execute
in interface QueryProcessorIF
InvalidQueryException
public int update(String query)
QueryProcessorIF
update
in interface QueryProcessorIF
public int update(String query, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
update
in interface QueryProcessorIF
InvalidQueryException
public int update(String query, Map<String,?> arguments) throws InvalidQueryException
QueryProcessorIF
update
in interface QueryProcessorIF
InvalidQueryException
public int update(String query, Map<String,?> arguments, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
update
in interface QueryProcessorIF
InvalidQueryException
public ParsedQueryIF parse(String query) throws InvalidQueryException
QueryProcessorIF
parse
in interface QueryProcessorIF
InvalidQueryException
public ParsedQueryIF parse(String query, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
parse
in interface QueryProcessorIF
InvalidQueryException
protected ParsedQuery parseQuery(String query, DeclarationContextIF context) throws InvalidQueryException
InvalidQueryException
public ParsedModificationStatementIF parseUpdate(String statement) throws InvalidQueryException
QueryProcessorIF
parseUpdate
in interface QueryProcessorIF
InvalidQueryException
public ParsedModificationStatementIF parseUpdate(String statement, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
parseUpdate
in interface QueryProcessorIF
InvalidQueryException
public void load(String ruleset) throws InvalidQueryException
QueryProcessorIF
load
in interface QueryProcessorIF
InvalidQueryException
public void load(Reader ruleset) throws InvalidQueryException, IOException
QueryProcessorIF
load
in interface QueryProcessorIF
InvalidQueryException
IOException
public void setContext(DeclarationContextIF context)
public TopicMapIF getTopicMap()
public TransactionIF getTransaction()
public ObjectRelationalMappingIF getMapping()
public QueryProcessor getBasicQueryProcessor()