Package org.opennms.netmgt.dao.hibernate
Class CategoryDaoHibernate
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate3.support.HibernateDaoSupport
-
- org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate<T,DbKey>
-
- org.opennms.netmgt.dao.hibernate.AbstractCachingDaoHibernate<OnmsCategory,java.lang.Integer,java.lang.String>
-
- org.opennms.netmgt.dao.hibernate.CategoryDaoHibernate
-
- All Implemented Interfaces:
CategoryDao
,OnmsDao<OnmsCategory,java.lang.Integer>
,org.springframework.beans.factory.InitializingBean
public class CategoryDaoHibernate extends AbstractCachingDaoHibernate<OnmsCategory,java.lang.Integer,java.lang.String> implements CategoryDao
CategoryDaoHibernate class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate
m_criteriaConverter
-
-
Constructor Summary
Constructors Constructor Description CategoryDaoHibernate()
Constructor for CategoryDaoHibernate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OnmsCategory
findByName(java.lang.String name)
findByNameOnmsCategory
findByName(java.lang.String name, boolean useCached)
findByNamejava.util.List<java.lang.String>
getAllCategoryNames()
getAllCategoryNamesjava.util.List<OnmsCategory>
getCategoriesWithAuthorizedGroup(java.lang.String groupName)
getCategoriesWithAuthorizedGroupjava.util.List<org.hibernate.criterion.Criterion>
getCriterionForCategorySetsUnion(java.lang.String[]... categories)
getCriterionForCategorySetsUnionprotected java.lang.String
getKey(OnmsCategory category)
getKey-
Methods inherited from class org.opennms.netmgt.dao.hibernate.AbstractCachingDaoHibernate
clear, delete, deleteAll, findAll, findByCacheKey, get, load, merge, save, saveOrUpdate, update
-
Methods inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate
buildHibernateCallback, bulkDelete, countAll, countMatching, countMatching, delete, find, find, findMatching, findMatching, findObjects, findUnique, flush, initDao, initialize, lock, queryInt, queryInt
-
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.dao.api.OnmsDao
clear, countAll, countMatching, delete, delete, findAll, findMatching, flush, get, initialize, load, lock, save, saveOrUpdate, update
-
-
-
-
Method Detail
-
findByName
public OnmsCategory findByName(java.lang.String name)
findByName
- Specified by:
findByName
in interfaceCategoryDao
- Parameters:
name
- aString
object.- Returns:
- a
OnmsCategory
object.
-
findByName
public OnmsCategory findByName(java.lang.String name, boolean useCached)
findByName
- Specified by:
findByName
in interfaceCategoryDao
- Parameters:
name
- aString
object.useCached
- a boolean.- Returns:
- a
OnmsCategory
object.
-
getKey
protected java.lang.String getKey(OnmsCategory category)
getKey
- Specified by:
getKey
in classAbstractCachingDaoHibernate<OnmsCategory,java.lang.Integer,java.lang.String>
- Parameters:
category
- a T object.- Returns:
- a CacheKey object.
-
getAllCategoryNames
public java.util.List<java.lang.String> getAllCategoryNames()
getAllCategoryNames
- Specified by:
getAllCategoryNames
in interfaceCategoryDao
- Returns:
- a
List
object.
-
getCriterionForCategorySetsUnion
public java.util.List<org.hibernate.criterion.Criterion> getCriterionForCategorySetsUnion(java.lang.String[]... categories)
getCriterionForCategorySetsUnion
- Specified by:
getCriterionForCategorySetsUnion
in interfaceCategoryDao
- Parameters:
categories
- an array ofString
objects.- Returns:
- a
List
object.
-
getCategoriesWithAuthorizedGroup
public java.util.List<OnmsCategory> getCategoriesWithAuthorizedGroup(java.lang.String groupName)
getCategoriesWithAuthorizedGroup
- Specified by:
getCategoriesWithAuthorizedGroup
in interfaceCategoryDao
- Parameters:
groupName
- aString
object.- Returns:
- a
List
object.
-
-