1 package org.sourceforge.vlibrary.user.dao;
2
3
4
5 import java.util.ArrayList;
6
7 import org.sourceforge.vlibrary.exceptions.LibraryException;
8 import org.sourceforge.vlibrary.user.domain.Reader;
9
10
11
12
13
14
15
16 public interface ReaderDAO {
17
18
19
20
21
22
23
24
25
26 public void insert( Reader reader ) throws LibraryException;
27
28 public void update(Reader reader ) throws LibraryException;
29
30 public Reader retrieve( Reader rd )throws LibraryException;
31
32 public Reader retrieveById( long id ) throws LibraryException;
33
34 public Reader retrieveByPhone( String deskPhone ) throws LibraryException;
35
36 public Reader retrieveByUid(String uid ) throws LibraryException;
37
38 public boolean uidExists(String uid)
39 throws LibraryException;
40
41 public boolean readerExists(long reader)
42 throws LibraryException;
43
44 public boolean readerExists(String firstName, String lastName)
45 throws LibraryException;
46
47 public boolean deskPhoneExists(String deskPhone)
48 throws LibraryException;
49
50 public ArrayList getReaders()
51 throws LibraryException;
52
53 public long getReaderID(String firstName,String lastName)
54 throws LibraryException;
55
56 public void resetPassword(String user, String newPwd)
57 throws LibraryException;
58
59 }