org.filteredpush.client.dao
Class UserDao

java.lang.Object
  extended by org.filteredpush.client.dao.UserDao

@Transactional
public class UserDao
extends java.lang.Object

A data access object through which the upper service object, e.g. UserAccessService, can read/write the database.

Author:
Lei Dou $Id:$

Constructor Summary
UserDao()
           
 
Method Summary
 void addNewInterest(Interest interest)
          Add new interest.
 java.util.List<FPUser> getNoneApprovedUsers()
          Find the user need to be approved by the manager.
 org.hibernate.SessionFactory getSessionFactory()
           
 java.util.List<FPUser> getUser(java.lang.String userName)
          Find the user by name
 void removeAnnotationMetadataMapping(AnnotationMetadataMapping m)
          Remove the annotation metadata mapping
 void removeAnnotationStatus(AnnotationStatus status)
          Remove the annotation status.
 void removeInterest(Interest interest)
          Remove the interest
 void saveOrUpdateAnnotationMetadataMapping(AnnotationMetadataMapping m)
          Save or update the the annotation metadata mapping
 void saveOrupdateAnnotationStatus(AnnotationStatus status)
          Save or update the annotation status.
 void saveOrupdateLocalDataSource(LocalDataSource localDataSource)
          Save or update the local data source
 void saveUser(FPUser user)
          Add a new user.
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
           
 void updateInterestCriteria(InterestCriteria interestCriteria)
          Update the interest criteria.
 void updateUser(FPUser user)
          Update the user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDao

public UserDao()
Method Detail

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)

getUser

public java.util.List<FPUser> getUser(java.lang.String userName)
Find the user by name

Parameters:
userName - The user name used as the search criteria.
Returns:
The list of user with the specified name.

getNoneApprovedUsers

public java.util.List<FPUser> getNoneApprovedUsers()
Find the user need to be approved by the manager.

Returns:
The list of to-be-approved user.

saveUser

public void saveUser(FPUser user)
Add a new user.

Parameters:
user - The user to be added.

updateUser

public void updateUser(FPUser user)
Update the user.

Parameters:
user - The user to be updated.

updateInterestCriteria

public void updateInterestCriteria(InterestCriteria interestCriteria)
Update the interest criteria.

Parameters:
interestCriteria - The interest criteria to be updated.

saveOrupdateLocalDataSource

public void saveOrupdateLocalDataSource(LocalDataSource localDataSource)
Save or update the local data source

Parameters:
localDataSource - The local data source to be added or updated.

addNewInterest

public void addNewInterest(Interest interest)
Add new interest.

Parameters:
interest - The interest to be added.

removeInterest

public void removeInterest(Interest interest)
Remove the interest

Parameters:
interest - The interest to be removed.

saveOrupdateAnnotationStatus

public void saveOrupdateAnnotationStatus(AnnotationStatus status)
Save or update the annotation status.

Parameters:
status - The annotation stauts to be saved or updated.

removeAnnotationStatus

public void removeAnnotationStatus(AnnotationStatus status)
Remove the annotation status.

Parameters:
status - The annotation status to be removed.

removeAnnotationMetadataMapping

public void removeAnnotationMetadataMapping(AnnotationMetadataMapping m)
Remove the annotation metadata mapping

Parameters:
The - annotation metadata mapping to be removed.

saveOrUpdateAnnotationMetadataMapping

public void saveOrUpdateAnnotationMetadataMapping(AnnotationMetadataMapping m)
Save or update the the annotation metadata mapping

Parameters:
m - The annotation metadata mapping to be saved or updated.