com.anasoft.os.daofusion
Class AbstractHibernateEnumerationDao<T extends PersistentEnumeration>
java.lang.Object
com.anasoft.os.daofusion.BaseHibernateDataAccessor
com.anasoft.os.daofusion.AbstractHibernateEntityDao<T,java.lang.Long>
com.anasoft.os.daofusion.AbstractHibernateEnumerationDao<T>
- Type Parameters:
T
- Type of the persistent enumeration the DAO works with.
- All Implemented Interfaces:
- PersistentEntityDao<T,java.lang.Long>, PersistentEnumerationDao<T>
public abstract class AbstractHibernateEnumerationDao<T extends PersistentEnumeration>
- extends AbstractHibernateEntityDao<T,java.lang.Long>
- implements PersistentEnumerationDao<T>
Generic persistent enumeration DAO implementation using JPA / Hibernate
persistence APIs.
- Author:
- vojtech.szocs
- See Also:
PersistentEnumerationDao
,
AbstractHibernateEntityDao
Method Summary |
T |
getByName(java.lang.String name)
Retrieves a persistent enumeration by its name,
using the implicit persistent entity class. |
|
getByName(java.lang.String name,
java.lang.Class<S> targetEntityClass)
Retrieves a persistent enumeration by its name. |
<S extends T>
java.util.List<S> |
|
getByNames(java.lang.Class<S> targetEntityClass,
java.lang.String... names)
Retrieves a list of persistent enumerations by their
name values. |
java.util.List<T> |
getByNames(java.lang.String... names)
Retrieves a list of persistent enumerations by their
name values, using the implicit persistent
entity class. |
Methods inherited from class com.anasoft.os.daofusion.AbstractHibernateEntityDao |
count, count, countAll, countAll, delete, delete, delete, deleteAll, deleteAll, get, get, getAll, getAll, query, query, refresh, saveOrUpdate, uniqueResult, uniqueResult |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.anasoft.os.daofusion.PersistentEntityDao |
count, count, countAll, countAll, delete, delete, delete, deleteAll, deleteAll, get, get, getAll, getAll, getEntityClass, query, query, refresh, saveOrUpdate, uniqueResult, uniqueResult |
AbstractHibernateEnumerationDao
public AbstractHibernateEnumerationDao()
getByName
public <S extends T> S getByName(java.lang.String name,
java.lang.Class<S> targetEntityClass)
- Description copied from interface:
PersistentEnumerationDao
- Retrieves a persistent enumeration by its name.
- Specified by:
getByName
in interface PersistentEnumerationDao<T extends PersistentEnumeration>
- Parameters:
name
- name of the persistent enumeration to retrieve.targetEntityClass
- Target persistent entity class.
- Returns:
- Resulting persistent instance or null
in case the requested instance was not found.
- See Also:
PersistentEnumerationDao.getByName(java.lang.String, java.lang.Class)
getByName
public T getByName(java.lang.String name)
- Description copied from interface:
PersistentEnumerationDao
- Retrieves a persistent enumeration by its name,
using the implicit persistent entity class.
- Specified by:
getByName
in interface PersistentEnumerationDao<T extends PersistentEnumeration>
- Parameters:
name
- name of the persistent enumeration to retrieve.
- Returns:
- Resulting persistent instance or null
in case the requested instance was not found.
- See Also:
PersistentEnumerationDao.getByName(java.lang.String)
getByNames
public <S extends T> java.util.List<S> getByNames(java.lang.Class<S> targetEntityClass,
java.lang.String... names)
- Description copied from interface:
PersistentEnumerationDao
- Retrieves a list of persistent enumerations by their
name values.
- Specified by:
getByNames
in interface PersistentEnumerationDao<T extends PersistentEnumeration>
- Parameters:
targetEntityClass
- Target persistent entity class.names
- name values of persistent enumerations
to retrieve.
- Returns:
- Resulting list of persistent instances.
- See Also:
PersistentEnumerationDao.getByNames(java.lang.Class, java.lang.String[])
getByNames
public java.util.List<T> getByNames(java.lang.String... names)
- Description copied from interface:
PersistentEnumerationDao
- Retrieves a list of persistent enumerations by their
name values, using the implicit persistent
entity class.
- Specified by:
getByNames
in interface PersistentEnumerationDao<T extends PersistentEnumeration>
- Parameters:
names
- name values of persistent enumerations
to retrieve.
- Returns:
- Resulting list of persistent instances.
- See Also:
PersistentEnumerationDao.getByNames(java.lang.String[])
Copyright © 2008-2009 ANASOFT and contributors. All Rights Reserved.