org.zeroexchange.user.write
Class DAOUserWriter

java.lang.Object
  extended by org.zeroexchange.dao.HibernateSessionHolder
      extended by org.zeroexchange.user.write.DAOUserWriter
All Implemented Interfaces:
UserWriter

@Transactional
public class DAOUserWriter
extends HibernateSessionHolder
implements UserWriter

Implentation of the UserWriter that uses DAOs.

Author:
black

Constructor Summary
DAOUserWriter()
           
 
Method Summary
 User createUser(User user, Credential initialCredential)
          Adds new user to the database.
 void updateUser(User user)
          Updates the specified user in database.
 
Methods inherited from class org.zeroexchange.dao.HibernateSessionHolder
getSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DAOUserWriter

public DAOUserWriter()
Method Detail

createUser

public User createUser(User user,
                       Credential initialCredential)
Adds new user to the database. NOTE: DOES NOT apply '@Secured' annotation on this method since it is used by the registration form! TODO: create separate 'registration' permission. it can be used in conjunction with capture

Specified by:
createUser in interface UserWriter

updateUser

@Secured(value="ROLE_USER")
public void updateUser(User user)
Updates the specified user in database.

Specified by:
updateUser in interface UserWriter


Copyright © 2013. All Rights Reserved.