1 package org.itracker.persistence.dao;
2
3 import java.util.List;
4
5 import org.hibernate.HibernateException;
6 import org.itracker.model.CustomFieldValue;
7
8
9
10
11
12 public class CustomFieldValueDAOImpl
13 extends BaseHibernateDAOImpl<CustomFieldValue>
14 implements CustomFieldValueDAO {
15
16 public CustomFieldValue findByPrimaryKey(Integer customFieldId) {
17 try {
18 return (CustomFieldValue)getSession().load(CustomFieldValue.class, customFieldId);
19 } catch (HibernateException e) {
20 throw convertHibernateAccessException(e);
21 }
22 }
23
24 @SuppressWarnings("unchecked")
25 public List<CustomFieldValue> findAll() {
26 try {
27 return getSession().createCriteria(CustomFieldValue.class).list();
28 } catch (HibernateException e) {
29 throw convertHibernateAccessException(e);
30 }
31 }
32 }