org.deegree.commons.jdbc
Class InsertRow
java.lang.Object
org.deegree.commons.jdbc.TransactionRow
org.deegree.commons.jdbc.InsertRow
public class InsertRow
- extends TransactionRow
Encapsulates columns and values for inserting one row into a database table.
- Version:
- $Revision: $, $Date: $
- Author:
- Markus Schneider, last edited by: $Author: markus $
autogenColumn
protected String autogenColumn
InsertRow
public InsertRow(QTableName table,
String autoGenColumn)
- Creates a new
InsertRow
instance.
- Parameters:
table
- table targeted by the insert, must not be null
autoGenColumn
- name of column with auto generation, can be null
(no auto-generated columns)
get
public Object get(String column)
- Overrides:
get
in class TransactionRow
- Parameters:
column
- the name of the column, must not be null
- Returns:
- the value assigned to the column with the given name, null if there is not value assigned
getSql
public String getSql()
- Specified by:
getSql
in class TransactionRow
- Returns:
- the generated sl statement
performInsert
public Map<String,Object> performInsert(Connection conn)
throws SQLException
- Performs the insertion and deals with autogenerated columns.
- Parameters:
conn
- JDBC connection to use for the insertion, must not be null
- Returns:
- autogenerated keys, can be empty, but never
null
- Throws:
SQLException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2011. All Rights Reserved.