com.syrtsov.ddao.ops
Class UpdateSqlOperation

java.lang.Object
  extended by com.syrtsov.ddao.ops.UpdateSqlOperation
All Implemented Interfaces:
SqlOperation
Direct Known Subclasses:
DeleteSqlOperation, InsertSqlOperation

public class UpdateSqlOperation
extends java.lang.Object
implements SqlOperation

Created by: Pavel Syrtsov Date: Apr 23, 2007 Time: 11:55:52 PM


Constructor Summary
UpdateSqlOperation()
           
 
Method Summary
 void init(java.lang.reflect.Method method)
          initialize instance with data defined by annotations attached to given method
 void init(java.lang.reflect.Method method, java.lang.String sql)
           
 java.lang.Object invoke(java.sql.Connection connection, java.lang.reflect.Method method, java.lang.Object[] args)
          this method executes SQL operation and returns result mapped to java object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateSqlOperation

public UpdateSqlOperation()
Method Detail

invoke

public java.lang.Object invoke(java.sql.Connection connection,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
Description copied from interface: SqlOperation
this method executes SQL operation and returns result mapped to java object

Specified by:
invoke in interface SqlOperation
Parameters:
connection - - JDBC connection that should be used to execute operation
method - - Dao method object associated with this operation invocation
args - - argument array given with Dao method invocation
Returns:
result of query execution mapped to java object

init

public void init(java.lang.reflect.Method method)
          throws InitializerException
Description copied from interface: SqlOperation
initialize instance with data defined by annotations attached to given method

Specified by:
init in interface SqlOperation
Parameters:
method - - method that should be used to initialize this operation, usually we use annotation attached to this method and that annotation has SQL
Throws:
InitializerException - - thrown when given method can not be used to initialize this operation

init

public void init(java.lang.reflect.Method method,
                 java.lang.String sql)
          throws InitializerException
Throws:
InitializerException