com.atlassian.confluence.follow.persistence.dao.hibernate
Class HibernateConnectionDao

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

public class HibernateConnectionDao
extends org.springframework.orm.hibernate.support.HibernateDaoSupport
implements ConnectionDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateConnectionDao()
           
 
Method Summary
 void followUser(com.atlassian.user.User follower, com.atlassian.user.User followee)
          Sets the follower to follow the specified user.
 List<String> getFollowees(com.atlassian.user.User follower)
          Returns a list of usernames for the users that the specified user is following
 List<String> getFollowers(com.atlassian.user.User followee)
          Returns a list of users that are followers of the specified user
 boolean isUserFollowing(com.atlassian.user.User follower, com.atlassian.user.User followee)
          True if the follower is following the followee
 void removeAllConnectionsFor(com.atlassian.user.User user)
          Removes all connections for this user (as a follower and as a followee).
 void unfollowUser(com.atlassian.user.User follower, com.atlassian.user.User followee)
          Unsets the follower from following the specified user.
 
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

HibernateConnectionDao

public HibernateConnectionDao()
Method Detail

getFollowers

public List<String> getFollowers(com.atlassian.user.User followee)
Description copied from interface: ConnectionDao
Returns a list of users that are followers of the specified user

Specified by:
getFollowers in interface ConnectionDao
Parameters:
followee - the user to check for followers
Returns:
a list of usernames

getFollowees

public List<String> getFollowees(com.atlassian.user.User follower)
Description copied from interface: ConnectionDao
Returns a list of usernames for the users that the specified user is following

Specified by:
getFollowees in interface ConnectionDao
Parameters:
follower - the username
Returns:
a list of usernames

isUserFollowing

public boolean isUserFollowing(com.atlassian.user.User follower,
                               com.atlassian.user.User followee)
Description copied from interface: ConnectionDao
True if the follower is following the followee

Specified by:
isUserFollowing in interface ConnectionDao
Parameters:
follower - the proposed follower
followee - the proposed followee
Returns:
true if the follower is following the followee

followUser

public void followUser(com.atlassian.user.User follower,
                       com.atlassian.user.User followee)
Description copied from interface: ConnectionDao
Sets the follower to follow the specified user. If the follow is alreading following the followee then this method does nothing.

Specified by:
followUser in interface ConnectionDao
Parameters:
follower - the follower
followee - the new followee

unfollowUser

public void unfollowUser(com.atlassian.user.User follower,
                         com.atlassian.user.User followee)
Description copied from interface: ConnectionDao
Unsets the follower from following the specified user. If the follow is not following the followee then this method does nothing.

Specified by:
unfollowUser in interface ConnectionDao
Parameters:
follower - the follower
followee - the new followee

removeAllConnectionsFor

public void removeAllConnectionsFor(com.atlassian.user.User user)
Description copied from interface: ConnectionDao
Removes all connections for this user (as a follower and as a followee).

Specified by:
removeAllConnectionsFor in interface ConnectionDao
Parameters:
user - the user


Copyright © 2003-2011 Atlassian. All Rights Reserved.