net.mlw.vlh.adapter.jdbc.util
Class ConfigurableStatementBuilder

java.lang.Object
  extended bynet.mlw.vlh.adapter.jdbc.util.ConfigurableStatementBuilder
All Implemented Interfaces:
StatementBuilder
Direct Known Subclasses:
StandardStatementBuilder

public class ConfigurableStatementBuilder
extends Object
implements StatementBuilder

Copyright (c) 2003 held jointly by the individual authors. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. > http://www.gnu.org/copyleft/lesser.html > http://www.opensource.org/licenses/lgpl-license.php


Constructor Summary
ConfigurableStatementBuilder()
           
 
Method Summary
 PreparedStatement generate(Connection conn, StringBuffer query, Map whereClause, boolean scrollable)
          Populates the Query object with the given Map.
 Setter getSetter(String name)
          Gets a setter for the given property.
 void init()
          Initialize this bean with default values.
 void setDefaultSetter(Setter defaultSetter)
           
 void setSetters(Map setters)
           
 void setTextManipulators(List textManipulators)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurableStatementBuilder

public ConfigurableStatementBuilder()
Method Detail

init

public void init()
Initialize this bean with default values.


generate

public PreparedStatement generate(Connection conn,
                                  StringBuffer query,
                                  Map whereClause,
                                  boolean scrollable)
                           throws SQLException,
                                  ParseException
Description copied from interface: StatementBuilder
Populates the Query object with the given Map.

Specified by:
generate in interface StatementBuilder
Parameters:
conn - The conection
query - The query string.
whereClause - The where clause in a map form.
scrollable - Should this return a scrollable result set?
Returns:
The PreparedStatement.
Throws:
SQLException - if an error occurs.
ParseException
See Also:
StatementBuilder.generate(java.sql.Connection, java.lang.StringBuffer, java.util.Map, boolean)

getSetter

public Setter getSetter(String name)
Gets a setter for the given property.

Parameters:
name - The name of the property. Also the key in the Map.
Returns:
The setter for the given property.

setSetters

public void setSetters(Map setters)
Parameters:
setters - The setters to set.

setDefaultSetter

public void setDefaultSetter(Setter defaultSetter)
Parameters:
defaultSetter - The defaultSetter to set.

setTextManipulators

public void setTextManipulators(List textManipulators)


Copyright © 2003-2006 mlavilson. All Rights Reserved.