| 1 |
|
package org.itracker.persistence.dao; |
| 2 |
|
|
| 3 |
|
import java.util.List; |
| 4 |
|
|
| 5 |
|
import org.itracker.model.IssueRelation; |
| 6 |
|
|
| 7 |
|
import org.hibernate.HibernateException; |
| 8 |
|
import org.hibernate.Query; |
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 4 |
Complexity Density: 0.4 |
|
| 13 |
|
public class IssueRelationDAOImpl extends BaseHibernateDAOImpl<IssueRelation> |
| 14 |
|
implements IssueRelationDAO { |
| 15 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 16 |
0
|
public IssueRelation findByPrimaryKey(Integer relationId) {... |
| 17 |
0
|
try { |
| 18 |
0
|
return (IssueRelation)getSession().get(IssueRelation.class, relationId); |
| 19 |
|
} catch (HibernateException ex) { |
| 20 |
0
|
throw convertHibernateAccessException(ex); |
| 21 |
|
} |
| 22 |
|
} |
| 23 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.29 |
|
| 24 |
0
|
@SuppressWarnings("unchecked")... |
| 25 |
|
public List<IssueRelation> findByIssue(Integer issueId) { |
| 26 |
0
|
List<IssueRelation> relations; |
| 27 |
|
|
| 28 |
0
|
try { |
| 29 |
0
|
Query query = getSession().getNamedQuery( |
| 30 |
|
"IssueRelationsByIssueQuery"); |
| 31 |
0
|
query.setInteger("issueId", issueId); |
| 32 |
0
|
relations = query.list(); |
| 33 |
|
} catch (HibernateException ex) { |
| 34 |
0
|
throw convertHibernateAccessException(ex); |
| 35 |
|
} |
| 36 |
0
|
return relations; |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
} |