JDBaccess API 1.0

com.jdbaccess.da
Interface Update

All Superinterfaces:
DataAccess

public interface Update
extends DataAccess

Interface for updating objects: with Update you can update one or more rows in database. If a transfer object is set with "setTO" the modified fields of that transfer object are updated.

Example:
   Update update = DAFactory.getUpdate(t);
   String sql = "update employee set salary = ? where id = ?";
   update.setSql(sql);
   ArrayList values = new ArrayList();
   values.add(new BigDecimal(20000));
   values.add(new Long(4711));
   update.setParameters(values);
   update.execute();
   update.end();
 


Method Summary
 java.lang.Long execute()
          Execute the update object.
 void setTO(TransferObject to)
          Set one transfer object to the update object
 
Methods inherited from interface com.jdbaccess.da.DataAccess
end, getName, getObjectType, getPackageName, getSize, getSql, setName, setObjectType, setPackageName, setParameters, setSql, toString
 

Method Detail

execute

java.lang.Long execute()
                       throws ApplicationException
Execute the update object.

Returns:
update count of all updated rows after execution of the update
Throws:
ApplicationException

setTO

void setTO(TransferObject to)
           throws ApplicationException
Set one transfer object to the update object

Parameters:
to - transfer object
Throws:
ApplicationException

JDBaccess API 1.0

Copyright © 2005-2006 JDBaccess.com, Königsweg 210, D-14129 Berlin, Germany. All Rights Reserved.