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

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

public class UserDao
extends BaseDao

Performs all user-specific db operations.

Author:
Brett Henderson

Constructor Summary
UserDao(DatabaseContext dbCtx, ActionDao actionDao)
          Creates a new instance.
 
Method Summary
 void addUser(OsmUser user)
          Adds the specified user to the database.
 OsmUser getUser(long userId)
          Loads the specified way from the database.
 void updateUser(OsmUser user)
          Updates the specified user record in the database.
 
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

UserDao

public UserDao(DatabaseContext dbCtx,
               ActionDao actionDao)
Creates a new instance.

Parameters:
dbCtx - The database context to use for accessing the database.
actionDao - The dao to use for adding action records to the database.
Method Detail

getUser

public OsmUser getUser(long userId)
Loads the specified way from the database.

Parameters:
userId - The unique identifier of the user.
Returns:
The loaded user.

addUser

public void addUser(OsmUser user)
Adds the specified user to the database.

Parameters:
user - The user to add.

updateUser

public void updateUser(OsmUser user)
Updates the specified user record in the database.

Parameters:
user - The user to update.