ca.krasnay.sqlbuilder
Class AbstractSqlBuilder

java.lang.Object
  extended by ca.krasnay.sqlbuilder.AbstractSqlBuilder
Direct Known Subclasses:
DeleteBuilder, InsertBuilder, SelectBuilder, UpdateBuilder

public abstract class AbstractSqlBuilder
extends Object

Abstract base class for builders. Contains helper methods.

Author:
John Krasnay

Constructor Summary
AbstractSqlBuilder()
           
 
Method Summary
protected  void appendList(StringBuilder sql, List<?> list, String init, String sep)
          Constructs a list of items with given separators.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSqlBuilder

public AbstractSqlBuilder()
Method Detail

appendList

protected void appendList(StringBuilder sql,
                          List<?> list,
                          String init,
                          String sep)
Constructs a list of items with given separators.

Parameters:
sql - StringBuilder to which the constructed string will be appended.
list - List of objects (usually strings) to join.
init - String to be added to the start of the list, before any of the items.
sep - Separator string to be added between items in the list.


Copyright © 2014. All rights reserved.