org.eobjects.metamodel
Class DeleteAndInsertBuilder

java.lang.Object
  extended by org.eobjects.metamodel.data.AbstractRowBuilder<RowUpdationBuilder>
      extended by org.eobjects.metamodel.update.AbstractRowUpdationBuilder
          extended by org.eobjects.metamodel.DeleteAndInsertBuilder
All Implemented Interfaces:
RowBuilder<RowUpdationBuilder>, WhereClauseBuilder<RowUpdationBuilder>, RowUpdationBuilder

public class DeleteAndInsertBuilder
extends AbstractRowUpdationBuilder

Simple implementation of the RowUpdationBuilder interface, which simply uses a combined delete+insert strategy for performing updates. Note that this implementation is not desirable performance-wise in many cases, but does provide a functional equivalent to a "real" update.


Constructor Summary
DeleteAndInsertBuilder(AbstractUpdateCallback updateCallback, Table table)
           
 
Method Summary
 void execute()
          Commits the row updation operation.
protected  List<Row> getRowsToUpdate()
           
 
Methods inherited from class org.eobjects.metamodel.update.AbstractRowUpdationBuilder
getTable, getWhereItems, toSql, toString, where, where, where, where
 
Methods inherited from class org.eobjects.metamodel.data.AbstractRowBuilder
getColumns, getExplicitNulls, getStyles, getValues, isSet, toRow, value, value, value, value, value, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eobjects.metamodel.data.RowBuilder
isSet, toRow, value, value, value, value, value, value
 

Constructor Detail

DeleteAndInsertBuilder

public DeleteAndInsertBuilder(AbstractUpdateCallback updateCallback,
                              Table table)
Method Detail

execute

public void execute()
             throws MetaModelException
Description copied from interface: RowUpdationBuilder
Commits the row updation operation. This operation will overwrite rows in the DataContext.

Throws:
MetaModelException - if the operation was rejected

getRowsToUpdate

protected List<Row> getRowsToUpdate()


Copyright © 2007-2013. All Rights Reserved.