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 aAIModelthis 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 AIModels- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(long id, int code) booleanexistsName(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 namevoidvoidstoreModel(AIModel<?, ?> model) Saves the model using the right concrete DAOMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, evict, evict, 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, queryForString, setSessionFactoryMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, deleteAll, deleteAll, evict, evict, 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, queryForString
-
Method Details
-
store
-
existsName
public boolean existsName(String name, long tenantId) throws com.logicaldoc.core.PersistenceException Description copied from interface:AIModelDAOChecks the existence of a model name- Specified by:
existsNamein 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:AIModelDAORetrieves the model by the given ID- Specified by:
getModelin 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:AIModelDAORetrieves the model by the given name- Specified by:
getModelin 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:AIModelDAOFinds the model by it's name- Specified by:
findByNamein 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:AIModelDAOFind all the models- Specified by:
findAllModelsin 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 -
storeModel
Description copied from interface:AIModelDAOSaves the model using the right concrete DAO- Specified by:
storeModelin interfaceAIModelDAO<T extends AIModel<?,?>> - Parameters:
model- the model to be saved- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-