de.hs_rm.cs.lecturenotes.server.core.persistence.dao
Class SQLBuilder

java.lang.Object
  extended by de.hs_rm.cs.lecturenotes.server.core.persistence.dao.SQLBuilder

public final class SQLBuilder
extends java.lang.Object

Contains common methods to create a SQL statement.

Version:
$LastChangedRevision: 231 $
Author:
Enrico Homann

Constructor Summary
SQLBuilder()
           
 
Method Summary
static SQLBuilder getInstance()
          Will return the singleton.
 java.lang.String updateString(java.lang.String tablename, java.util.List<AttributeValuePair> attributeValues, java.lang.String whereClause)
          Will return a SQL UPDATE String based upon the values provided.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLBuilder

public SQLBuilder()
Method Detail

getInstance

public static SQLBuilder getInstance()
Will return the singleton.

Returns:
SQLBuilder

updateString

public java.lang.String updateString(java.lang.String tablename,
                                     java.util.List<AttributeValuePair> attributeValues,
                                     java.lang.String whereClause)
Will return a SQL UPDATE String based upon the values provided.

Parameters:
tablename - String SQL Table Name
attributeValues - List of AttributeValuePair with attributes and values
whereClause - String SQL WHERE condition
Returns:
String Executing Ready SQL UPDATE Statement