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