org.sqlproc.engine
Class SqlEngine

java.lang.Object
  extended by org.sqlproc.engine.SqlEngine
Direct Known Subclasses:
SqlCrudEngine, SqlQueryEngine

public class SqlEngine
extends Object

Common ancestor for SqlQueryEngine and SqlCrudEngine.

For more info please see the Reference Guide or the tutorials.

Author:
Vladimir Hudec

Field Summary
protected  Map<String,Object> features
          Configuration of the SQL Processor using map of features.
protected  org.slf4j.Logger logger
          The internal slf4j logger.
protected  SqlMappingRule mapping
          The pre-compiled mapping rule, which is an SQL execution result to Java output classes mapping prescription.
protected  SqlMonitor monitor
          Monitor for the runtime statistics gathering.
protected  String name
          Name of the META SQL query or statement, which uniquely identifies this instance.
protected  SqlMetaStatement statement
          The pre-compiled META SQL query or statement.
protected  SqlTypeFactory typeFactory
          The factory for the META types construction.
 
Constructor Summary
SqlEngine(String name, SqlMetaStatement statement, SqlMappingRule mapping, SqlMonitor monitor, Map<String,Object> features, SqlTypeFactory typeFactory)
          Creates a new instance of the SqlEngine from one META SQL statement and one SQL Mapping rule instance.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
The internal slf4j logger.


name

protected String name
Name of the META SQL query or statement, which uniquely identifies this instance.


statement

protected SqlMetaStatement statement
The pre-compiled META SQL query or statement. The META SQL is an ANSI SQL extension using the ANTLR defined grammar.


mapping

protected SqlMappingRule mapping
The pre-compiled mapping rule, which is an SQL execution result to Java output classes mapping prescription.


features

protected Map<String,Object> features
Configuration of the SQL Processor using map of features. Optional features can alter the SQL Processor runtime behavior.


monitor

protected SqlMonitor monitor
Monitor for the runtime statistics gathering.


typeFactory

protected SqlTypeFactory typeFactory
The factory for the META types construction. The META type defines the mapping between a Java class type and a JDBC datatype. For the default META type factory, please see JdbcTypeFactory .

Constructor Detail

SqlEngine

public SqlEngine(String name,
                 SqlMetaStatement statement,
                 SqlMappingRule mapping,
                 SqlMonitor monitor,
                 Map<String,Object> features,
                 SqlTypeFactory typeFactory)
Creates a new instance of the SqlEngine from one META SQL statement and one SQL Mapping rule instance. Both parameters are already pre-compiled instances using the ANTLR parsers. This is the recommended usage for the runtime performance optimization. This constructor is devoted to be used from the SqlEngineLoader, which is able to read all statements definitions from an external queries.properties file and create the named SqlEngine instances. Also an external SQL Monitor for the runtime statistics gathering can be engaged.

Parameters:
name - the name of this SQL Engine instance
statement - the pre-compiled META SQL statement
mapping - the pre-compiled SQL mapping rule
monitor - the SQL Monitor for the runtime statistics gathering
features - the optional SQL Processor features
typeFactory - the factory for the META types construction


Copyright © 2011. All Rights Reserved.