org.sqlproc.engine
Class SqlEngine

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

public class SqlEngine
extends java.lang.Object

Common ancestor for SqlQueryEngine and SqlCrudEngine.

For more info please see the Reference Guide or tutorials.

Author:
Vladimir Hudec

Field Summary
protected  java.util.Map<java.lang.String,java.lang.Object> features
          Configuration of SQL Processor using Map of features.
protected  org.slf4j.Logger logger
          The internal slf4j logger.
protected  SqlMappingRule mapping
          Precompiled Mapping rule, which is SQL result to Java output classes mapping prescription.
protected  SqlMonitor monitor
          Monitor for the runtime statistics gathering.
protected  java.lang.String name
          Name of this META SQL, which uniquely identifies the instance.
protected  SqlMetaStatement statement
          Precompiled META SQL, which is ANSI SQL extension using ANTLR defined grammar.
 
Constructor Summary
SqlEngine(java.lang.String name, SqlMetaStatement statement, SqlMappingRule mapping, SqlMonitor monitor, java.util.Map<java.lang.String,java.lang.Object> features)
          Creates a new instance of 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 java.lang.String name
Name of this META SQL, which uniquely identifies the instance.


statement

protected SqlMetaStatement statement
Precompiled META SQL, which is ANSI SQL extension using ANTLR defined grammar.


mapping

protected SqlMappingRule mapping
Precompiled Mapping rule, which is SQL result to Java output classes mapping prescription.


features

protected java.util.Map<java.lang.String,java.lang.Object> features
Configuration of SQL Processor using Map of features. Optional features alter the SQL Processor behavior.


monitor

protected SqlMonitor monitor
Monitor for the runtime statistics gathering.

Constructor Detail

SqlEngine

public SqlEngine(java.lang.String name,
                 SqlMetaStatement statement,
                 SqlMappingRule mapping,
                 SqlMonitor monitor,
                 java.util.Map<java.lang.String,java.lang.Object> features)
Creates a new instance of SqlEngine from one META SQL statement and one SQL Mapping rule instance. Both parameters are already precompiled 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 definitions from an external queries.properties file and create the named SqlEngine instances. Also an external SQL Monitor for runtime statistics gathering can be engaged.

Parameters:
name - the name if this SQL Engine instance
statement - the precompiled META SQL statement, extension of ANSI SQL
mapping - the precompiled SQL Mapping rule, SQL result to Java output classes mapping
monitor - the SQL Monitor for the runtime statistics gathering
features - the optional SQL Processor features


Copyright © 2011. All Rights Reserved.