Package com.logicaldoc.ai.sampler
Class HibernateSamplerDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<Sampler>
com.logicaldoc.ai.sampler.HibernateSamplerDAO
- All Implemented Interfaces:
SamplerDAO
,com.logicaldoc.core.PersistentObjectDAO<Sampler>
public class HibernateSamplerDAO
extends com.logicaldoc.core.HibernatePersistentObjectDAO<Sampler>
implements SamplerDAO
Hibernate implementation of
SamplerDAO
- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(long id, int code) findByName
(String name, long tenantId) Finds the sampler by it's namefindByType
(Class<S> type, long tenantId) Finds the samplers by typevoid
initialize
(Sampler entity) void
Methods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, getSessionFactory, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, setSessionFactory
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString
-
Method Details
-
findByName
public Sampler findByName(String name, long tenantId) throws com.logicaldoc.core.PersistenceException Description copied from interface:SamplerDAO
Finds the sampler by it's name- Specified by:
findByName
in interfaceSamplerDAO
- Parameters:
name
- The nametenantId
- Identifier of the tenant- Returns:
- The found sampler
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-
initialize
-
store
-
delete
public void delete(long id, int code) throws com.logicaldoc.core.PersistenceException -
findByType
public <S extends Sampler> List<S> findByType(Class<S> type, long tenantId) throws com.logicaldoc.core.PersistenceException Description copied from interface:SamplerDAO
Finds the samplers by type- Specified by:
findByType
in interfaceSamplerDAO
- Type Parameters:
S
- what sampler type to retrieve- Parameters:
type
- Type of samplertenantId
- Identifier of the tenant- Returns:
- The list of samplers of same type ordered by name
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-