KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > clipbuilder > html > database > hibernate > dao > ClipperDAO


1 package org.jahia.clipbuilder.html.database.hibernate.dao;
2 import java.util.List JavaDoc;
3 import org.jahia.clipbuilder.html.database.hibernate.model.Clipper;
4 import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
5 /**
6  * Clipper DAO
7  *
8  *@author kTlili
9  */

10 public class ClipperDAO extends HibernateDaoSupport {
11     /**
12      * Gets the Clipper attribute of the ClipperDAO object
13      *
14      *@param id Description of Parameter
15      *@return The Clipper value
16      */

17     public Clipper getClipper(Long JavaDoc id) {
18         return (Clipper) getHibernateTemplate().get(Clipper.class, id);
19     }
20
21
22         /**
23          * Gets the ListClipperName attribute of the ClipperDAO object
24          *
25          *@return The ListClipperName value
26          */

27         public List JavaDoc getListClipper() {
28                 return getHibernateTemplate().find("from Clipper");
29         }
30
31
32
33     /**
34      * Description of the Method
35      *
36      *@param clipper Description of Parameter
37      */

38     public void saveClipper(Clipper clipper) {
39         getHibernateTemplate().merge(clipper);
40     }
41
42
43     /**
44      * Description of the Method
45      *
46      *@param id Description of Parameter
47      */

48     public void removeClipper(Long JavaDoc id) {
49         Object JavaDoc clipper = getHibernateTemplate().load(Clipper.class, id);
50         getHibernateTemplate().delete(clipper);
51     }
52
53 }
54
Popular Tags