ca.krasnay.sqlbuilder
Class DeleteCreator

java.lang.Object
  extended by ca.krasnay.sqlbuilder.AbstractSqlCreator
      extended by ca.krasnay.sqlbuilder.DeleteCreator
All Implemented Interfaces:
Serializable, org.springframework.jdbc.core.PreparedStatementCreator

public class DeleteCreator
extends AbstractSqlCreator

A Spring PreparedStatementCreator that you can use like a DeleteBuilder. Example usage is as follows:

 PreparedStatementCreator psc = new DeleteCreator("emp").whereEquals("id",
         employeeId);

 new JdbcTemplate(dataSource).update(psc);
 

Author:
John Krasnay
See Also:
Serialized Form

Constructor Summary
DeleteCreator(String table)
           
 
Method Summary
protected  AbstractSqlBuilder getBuilder()
          Returns the builder for this creator.
 DeleteCreator where(Predicate predicate)
           
 DeleteCreator where(String expr)
           
 DeleteCreator whereEquals(String expr, Object value)
           
 
Methods inherited from class ca.krasnay.sqlbuilder.AbstractSqlCreator
allocateParameter, createPreparedStatement, getPreparedStatementCreator, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteCreator

public DeleteCreator(String table)
Method Detail

getBuilder

protected AbstractSqlBuilder getBuilder()
Description copied from class: AbstractSqlCreator
Returns the builder for this creator.

Specified by:
getBuilder in class AbstractSqlCreator

where

public DeleteCreator where(String expr)

where

public DeleteCreator where(Predicate predicate)

whereEquals

public DeleteCreator whereEquals(String expr,
                                 Object value)


Copyright © 2014. All rights reserved.