edu.jhu.tmaj.database.sql
Class SQLValues

java.lang.Object
  extended by edu.jhu.tmaj.database.sql.SQLValues

public final class SQLValues
extends java.lang.Object

The fields and the values in an INSERT or UPDATE SQL statement. Example:
The SQLValues of the SQL Statement:
UPDATE Users
SET UserName='jsmith',NumberOfChildren=2
WHERE UserID=53
are representing as follows:
SQLValues s1=new SQLValues(); //SET clause values
s1.add("UserName","jsmith");
s1.add("BirthDate",2);
SQLValues s2=new SQLValues(); //WHERE clause values
s2.add("UserID",53);


Constructor Summary
SQLValues()
           
 
Method Summary
 void addBoolean(java.lang.String columnName, java.lang.Boolean bool)
           
 void addDate(java.lang.String columnName, java.util.Date date)
           
 void addDateTime(java.lang.String columnName, java.util.Date date)
           
 void addDouble(java.lang.String columnName, java.lang.Double value)
           
 void addFloat(java.lang.String columnName, java.lang.Float value)
           
 void addInputLog(InputLog inputLog)
           
 void addInteger(java.lang.String columnName, java.lang.Integer value)
           
 void addLiteralValue(java.lang.String columnName, LiteralValue literalValue)
           
 void addLong(java.lang.String columnName, java.lang.Long value)
           
 void addString(java.lang.String columnName, java.lang.String string)
           
 java.util.List<DatabaseField> getDatabaseFieldsList()
           
 java.util.List<java.lang.Object> getValuesList()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLValues

public SQLValues()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addLiteralValue

public void addLiteralValue(java.lang.String columnName,
                            LiteralValue literalValue)

addDate

public void addDate(java.lang.String columnName,
                    java.util.Date date)

addDateTime

public void addDateTime(java.lang.String columnName,
                        java.util.Date date)

addLong

public void addLong(java.lang.String columnName,
                    java.lang.Long value)

addInteger

public void addInteger(java.lang.String columnName,
                       java.lang.Integer value)

addDouble

public void addDouble(java.lang.String columnName,
                      java.lang.Double value)

addFloat

public void addFloat(java.lang.String columnName,
                     java.lang.Float value)

addString

public void addString(java.lang.String columnName,
                      java.lang.String string)

addBoolean

public void addBoolean(java.lang.String columnName,
                       java.lang.Boolean bool)

addInputLog

public void addInputLog(InputLog inputLog)

getDatabaseFieldsList

public java.util.List<DatabaseField> getDatabaseFieldsList()

getValuesList

public java.util.List<java.lang.Object> getValuesList()