com.interfaceware.chameleon
Class SqlGenerator

java.lang.Object
  extended by com.interfaceware.chameleon.SqlGenerator

public class SqlGenerator
extends java.lang.Object

Trivial example of how one can write a class to generate SQL. This is not a core part of the Chameleon Java API. This class is not supported.


Constructor Summary
SqlGenerator(java.lang.String TableName)
           
 
Method Summary
 void addDateTimeColumn(java.lang.String Name, ChameleonDateTime Value)
           
 void addDateTimeColumn(java.lang.String Name, java.util.Date Value)
           
 void addDoubleColumn(java.lang.String Name, java.lang.Double Value)
           
 void addIntegerColumn(java.lang.String Name, java.lang.Integer Value)
           
 void addStringColumn(java.lang.String Name, java.lang.String Value)
           
protected  java.lang.String escapeString(java.lang.String Value)
           
protected  void finalize()
           
protected  java.lang.String formatDate(java.util.Date Value)
           
 java.lang.String generateInsertStatement()
           
 java.lang.String generateUpdateStatement()
           
 void release()
           
 void setTableName(java.lang.String TableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlGenerator

public SqlGenerator(java.lang.String TableName)
Method Detail

release

public void release()

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

generateInsertStatement

public java.lang.String generateInsertStatement()

generateUpdateStatement

public java.lang.String generateUpdateStatement()

setTableName

public void setTableName(java.lang.String TableName)

addStringColumn

public void addStringColumn(java.lang.String Name,
                            java.lang.String Value)

addDateTimeColumn

public void addDateTimeColumn(java.lang.String Name,
                              ChameleonDateTime Value)
                       throws ChameleonException
Throws:
ChameleonException

addDateTimeColumn

public void addDateTimeColumn(java.lang.String Name,
                              java.util.Date Value)

addIntegerColumn

public void addIntegerColumn(java.lang.String Name,
                             java.lang.Integer Value)

addDoubleColumn

public void addDoubleColumn(java.lang.String Name,
                            java.lang.Double Value)

escapeString

protected java.lang.String escapeString(java.lang.String Value)

formatDate

protected java.lang.String formatDate(java.util.Date Value)