Rev 35 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 35 | Rev 37 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | /**
|
14 | /**
|
15 | * Implements the Database Access Object for terms
|
15 | * Implements the Database Access Object for terms
|
16 | *
|
16 | *
|
17 | * @author Thomas Lahn
|
17 | * @author Thomas Lahn
|
18 | */
|
18 | */
|
19 | public class RelationshipDAOImpl |
19 | public class RelationshipDAO |
20 | {
|
20 | {
|
21 | /**
|
21 | /**
|
22 | * Database session
|
22 | * Database session
|
23 | */
|
23 | */
|
24 | @SessionTarget |
24 | @SessionTarget |
Line 35... | Line 35... | ||
35 | *
|
35 | *
|
36 | * @return an ArrayList with all the relationshops - in case of a problem, an
|
36 | * @return an ArrayList with all the relationshops - in case of a problem, an
|
37 | * empty list is returned
|
37 | * empty list is returned
|
38 | */
|
38 | */
|
39 | @SuppressWarnings("unchecked") |
39 | @SuppressWarnings("unchecked") |
40 | public List<Relationship> getRelationshipList() |
40 | public List<Relationship> getList() |
41 | {
|
41 | {
|
42 | List<Relationship> relationship = null; |
42 | List<Relationship> relationship = null; |
43 | try
|
43 | try
|
44 | {
|
44 | {
|
45 | relationship = this.session.createQuery("from Relationship").list(); //$NON-NLS-1$ |
45 | relationship = this.session.createQuery("from Relationship").list(); //$NON-NLS-1$ |
Line 88... | Line 88... | ||
88 | * Delete a relationship
|
88 | * Delete a relationship
|
89 | *
|
89 | *
|
90 | * @param id
|
90 | * @param id
|
91 | * Relationship ID
|
91 | * Relationship ID
|
92 | */
|
92 | */
|
93 | public void deleteRelationship(int id) |
93 | public void delete(int id) |
94 | {
|
94 | {
|
95 | try
|
95 | try
|
96 | {
|
96 | {
|
97 | Relationship relationship = (Relationship) this.session.get( |
97 | Relationship relationship = (Relationship) this.session.get( |
98 | Relationship.class, id); |
98 | Relationship.class, id); |
Line 110... | Line 110... | ||
110 | *
|
110 | *
|
111 | * @param id
|
111 | * @param id
|
112 | * Term ID
|
112 | * Term ID
|
113 | * @return The relationship with this <var>id</var>
|
113 | * @return The relationship with this <var>id</var>
|
114 | */
|
114 | */
|
115 | public Relationship getRelationshipById(int id) |
115 | public Relationship getById(int id) |
116 | {
|
116 | {
|
117 | Relationship relationship = null; |
117 | Relationship relationship = null; |
118 | 118 | ||
119 | try
|
119 | try
|
120 | {
|
120 | {
|