*\r
* The contents of this file are subject to the Mozilla Public License Version 1.1\r
* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/ \r
+*/\r
\r
package eu.etaxonomy.cdm.persistence.dao.common;\r
\r
import eu.etaxonomy.cdm.persistence.query.OrderHint;\r
\r
public interface IUserDao extends ICdmEntityDao<User> {\r
- \r
- public User findUserByUsername(String username);\r
- \r
- /**\r
- * Return a List of users matching the given query string, optionally filtered by class, optionally with a particular MatchMode\r
- * \r
- * @param queryString the query string to filter by\r
- * @param matchmode use a particular type of matching (can be null - defaults to exact matching)\r
- * @param criteria extra restrictions to apply\r
- * @param pageSize The maximum number of rights returned (can be null for all rights)\r
- * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)\r
- * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}\r
- * @param orderHints\r
- * Supports path like <code>orderHints.propertyNames</code> which\r
- * include *-to-one properties like createdBy.username or\r
- * authorTeam.persistentTitleCache\r
- * @return a List of instances of User matching the queryString\r
- * @see {@link IIdentifiableDao#findByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}\r
- */\r
- public List<User> findByUsername(String queryString, MatchMode matchmode, List<Criterion> criteria, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);\r
-\r
- /**\r
- * Return a count of users matching the given query string in the username, optionally filtered by class, optionally with a particular MatchMode\r
- * \r
- * @param clazz filter by class - can be null to include all instances of type T\r
- * @param queryString the query string to filter by\r
- * @param matchmode use a particular type of matching (can be null - defaults to exact matching)\r
- * @param criteria extra restrictions to apply\r
- * @return a count of instances of type User matching the queryString\r
- * \r
- * @see {@link IIdentifiableDao#countByTitle(Class, String, MatchMode, List)}\r
- */\r
- public int countByUsername(String queryString, MatchMode matchmode, List<Criterion> criteria);\r
-\r
- \r
+\r
+ /**\r
+ * Among other purposes this method will be used while\r
+ * authenticating a user.\r
+ *\r
+ * @param username\r
+ * @return\r
+ */\r
+ public User findUserByUsername(String username);\r
+\r
+ /**\r
+ * Return a List of users matching the given query string, optionally filtered by class, optionally with a particular MatchMode\r
+ *\r
+ * @param queryString the query string to filter by\r
+ * @param matchmode use a particular type of matching (can be null - defaults to exact matching)\r
+ * @param criteria extra restrictions to apply\r
+ * @param pageSize The maximum number of rights returned (can be null for all rights)\r
+ * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)\r
+ * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}\r
+ * @param orderHints\r
+ * Supports path like <code>orderHints.propertyNames</code> which\r
+ * include *-to-one properties like createdBy.username or\r
+ * authorTeam.persistentTitleCache\r
+ * @return a List of instances of User matching the queryString\r
+ * @see {@link IIdentifiableDao#findByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}\r
+ */\r
+ public List<User> findByUsername(String queryString, MatchMode matchmode, List<Criterion> criteria, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);\r
+\r
+ /**\r
+ * Return a count of users matching the given query string in the username, optionally filtered by class, optionally with a particular MatchMode\r
+ *\r
+ * @param clazz filter by class - can be null to include all instances of type T\r
+ * @param queryString the query string to filter by\r
+ * @param matchmode use a particular type of matching (can be null - defaults to exact matching)\r
+ * @param criteria extra restrictions to apply\r
+ * @return a count of instances of type User matching the queryString\r
+ *\r
+ * @see {@link IIdentifiableDao#countByTitle(Class, String, MatchMode, List)}\r
+ */\r
+ public int countByUsername(String queryString, MatchMode matchmode, List<Criterion> criteria);\r
+\r
+\r
}\r