1 /**
2 Copyright (C) 2007 <name of author>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 package org.in2.simpleBoard.dao;
18
19 import java.util.List;
20 import org.appfuse.dao.GenericDao;
21 import org.in2.simpleBoard.InternalException;
22 import org.in2.simpleBoard.model.Person;
23
24 public interface PersonDao extends GenericDao<Person, Long> {
25 /**
26 * Find users by his username
27 * @param userName : username
28 * @return : return a user or null
29 * @throws InternalException
30 */
31 Person findByUserName(String userName) throws InternalException;
32
33 List<Person> findByName(String name);
34
35 List<Person> findBySurname(String surname);
36
37 List<Person> findByEmail(String email);
38 }