org.shiftone.exq.impl.config.types
Class Sql

java.lang.Object
  extended byorg.shiftone.exq.impl.config.types.Sql
All Implemented Interfaces:
StatementParamSetter, StatementSQLBuilder, org.shiftone.arbor.TextSupport
Direct Known Subclasses:
CallableStmtQueryExecutor, If, IfDefined, PreparedStmtQueryExecutor

public class Sql
extends java.lang.Object
implements org.shiftone.arbor.TextSupport, StatementSQLBuilder, StatementParamSetter

Class Sql

Author:
Jeff Drost

Constructor Summary
Sql()
           
 
Method Summary
 void addText(java.lang.String text)
          Method addText
 java.lang.String buildStatementSQL(java.util.Map paramMap)
          Method buildStatementSQL
 void buildStatementSQL(java.util.Map paramMap, java.lang.StringBuffer sb)
          Method buildStatementSQL
 Sql createIf()
          Method createIsEqual
 Sql createIfdef()
          Method createIfdef
 Sql createIfndef()
          Method createIfndef
 StatementSQLBuilder createIParam()
          Method createIParam
 Param createParam()
          Method createParam
protected  boolean isEnabled(java.util.Map paramMap)
          Method isEnabled determines is the object is active.
 void setParameters(StatementHolder holder, java.util.Map paramMap)
          Method setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sql

public Sql()
Method Detail

addText

public void addText(java.lang.String text)
Method addText

Specified by:
addText in interface org.shiftone.arbor.TextSupport
Parameters:
text -
Throws:
SAXException

createParam

public Param createParam()
Method createParam


createIfdef

public Sql createIfdef()
Method createIfdef


createIfndef

public Sql createIfndef()
Method createIfndef


createIf

public Sql createIf()
Method createIsEqual


createIParam

public StatementSQLBuilder createIParam()
Method createIParam


isEnabled

protected boolean isEnabled(java.util.Map paramMap)
Method isEnabled determines is the object is active. For the SQL class, this method alwayse returns true. Extending classes may use some business logic to determine the value (IfDefined). This method is called by buildStatementSQL() and setParameters().

Parameters:
paramMap -

buildStatementSQL

public void buildStatementSQL(java.util.Map paramMap,
                              java.lang.StringBuffer sb)
Method buildStatementSQL

Specified by:
buildStatementSQL in interface StatementSQLBuilder
Parameters:
paramMap -
sb -

buildStatementSQL

public final java.lang.String buildStatementSQL(java.util.Map paramMap)
Method buildStatementSQL

Parameters:
paramMap -

setParameters

public void setParameters(StatementHolder holder,
                          java.util.Map paramMap)
                   throws java.sql.SQLException
Method setParameters

Specified by:
setParameters in interface StatementParamSetter
Parameters:
holder -
paramMap -
Throws:
java.sql.SQLException