org.openstreetmap.osmosis.core.apidb.v0_6.impl
Class AllEntityDao

java.lang.Object
  extended by org.openstreetmap.osmosis.core.apidb.v0_6.impl.AllEntityDao
All Implemented Interfaces:
ReplicationSource

public class AllEntityDao
extends java.lang.Object
implements ReplicationSource

Provides operations that act on on all entity types by combining operations from the underlying DAO implementations.


Constructor Summary
AllEntityDao(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
          Creates a new instance.
 
Method Summary
 ReleasableIterator<EntityContainer> getCurrent()
          Retrieves all current data in the database.
 ReleasableIterator<ChangeContainer> getHistory()
          Retrieves all changes in the database.
 ReleasableIterator<ChangeContainer> getHistory(java.util.Date intervalBegin, java.util.Date intervalEnd)
          Retrieves the changes that have were made between two points in time.
 ReleasableIterator<ChangeContainer> getHistory(ReplicationQueryPredicates predicates)
          Retrieves the changes that have were made by a set of transactions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllEntityDao

public AllEntityDao(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Creates a new instance.

Parameters:
jdbcTemplate - Used to access the database.
Method Detail

getHistory

public ReleasableIterator<ChangeContainer> getHistory(ReplicationQueryPredicates predicates)
Retrieves the changes that have were made by a set of transactions.

Specified by:
getHistory in interface ReplicationSource
Parameters:
predicates - Contains the predicates defining the transactions to be queried.
Returns:
An iterator pointing at the identified records.

getHistory

public ReleasableIterator<ChangeContainer> getHistory(java.util.Date intervalBegin,
                                                      java.util.Date intervalEnd)
Retrieves the changes that have were made between two points in time.

Parameters:
intervalBegin - Marks the beginning (inclusive) of the time interval to be checked.
intervalEnd - Marks the end (exclusive) of the time interval to be checked.
Returns:
An iterator pointing at the identified records.

getHistory

public ReleasableIterator<ChangeContainer> getHistory()
Retrieves all changes in the database.

Returns:
An iterator pointing at the identified records.

getCurrent

public ReleasableIterator<EntityContainer> getCurrent()
Retrieves all current data in the database.

Returns:
An iterator pointing at the current records.