org.eobjects.metamodel.insert
Interface RowInsertionBuilder

All Superinterfaces:
RowBuilder<RowInsertionBuilder>
All Known Implementing Classes:
AbstractRowInsertionBuilder

public interface RowInsertionBuilder
extends RowBuilder<RowInsertionBuilder>

Builder object for row insertion, into a Table.

Author:
Kasper Sørensen

Method Summary
 void execute()
          Commits the row insertion operation.
 Table getTable()
          Gets the table that this insert pertains to.
 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.
 
Methods inherited from interface org.eobjects.metamodel.data.RowBuilder
isSet, toRow, value, value, value, value, value, value
 

Method Detail

getTable

Table getTable()
Gets the table that this insert pertains to.

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

like

RowInsertionBuilder like(Row row)
Sets all values like the provided row (for easy duplication of a row).

Parameters:
row - the row from which to take values
Returns:
the builder itself

execute

void execute()
             throws MetaModelException
Commits the row insertion operation. This operation will write the row to the DataContext.

Throws:
MetaModelException - if the operation was rejected

toSql

String toSql()
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.

Returns:
a SQL representation of this insert operation.


Copyright © 2007-2013. All Rights Reserved.