Package com.logicaldoc.ai
Class HibernateAIModelDAO<T extends AIModel<?,?>>
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<T>
com.logicaldoc.ai.HibernateAIModelDAO<T>
- Type Parameters:
T
- Class of the implementation of aAIModel
this DAO handles
- All Implemented Interfaces:
AIModelDAO<T>
,com.logicaldoc.core.PersistentObjectDAO<T>
- Direct Known Subclasses:
HibernateClassifierDAO
,HibernateNeuralNetworkDAO
,HibernateTokensDetectorDAO
public abstract class HibernateAIModelDAO<T extends AIModel<?,?>>
extends com.logicaldoc.core.HibernatePersistentObjectDAO<T>
implements AIModelDAO<T>
Hibernate abstract implementation of
AIModelDAO
to be extended by
concrete implementation of DAOs that handle AIModel
s- 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) boolean
existsName
(String name, long tenantId) Checks the existence of a model namefindAllModels
(Long tenantId) Find all the modelsfindByName
(String name, long tenantId) Finds the model by it's namegetModel
(long modelId) Retrieves the model by the given IDAIModel
<?, ?> Retrieves the model by the given namevoid
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, initialize, 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, initialize, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString
-
Method Details
-
store
-
existsName
public boolean existsName(String name, long tenantId) throws com.logicaldoc.core.PersistenceException Description copied from interface:AIModelDAO
Checks the existence of a model name- Specified by:
existsName
in interfaceAIModelDAO<T extends AIModel<?,
?>> - Parameters:
name
- The nametenantId
- Identifier of the tenant- Returns:
- true if the name exists
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-
getModel
Description copied from interface:AIModelDAO
Retrieves the model by the given ID- Specified by:
getModel
in interfaceAIModelDAO<T extends AIModel<?,
?>> - Parameters:
modelId
- identifier of the model- Returns:
- the model
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-
getModel
public AIModel<?,?> getModel(String name, long tenantId) throws com.logicaldoc.core.PersistenceException Description copied from interface:AIModelDAO
Retrieves the model by the given name- Specified by:
getModel
in interfaceAIModelDAO<T extends AIModel<?,
?>> - Parameters:
name
- name of the modeltenantId
- identifier of the tenant- Returns:
- the model
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-
findByName
Description copied from interface:AIModelDAO
Finds the model by it's name- Specified by:
findByName
in interfaceAIModelDAO<T extends AIModel<?,
?>> - Parameters:
name
- The nametenantId
- Identifier of the tenant- Returns:
- The found model
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-
findAllModels
Description copied from interface:AIModelDAO
Find all the models- Specified by:
findAllModels
in interfaceAIModelDAO<T extends AIModel<?,
?>> - Parameters:
tenantId
- optional identifier of the tenant to restrict the search to- Returns:
- List of models ordered by name
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the database
-
delete
public void delete(long id, int code) throws com.logicaldoc.core.PersistenceException
-