org.duraspace.fcrepo.cloudsync.service.dao
Class UserDao

java.lang.Object
  extended by org.duraspace.fcrepo.cloudsync.service.dao.UserDao

public class UserDao
extends Object


Field Summary
protected  org.springframework.jdbc.core.JdbcTemplate db
           
 
Constructor Summary
UserDao(org.springframework.jdbc.core.JdbcTemplate db, org.springframework.transaction.support.TransactionTemplate tt)
           
 
Method Summary
 User createUser(User user)
           
 void deleteUser(String id)
           
 User getCurrentUser()
           
 User getUser(String id)
           
 void initDb()
           
protected  String insert(String sql, Object... values)
           
 List<User> listUsers()
           
 User updateUser(String id, User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

protected final org.springframework.jdbc.core.JdbcTemplate db
Constructor Detail

UserDao

public UserDao(org.springframework.jdbc.core.JdbcTemplate db,
               org.springframework.transaction.support.TransactionTemplate tt)
Method Detail

initDb

public void initDb()

createUser

public User createUser(User user)
                throws UnauthorizedException
Throws:
UnauthorizedException

listUsers

public List<User> listUsers()

getUser

public User getUser(String id)

getCurrentUser

public User getCurrentUser()

updateUser

public User updateUser(String id,
                       User user)
                throws UnauthorizedException
Throws:
UnauthorizedException

deleteUser

public void deleteUser(String id)
                throws UnauthorizedException
Throws:
UnauthorizedException

insert

protected String insert(String sql,
                        Object... values)
                 throws org.springframework.dao.DuplicateKeyException
Throws:
org.springframework.dao.DuplicateKeyException


Copyright © 2012 DuraSpace. All Rights Reserved.