org.deegree.commons.jdbc
Class TransactionRow
java.lang.Object
org.deegree.commons.jdbc.TransactionRow
- Direct Known Subclasses:
- InsertRow, UpdateRow
public abstract class TransactionRow
- extends Object
Encapsulates columns and values for manipulating one row in a database.
- Version:
- $Revision: $, $Date: $
- Author:
- Lyn Goltz, last edited by: $Author: lyn $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
table
protected QTableName table
columnToLiteral
protected final LinkedHashMap<String,String> columnToLiteral
columnToObject
protected final LinkedHashMap<String,Object> columnToObject
TransactionRow
public TransactionRow(QTableName table)
- Parameters:
table
- table targeted by the transaction, must not be null
getTable
public QTableName getTable()
- Returns:
- the table targeted for the transaction
addLiteralValue
public void addLiteralValue(String column,
String literal)
- Parameters:
column
- the name of the column, must not be null
literal
- a string literal to add as value
addPreparedArgument
public void addPreparedArgument(String column,
Object value)
- Parameters:
column
- the name of the column, must not be null
value
- the value to append, can be null
addPreparedArgument
public void addPreparedArgument(String column,
Object value,
String literal)
- Use this method for example to manipulate a geometry: (#addPreparedArgument("geom", geomAsWKB,
"SetSRID(GeomFromWKB(?)"))
- Parameters:
column
- the name of the column, must not be null
value
- the value to append, can be null
literal
- the string literal to append to the list of values, must not be null
addPreparedArgument
public <T extends TypedObjectNode> void addPreparedArgument(String column,
T particle,
ParticleConverter<T> converter)
getColumns
public Collection<String> getColumns()
- Returns:
- all columns considered by this tranaction
get
public Object get(String column)
- 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 abstract String getSql()
- Returns:
- the generated sl statement
Copyright © 2011. All Rights Reserved.