SMACS

smacs.load.mapping
Class DbMappingScanSqlScript

java.lang.Object
  extended bysmacs.load.mapping.DbMappingScanSqlScript

public class DbMappingScanSqlScript
extends Object

the main class.

This class is being given an sql syntaxtree where it looks for any nodes of interest for the transformation subsystem. Upon instantion a "store" is given where any scanned transformation is being pushed via "addTransform()". Per default the wrapped DbMappingTransformStore is a DbMappingTransformListNode.

The parser's sql-tree might have very different way to define a transformation but each is mapped into a new instance of supertype DbMappingTransform (per default an instance of DbMappingTransformNode). This has a field-list, a target-table, conditions and so on - plus a few hint-markers. Among them we do also find the target-operation variations as isInsert/isUpdate/isExists - expressing each a group of the possible insert syntax possibilities.

Author:
Copyright (C) 2004, Guido Draheim. All rights reserved. Part of SMACS project.

Field Summary
protected static Logger log
           
 
Constructor Summary
DbMappingScanSqlScript(DbMappingTransformStore store)
          constructor. wrapp the given "store", usually of type DbMappingTransformListNode
 
Method Summary
 boolean getTransformOnly()
           
protected  DbMappingTargetTableNode newDbMappingTargetTableNode(SqlInsertIntoStatementQ clause)
           
protected  DbMappingTargetTableNode newDbMappingTargetTableNode(SqlInsertNewIntoClauseQ clause)
           
 int scanSqlInsertFromStatement(SimpleNode sql)
           
 int scanSqlInsertFromStatement(SqlInsertFromStatementQ input)
           
 int scanSqlInsertIntoStatement(SimpleNode sql)
           
 int scanSqlInsertIntoStatement(SqlInsertIntoStatementQ input)
           
 int scanSqlInsertNewFromStatement(SimpleNode sql)
           
 int scanSqlInsertNewFromStatement(SqlInsertNewFromStatementQ input)
           
 int scanSqlInsertTransformStatement(SimpleNode sql)
           
 int scanSqlInsertTransformStatement(SqlInsertTransformStatementQ input)
           
 int scanSqlScript(SimpleNode sql)
          main entry. give it some parser's sql-tree - triggers any converter function needed.
 void setTransformOnly(boolean flag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Logger log
Constructor Detail

DbMappingScanSqlScript

public DbMappingScanSqlScript(DbMappingTransformStore store)
constructor. wrapp the given "store", usually of type DbMappingTransformListNode

Method Detail

setTransformOnly

public void setTransformOnly(boolean flag)

getTransformOnly

public boolean getTransformOnly()

scanSqlScript

public int scanSqlScript(SimpleNode sql)
main entry. give it some parser's sql-tree - triggers any converter function needed.


scanSqlInsertIntoStatement

public int scanSqlInsertIntoStatement(SimpleNode sql)

scanSqlInsertIntoStatement

public int scanSqlInsertIntoStatement(SqlInsertIntoStatementQ input)

scanSqlInsertFromStatement

public int scanSqlInsertFromStatement(SimpleNode sql)

scanSqlInsertFromStatement

public int scanSqlInsertFromStatement(SqlInsertFromStatementQ input)

scanSqlInsertNewFromStatement

public int scanSqlInsertNewFromStatement(SimpleNode sql)

scanSqlInsertNewFromStatement

public int scanSqlInsertNewFromStatement(SqlInsertNewFromStatementQ input)

scanSqlInsertTransformStatement

public int scanSqlInsertTransformStatement(SimpleNode sql)

scanSqlInsertTransformStatement

public int scanSqlInsertTransformStatement(SqlInsertTransformStatementQ input)

newDbMappingTargetTableNode

protected DbMappingTargetTableNode newDbMappingTargetTableNode(SqlInsertNewIntoClauseQ clause)

newDbMappingTargetTableNode

protected DbMappingTargetTableNode newDbMappingTargetTableNode(SqlInsertIntoStatementQ clause)

SMACS