View Javadoc

1   // Created on 16.12.2003
2   package com.pnpconsult.zeiterfassung.helper;
3   
4   import java.util.List;
5   
6   import net.sf.hibernate.HibernateException;
7   
8   import com.pnpconsult.zeiterfassung.model.Activity;
9   
10  /***
11   * @author <a href="mailto:powerpete@users.sf.net">M. Petersen </a>
12   * @version $Id: ActivityManager.java,v 1.6 2004/06/24 20:54:18 powerpete Exp $
13   */
14  public class ActivityManager extends AbstractObjectManager2
15  {
16      public List loadAll() throws HibernateException
17      {
18          return loadAll(Activity.class);
19      }
20  
21      public List loadNotArchived() throws HibernateException
22      {
23          return loadAllNotArchived(Activity.class);
24      }
25  
26      public void delete(long id) throws HibernateException
27      {
28          delete(Activity.class, new Long(id));
29      }
30  
31      public Activity load(long id) throws HibernateException
32      {
33          return (Activity) load(Activity.class, new Long(id));
34      }
35  
36      public void save(Activity activity) throws HibernateException
37      {
38          Long key = (Long) super.save(activity);
39          activity.setId(key.longValue());
40      }
41  }