com.atlassian.confluence.user.persistence.dao.hibernate
Class HibernateConfluenceUserDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.confluence.user.persistence.dao.hibernate.HibernateConfluenceUserDao
All Implemented Interfaces:
ConfluenceUserDao, org.springframework.beans.factory.InitializingBean

public class HibernateConfluenceUserDao
extends org.springframework.orm.hibernate.support.HibernateDaoSupport
implements ConfluenceUserDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateConfluenceUserDao(net.sf.hibernate.SessionFactory sessionFactory)
           
 
Method Summary
 void create(ConfluenceUser user)
          Persist a new ConfluenceUser.
 ConfluenceUser findByKey(com.atlassian.sal.api.user.UserKey key)
          Retrieve a ConfluenceUser by the user key.
 ConfluenceUser findByUsername(java.lang.String username)
          Find the ConfluenceUser with the given user name.
 java.util.Set<ConfluenceUser> getAll()
           
 void remove(ConfluenceUser user)
          Remove the supplied ConfluenceUser from persistence.
 ConfluenceUser rename(java.lang.String oldUsername, java.lang.String newUsername, boolean overrideExisting)
          Renames a user
 void update(ConfluenceUser user)
          Change a property of an existing ConfluenceUser.
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateConfluenceUserDao

public HibernateConfluenceUserDao(net.sf.hibernate.SessionFactory sessionFactory)
Method Detail

create

public void create(ConfluenceUser user)
Persist a new ConfluenceUser.

Specified by:
create in interface ConfluenceUserDao

update

public void update(ConfluenceUser user)
Description copied from interface: ConfluenceUserDao
Change a property of an existing ConfluenceUser.

Specified by:
update in interface ConfluenceUserDao

findByKey

public ConfluenceUser findByKey(com.atlassian.sal.api.user.UserKey key)
Description copied from interface: ConfluenceUserDao
Retrieve a ConfluenceUser by the user key.

Specified by:
findByKey in interface ConfluenceUserDao
Returns:
a ConfluenceUser with the supplied key

findByUsername

public ConfluenceUser findByUsername(java.lang.String username)
Description copied from interface: ConfluenceUserDao
Find the ConfluenceUser with the given user name.

Note that username lookups are case-insensitive, so the user you get back may not have exactly the same name as the name passed to this method.

Specified by:
findByUsername in interface ConfluenceUserDao
Returns:
a ConfluenceUser with the supplied username.

getAll

public java.util.Set<ConfluenceUser> getAll()
Specified by:
getAll in interface ConfluenceUserDao
Returns:
all the ConfluenceUser

remove

public void remove(ConfluenceUser user)
Description copied from interface: ConfluenceUserDao
Remove the supplied ConfluenceUser from persistence.

Specified by:
remove in interface ConfluenceUserDao

rename

public ConfluenceUser rename(java.lang.String oldUsername,
                             java.lang.String newUsername,
                             boolean overrideExisting)
Description copied from interface: ConfluenceUserDao
Renames a user

Specified by:
rename in interface ConfluenceUserDao
Parameters:
oldUsername - old username for the user
newUsername - new username for the user
overrideExisting - True if possible existing mapping should make way for the renamed one. False for opposite behaviour.
Returns:
renamed user


Copyright © 2003-2014 Atlassian. All Rights Reserved.