net.ontopia.topicmaps.query.impl.rdbms
Class QueryProcessor

java.lang.Object
  extended by net.ontopia.topicmaps.query.impl.rdbms.QueryProcessor
All Implemented Interfaces:
QueryProcessorIF

public class QueryProcessor
extends java.lang.Object
implements QueryProcessorIF

INTERNAL: This is the front-end to the RDBMS-specific query processor.


Field Summary
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 Summary
QueryProcessor(TopicMapIF topicmap)
           
QueryProcessor(TopicMapIF topicmap, LocatorIF base)
           
 
Method Summary
 QueryResultIF execute(java.lang.String query)
          PUBLIC: Parses and executes the query, returning the results.
 QueryResultIF execute(java.lang.String query, DeclarationContextIF context)
          PUBLIC: Parses and executes the query in the given context, returning the results.
 QueryResultIF execute(java.lang.String query, java.util.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(java.lang.String query, java.util.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()
           
 java.lang.String getProperty(java.lang.String name)
           
 TopicMapIF getTopicMap()
           
 TransactionIF getTransaction()
           
 void load(java.io.Reader ruleset)
          DEPRECATED: Loads a set of rules into the query processor from a reader object.
 void load(java.lang.String ruleset)
          DEPRECATED: Loads a set of rules into the query processor from a string.
 ParsedQueryIF parse(java.lang.String query)
          PUBLIC: Parses the query, returning an object representing the result.
 ParsedQueryIF parse(java.lang.String query, DeclarationContextIF context)
          PUBLIC: Parses the query in the given context, returning an object representing the result.
protected  ParsedQuery parseQuery(java.lang.String query, DeclarationContextIF context)
           
 ParsedModificationStatementIF parseUpdate(java.lang.String statement)
          PUBLIC: Parses the update statement, returning an object representing the result.
 ParsedModificationStatementIF parseUpdate(java.lang.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(java.lang.String query)
          PUBLIC: Runs the update statement, returning the number of modified objects.
 int update(java.lang.String query, DeclarationContextIF context)
          PUBLIC: Runs the update statement in the given declaration context, returning the number of modified objects.
 int update(java.lang.String query, java.util.Map<java.lang.String,?> arguments)
          PUBLIC: Runs the update statement with the given parameters, returning the number of modified objects.
 int update(java.lang.String query, java.util.Map<java.lang.String,?> arguments, DeclarationContextIF context)
          PUBLIC: Runs the update statement in the given declaration context with the given parameters, returning the number of modified objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

predicateFactory

protected PredicateFactoryIF predicateFactory

topicmap

protected TopicMapIF topicmap

base

protected LocatorIF base

parser

protected TologParser parser

txn

protected TransactionIF txn

access

protected RDBMSAccess access

mapping

protected RDBMSMapping mapping

bprocessor

protected QueryProcessor bprocessor
Constructor Detail

QueryProcessor

public QueryProcessor(TopicMapIF topicmap)

QueryProcessor

public QueryProcessor(TopicMapIF topicmap,
                      LocatorIF base)
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String name)

execute

public QueryResultIF execute(java.lang.String query)
                      throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Parses and executes the query, returning the results.

Specified by:
execute in interface QueryProcessorIF
Throws:
InvalidQueryException

execute

public QueryResultIF execute(java.lang.String query,
                             DeclarationContextIF context)
                      throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Parses and executes the query in the given context, returning the results.

Specified by:
execute in interface QueryProcessorIF
Throws:
InvalidQueryException

execute

public QueryResultIF execute(java.lang.String query,
                             java.util.Map arguments)
                      throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Parses and executes the query binding the parameters in the query to the values given in the 'arguments' map, returning the results.

Specified by:
execute in interface QueryProcessorIF
Throws:
InvalidQueryException

execute

public QueryResultIF execute(java.lang.String query,
                             java.util.Map arguments,
                             DeclarationContextIF context)
                      throws InvalidQueryException
Description copied from interface: QueryProcessorIF
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.

Specified by:
execute in interface QueryProcessorIF
Throws:
InvalidQueryException

update

public int update(java.lang.String query)
Description copied from interface: QueryProcessorIF
PUBLIC: Runs the update statement, returning the number of modified objects.

Specified by:
update in interface QueryProcessorIF

update

public int update(java.lang.String query,
                  DeclarationContextIF context)
           throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Runs the update statement in the given declaration context, returning the number of modified objects.

Specified by:
update in interface QueryProcessorIF
Throws:
InvalidQueryException

update

public int update(java.lang.String query,
                  java.util.Map<java.lang.String,?> arguments)
           throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Runs the update statement with the given parameters, returning the number of modified objects.

Specified by:
update in interface QueryProcessorIF
Throws:
InvalidQueryException

update

public int update(java.lang.String query,
                  java.util.Map<java.lang.String,?> arguments,
                  DeclarationContextIF context)
           throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Runs the update statement in the given declaration context with the given parameters, returning the number of modified objects.

Specified by:
update in interface QueryProcessorIF
Throws:
InvalidQueryException

parse

public ParsedQueryIF parse(java.lang.String query)
                    throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Parses the query, returning an object representing the result.

Specified by:
parse in interface QueryProcessorIF
Throws:
InvalidQueryException

parse

public ParsedQueryIF parse(java.lang.String query,
                           DeclarationContextIF context)
                    throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Parses the query in the given context, returning an object representing the result.

Specified by:
parse in interface QueryProcessorIF
Throws:
InvalidQueryException

parseQuery

protected ParsedQuery parseQuery(java.lang.String query,
                                 DeclarationContextIF context)
                          throws InvalidQueryException
Throws:
InvalidQueryException

parseUpdate

public ParsedModificationStatementIF parseUpdate(java.lang.String statement)
                                          throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Parses the update statement, returning an object representing the result.

Specified by:
parseUpdate in interface QueryProcessorIF
Throws:
InvalidQueryException

parseUpdate

public ParsedModificationStatementIF parseUpdate(java.lang.String statement,
                                                 DeclarationContextIF context)
                                          throws InvalidQueryException
Description copied from interface: QueryProcessorIF
PUBLIC: Parses the update statement in the given context, returning an object representing the result.

Specified by:
parseUpdate in interface QueryProcessorIF
Throws:
InvalidQueryException

load

public void load(java.lang.String ruleset)
          throws InvalidQueryException
Description copied from interface: QueryProcessorIF
DEPRECATED: Loads a set of rules into the query processor from a string. The rules will then be available for use in queries throughout the lifetime of the current scope.

Specified by:
load in interface QueryProcessorIF
Throws:
InvalidQueryException

load

public void load(java.io.Reader ruleset)
          throws InvalidQueryException,
                 java.io.IOException
Description copied from interface: QueryProcessorIF
DEPRECATED: Loads a set of rules into the query processor from a reader object. The rules will then be available for use in queries throughout the lifetime of the current scope.

Specified by:
load in interface QueryProcessorIF
Throws:
InvalidQueryException
java.io.IOException

setContext

public void setContext(DeclarationContextIF context)

getTopicMap

public TopicMapIF getTopicMap()

getTransaction

public TransactionIF getTransaction()

getMapping

public ObjectRelationalMappingIF getMapping()

getBasicQueryProcessor

public QueryProcessor getBasicQueryProcessor()


Copyright © 2000-2012 Ontopia.