com.bretth.osmosis.core.mysql.v0_6.impl
Class NodeChangeReader

java.lang.Object
  extended by com.bretth.osmosis.core.mysql.v0_6.impl.NodeChangeReader

public class NodeChangeReader
extends java.lang.Object

Reads the set of node changes from a database that have occurred within a time interval.

Author:
Brett Henderson

Constructor Summary
NodeChangeReader(DatabaseLoginCredentials loginCredentials, boolean readAllUsers, java.util.Date intervalBegin, java.util.Date intervalEnd, boolean fullHistory)
          Creates a new instance.
 
Method Summary
 boolean hasNext()
          Indicates if there is any more data available to be read.
 ChangeContainer next()
          Returns the next available entity and advances to the next record.
 void release()
          Releases all database resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeChangeReader

public NodeChangeReader(DatabaseLoginCredentials loginCredentials,
                        boolean readAllUsers,
                        java.util.Date intervalBegin,
                        java.util.Date intervalEnd,
                        boolean fullHistory)
Creates a new instance.

Parameters:
loginCredentials - Contains all information required to connect to the database.
readAllUsers - If this flag is true, all users will be read from the database regardless of their public edits flag.
intervalBegin - Marks the beginning (inclusive) of the time interval to be checked.
intervalEnd - Marks the end (exclusive) of the time interval to be checked.
fullHistory - Specifies if full version history should be returned, or just a single change per entity for the interval.
Method Detail

hasNext

public boolean hasNext()
Indicates if there is any more data available to be read.

Returns:
True if more data is available, false otherwise.

next

public ChangeContainer next()
Returns the next available entity and advances to the next record.

Returns:
The next available entity.

release

public void release()
Releases all database resources. This method is guaranteed not to throw transactions and should alnodes be called in a finally block whenever this class is used.