org.openstreetmap.osmosis.core.pgsql.v0_6.impl
Class ActionDao

java.lang.Object
  extended by org.openstreetmap.osmosis.core.pgsql.common.BaseDao
      extended by org.openstreetmap.osmosis.core.pgsql.v0_6.impl.ActionDao
All Implemented Interfaces:
Releasable

public class ActionDao
extends BaseDao

Performs all action db operations.

Author:
Brett Henderson

Constructor Summary
ActionDao(DatabaseContext dbCtx)
          Creates a new instance.
ActionDao(DatabaseContext dbCtx, boolean enabled)
          Creates a new instance.
 
Method Summary
 void addAction(ActionDataType dataType, ChangesetAction action, long id)
          Adds the specified action to the database.
 void truncate()
          Removes all action records.
 
Methods inherited from class org.openstreetmap.osmosis.core.pgsql.common.BaseDao
getDatabaseContext, prepareStatement, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionDao

public ActionDao(DatabaseContext dbCtx)
Creates a new instance.

Parameters:
dbCtx - The database context to use for accessing the database.

ActionDao

public ActionDao(DatabaseContext dbCtx,
                 boolean enabled)
Creates a new instance.

Parameters:
dbCtx - The database context to use for accessing the database.
enabled - Action records will only be written if this is set to true.
Method Detail

addAction

public void addAction(ActionDataType dataType,
                      ChangesetAction action,
                      long id)
Adds the specified action to the database.

Parameters:
dataType - The type of data being represented by this action.
action - The action being performed on the data.
id - The identifier of the data.

truncate

public void truncate()
Removes all action records.