Rev 31 | Rev 34 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 31 | Rev 33 | ||
---|---|---|---|
1 | package ch.ffhs.webE.dao; |
1 | package ch.ffhs.webE.dao; |
2 | 2 | ||
3 | import java.util.List; |
3 | import java.util.List; |
4 | 4 | ||
5 | import ch.ffhs.webE.domain.Term; |
5 | import ch.ffhs.webE.domain.Term; |
6 | 6 | ||
7 | /**
|
7 | /**
|
8 | * Defines methods all term DAO implementations must implement
|
8 | * Defines methods all term DAO implementations must implement
|
9 | *
|
9 | *
|
10 | * @author pelinux
|
10 | * @author pelinux
|
11 | */
|
11 | */
|
12 | public interface TermDAO |
12 | public interface TermDAO |
13 | {
|
13 | {
|
14 | /**
|
14 | /**
|
15 | * @return
|
15 | * @return
|
16 | */
|
16 | */
|
17 | List<Term> listTerm(); |
17 | List<Term> listTerm(); |
18 | 18 | ||
19 | /**
|
19 | /**
|
20 | * @param termName
|
- | |
21 | * @return
|
- | |
22 | */
|
- | |
23 | Term searchTerm(String termName); |
- | |
24 | - | ||
25 | /**
|
- | |
26 | * Delete a term
|
20 | * Delete a term
|
27 | *
|
21 | *
|
28 | * @param termId
|
22 | * @param termId
|
29 | * Term ID
|
23 | * Term ID
|
30 | */
|
24 | */
|
31 | void deleteTerm(int termId); |
25 | void deleteTerm(int termId); |
32 | 26 | ||
33 | /**
|
27 | /**
|
- | 28 | * Retrieves a term by ID
|
|
- | 29 | *
|
|
34 | * @param termId
|
30 | * @param termId
|
35 | * @return
|
31 | * @return
|
36 | */
|
32 | */
|
37 | Term listTermById(int termId); |
33 | Term getTermById(int termId); |
38 | 34 | ||
39 | /**
|
35 | /**
|
40 | * Executes the query to save the term
|
36 | * Executes the query to save the term
|
41 | *
|
37 | *
|
42 | * @param term
|
38 | * @param term
|
43 | * Domain object to be saved
|
39 | * Domain object to be saved
|
- | 40 | * @return <code>true</code> if successful, <code>false</code> otherwise
|
|
44 | */
|
41 | */
|
45 | void saveOrUpdate(Term term); |
42 | boolean saveOrUpdate(Term term); |
46 | }
|
43 | }
|
47 | 44 |