org.openstreetmap.osmosis.core.apidb.common
Interface IdentityValueLoader

All Superinterfaces:
Releasable
All Known Implementing Classes:
MysqlIdentityValueLoader, MysqlIdentityValueLoader2, PostgresqlIdentityValueLoader, PostgresqlIdentityValueLoader2

public interface IdentityValueLoader
extends Releasable

Retrieves last inserted identity columns. This examines global connection values and may not work correctly if the database uses triggers. It will however work correctly in a multi-threaded environment.

Author:
Brett Henderson

Method Summary
 long getLastInsertId()
          Returns the id of the most recently inserted row on the current connection.
 long getLastSequenceId(java.lang.String sequenceName)
          Returns the most recently returned value from the specified sequence on the current connection.
 
Methods inherited from interface org.openstreetmap.osmosis.core.lifecycle.Releasable
release
 

Method Detail

getLastInsertId

long getLastInsertId()
Returns the id of the most recently inserted row on the current connection.

Returns:
The newly inserted id.

getLastSequenceId

long getLastSequenceId(java.lang.String sequenceName)
Returns the most recently returned value from the specified sequence on the current connection.

Parameters:
sequenceName - The name of the sequence to query.
Returns:
The most recent sequence id.