org.eobjects.metamodel.insert
Class AbstractRowInsertionBuilder<U extends UpdateCallback>

java.lang.Object
  extended by org.eobjects.metamodel.data.AbstractRowBuilder<RowInsertionBuilder>
      extended by org.eobjects.metamodel.insert.AbstractRowInsertionBuilder<U>
All Implemented Interfaces:
RowBuilder<RowInsertionBuilder>, RowInsertionBuilder

public abstract class AbstractRowInsertionBuilder<U extends UpdateCallback>
extends AbstractRowBuilder<RowInsertionBuilder>
implements RowInsertionBuilder

Abstract implementation of the RowInsertionBuilder interface, provided as a convenience to RowInsertable implementations. Handles all the building operations, but not the commit operation.

Author:
Kasper Sørensen

Constructor Summary
AbstractRowInsertionBuilder(U updateCallback, Table table)
           
 
Method Summary
 Table getTable()
          Gets the table that this insert pertains to.
protected  U getUpdateCallback()
           
 RowInsertionBuilder like(Row row)
          Sets all values like the provided row (for easy duplication of a row).
 String toSql()
          Gets a SQL representation of this insert operation.
 String toString()
           
 
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.insert.RowInsertionBuilder
execute
 
Methods inherited from interface org.eobjects.metamodel.data.RowBuilder
isSet, toRow, value, value, value, value, value, value
 

Constructor Detail

AbstractRowInsertionBuilder

public AbstractRowInsertionBuilder(U updateCallback,
                                   Table table)
Method Detail

getTable

public Table getTable()
Description copied from interface: RowInsertionBuilder
Gets the table that this insert pertains to.

Specified by:
getTable in interface RowBuilder<RowInsertionBuilder>
Specified by:
getTable in interface RowInsertionBuilder
Returns:
the table that this insert pertains to.

getUpdateCallback

protected U getUpdateCallback()

like

public RowInsertionBuilder like(Row row)
Description copied from interface: RowInsertionBuilder
Sets all values like the provided row (for easy duplication of a row).

Specified by:
like in interface RowInsertionBuilder
Parameters:
row - the row from which to take values
Returns:
the builder itself

toSql

public String toSql()
Description copied from interface: RowInsertionBuilder
Gets a SQL representation of this insert operation. Note that the generated SQL is dialect agnostic, so it is not accurately the same as what will be passed to a potential backing database.

Specified by:
toSql in interface RowInsertionBuilder
Returns:
a SQL representation of this insert operation.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2013. All Rights Reserved.