/src/main/java/com/google/ie/business/dao/UserDao.java

http://thoughtsite.googlecode.com/ · Java · 57 lines · 9 code · 7 blank · 41 comment · 0 complexity · 65018f0fec469a0223074ce98e5d1075 MD5 · raw file

  1. /* Copyright 2010 Google Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS.
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License
  14. */
  15. package com.google.ie.business.dao;
  16. import com.google.ie.business.domain.User;
  17. import com.google.ie.dto.RetrievalInfo;
  18. import java.util.List;
  19. /**
  20. * A service specification for the User entity
  21. *
  22. * @author Charanjeet singh
  23. *
  24. */
  25. public interface UserDao extends BaseDao {
  26. /**
  27. * Saves a user in to data store.
  28. *
  29. * @param user User object.
  30. *
  31. * @return Returns the saved user.
  32. */
  33. User saveUser(User user);
  34. /**
  35. * Retrieves the user corresponding to the id.
  36. *
  37. * @param id String object representing the user's id
  38. * @return Returns the user object or null;
  39. */
  40. User getUserById(String id);
  41. /**
  42. * Get list of registered users with the given role and status.
  43. *
  44. * @param retrievalInfo information for accessing users.
  45. * @param role role of user
  46. * @param status status of user
  47. * @return list of users
  48. */
  49. List<User> getUsers(RetrievalInfo retrievalInfo, String role, String status);
  50. }