KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jahia.clipbuilder.html.database.hibernate.dao;
2 import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
3 import org.jahia.clipbuilder.html.database.hibernate.model.Configuration;
4 /**
5  * Description of the Class
6  *
7  *@author kTlili
8  */

9 public class DefaultConfigurationDAO extends HibernateDaoSupport {
10
11     /**
12      * Gets the DefaultConfiguration attribute of the DefaultConfigurationDAO
13      * object
14      *
15      *@return The DefaultConfiguration value
16      */

17     public Configuration getDefaultConfiguration() {
18         return (Configuration) getHibernateTemplate().get(Configuration.class, Long.valueOf("1"));
19     }
20
21
22     /**
23      * Save Or update the default configuration
24      *
25      *@param conf Description of Parameter
26      */

27     public void saveOrUpdateDefaultConfiguration(Configuration conf) {
28         getHibernateTemplate().merge(conf);
29     }
30
31 }
32
Popular Tags