Package com.logicaldoc.ai
Class HibernateAIModelDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<AIModel>
com.logicaldoc.ai.HibernateAIModelDAO
- All Implemented Interfaces:
AIModelDAO,com.logicaldoc.core.PersistentObjectDAO<AIModel>
@Component("aiModelDAO")
public class HibernateAIModelDAO
extends com.logicaldoc.core.HibernatePersistentObjectDAO<AIModel>
implements AIModelDAO
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 IDRetrieves the model by the given namevoidinitialize(AIModel model) voidvoidstoreModel(AIModel model) Saves the model using the right concrete DAOMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, deleteAll, evict, evict, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findIdsByWhere, getDatabaseMetadata, jdbcUpdate, jdbcUpdate, 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, isMariaDB, 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- 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- Parameters:
modelId- identifier of the model- Returns:
- the model
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
getModel
Description copied from interface:AIModelDAORetrieves the model by the given name- Specified by:
getModelin interfaceAIModelDAO- Parameters:
name- name of the modeltenantId- identifier of the tenant- Returns:
- the model
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findByName
public AIModel findByName(String name, long tenantId) throws com.logicaldoc.core.PersistenceException Description copied from interface:AIModelDAOFinds the model by it's name- Specified by:
findByNamein interfaceAIModelDAO- 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- 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- Parameters:
model- the model to be saved- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
initialize
-