KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > javabb > dao > hibernate > BadWordHibernateDAO


1 package org.javabb.dao.hibernate;
2
3 import java.util.List JavaDoc;
4
5 import org.javabb.dao.entity.IBadWordDAO;
6 import org.javabb.vo.BadWord;
7
8 /*
9  * Copyright 2004 JavaFree.org
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */

23
24 /* $Id: BadWordHibernateDAO.java,v 1.5.8.2 2006/04/17 17:46:28 daltoncamargo Exp $ */
25 /**
26  * @author Dalton Camargo - <a HREF="mailto:dalton@javabb.org">dalton@javabb.org </a> <br>
27  * @author Ronald Tetsuo Miura
28  */

29 public class BadWordHibernateDAO extends HibernateDAO implements IBadWordDAO {
30
31     /**
32      * @see org.javabb.dao.entity.IBadWordDAO#findAll()
33      */

34     public List JavaDoc findAll() {
35         return getHibernateTemplate().loadAll(BadWord.class);
36     }
37
38     /**
39      * @see org.javabb.dao.entity.IBadWordDAO#load(java.lang.Long)
40      */

41     public BadWord load(final Long JavaDoc id) {
42         return (BadWord) getHibernateTemplate().load(BadWord.class, id);
43     }
44
45     /**
46      * @see org.javabb.dao.entity.IBadWordDAO#delete(org.javabb.vo.BadWord)
47      */

48     public void delete(BadWord badword) {
49         getHibernateTemplate().delete(badword);
50     }
51
52     /**
53      * @see org.javabb.dao.entity.IBadWordDAO#save(org.javabb.vo.BadWord)
54      */

55     public void save(BadWord badword) {
56         getHibernateTemplate().save(badword);
57     }
58 }
Popular Tags