|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlproc.engine.impl.SqlMappingRule
public class SqlMappingRule
The precompiled mapping entity for one external META SQL mapping rule.
Instances of this class are created by the ANTLR parser. The grammar itself is defined in SqlMapping.g.
The main runtime contracts is merge(SqlMappingRule, SqlProcessResult)
.
Schematically:
SqlMappingRule = SqlMappingItem+ SqlMappingItem = dbName$sqlType$javaName^(value(=value2)?)*.javaName...
Field Summary | |
---|---|
protected static org.slf4j.Logger |
logger
The internal slf4j logger. |
private Map<String,SqlMappingItem> |
mappings
All sub-elements based on ANTLR grammar defined in SqlMapping.g. |
Constructor Summary | |
---|---|
SqlMappingRule()
Creates a new instance. |
Method Summary | |
---|---|
(package private) void |
addMapping(SqlMappingItem item)
Adds a new Mapping item, which is a mapping rule for one column. |
static SqlMappingRule |
getInstance(String name,
String mappingStatement,
SqlTypeFactory typeFactory)
Simple factory method (design pattern). |
(package private) Map<String,SqlMappingItem> |
getMappings()
Returns a collection of all mapping items in this mapping rule. |
static SqlMappingResult |
merge(SqlMappingRule mapping,
SqlProcessResult processResult)
Merge mapping rule for one META SQL query based on SqlMapping.g and SqlStatement.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger logger
private Map<String,SqlMappingItem> mappings
Constructor Detail |
---|
public SqlMappingRule()
Method Detail |
---|
public static SqlMappingRule getInstance(String name, String mappingStatement, SqlTypeFactory typeFactory) throws SqlEngineException
name
- the name of this mapping rulemappingStatement
- String representation of mapping ruletypeFactory
- the factory for the META types construction
SqlEngineException
- in the case of ANTRL parsing exceptionvoid addMapping(SqlMappingItem item)
item
- the mapping itemMap<String,SqlMappingItem> getMappings()
public static SqlMappingResult merge(SqlMappingRule mapping, SqlProcessResult processResult)
mapping
- the mapping rule based on SqlMapping.gprocessResult
- contains a mapping rule based on SqlStatement.g
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |