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 a- AIModelthis 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 SummaryFields inherited from interface com.logicaldoc.core.PersistentObjectDAOENTITY
- 
Method SummaryModifier 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.HibernatePersistentObjectDAObulkUpdate, 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.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.PersistentObjectDAObulkUpdate, 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
- 
existsNamepublic 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 interface- AIModelDAO<T extends AIModel<?,- ?>> 
- Parameters:
- name- The name
- tenantId- Identifier of the tenant
- Returns:
- true if the name exists
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
getModelDescription copied from interface:AIModelDAORetrieves the model by the given ID- Specified by:
- getModelin interface- AIModelDAO<T extends AIModel<?,- ?>> 
- Parameters:
- modelId- identifier of the model
- Returns:
- the model
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
getModelpublic 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 interface- AIModelDAO<T extends AIModel<?,- ?>> 
- Parameters:
- name- name of the model
- tenantId- identifier of the tenant
- Returns:
- the model
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
findByNameDescription copied from interface:AIModelDAOFinds the model by it's name- Specified by:
- findByNamein interface- AIModelDAO<T extends AIModel<?,- ?>> 
- Parameters:
- name- The name
- tenantId- Identifier of the tenant
- Returns:
- The found model
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
- 
findAllModelsDescription copied from interface:AIModelDAOFind all the models- Specified by:
- findAllModelsin interface- AIModelDAO<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
 
- 
deletepublic void delete(long id, int code) throws com.logicaldoc.core.PersistenceException 
- 
storeModelDescription copied from interface:AIModelDAOSaves the model using the right concrete DAO- Specified by:
- storeModelin interface- AIModelDAO<T extends AIModel<?,- ?>> 
- Parameters:
- model- the model to be saved
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the database
 
 
-