Package com.logicaldoc.ai
Interface AIModelDAO
- All Superinterfaces:
com.logicaldoc.core.PersistentObjectDAO<AIModel>
- All Known Implementing Classes:
HibernateAIModelDAO
This interface is a DAO-service for
AIModels.- Version:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsName(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 namestatic AIModelDAOget()Gets the object available in the application contextgetModel(long modelId) Retrieves the model by the given IDRetrieves the model by the given namevoidstoreModel(AIModel model) Saves the model using the right concrete DAOMethods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, initialize, isMariaDB, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
-
Method Details
-
get
Gets the object available in the application context- Returns:
- the instance of this object in the application context
-
findByName
Finds the model by it's name- Parameters:
name- The nametenantId- Identifier of the tenant- Returns:
- The found model
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
existsName
Checks the existence of a model name- Parameters:
name- The nametenantId- Identifier of the tenant- Returns:
- true if the name exists
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findAllModels
Find all the models- 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
-
getModel
Retrieves the model by the given ID- Parameters:
modelId- identifier of the model- Returns:
- the model
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
getModel
Retrieves the model by the given name- Parameters:
name- name of the modeltenantId- identifier of the tenant- Returns:
- the model
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
storeModel
Saves the model using the right concrete DAO- Parameters:
model- the model to be saved- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-