Package com.logicaldoc.ai.embedding
Interface EmbeddingSchemeDAO
- All Superinterfaces:
com.logicaldoc.core.PersistentObjectDAO<EmbeddingScheme>
- All Known Implementing Classes:
HibernateEmbeddingSchemeDAO
public interface EmbeddingSchemeDAO
extends com.logicaldoc.core.PersistentObjectDAO<EmbeddingScheme>
DAO-service for
EmbeddingSchemes- Since:
- 9.2.2
- Author:
- Giuseppe Desiato - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Method Summary
Modifier and TypeMethodDescriptionfindAllEnabled(long tenantId) Finds all enabled schemes (ld_enabled = 1) for the given tenant, excluding deleted ones.findByModel(String embeddingModel, long tenantId) Finds schemes that reference an external model name.findByModelId(Long modelId, long tenantId) Finds schemes that reference an internal model id.findByName(String name, long tenantId) Finds a scheme by name.<S extends EmbeddingScheme>
List<S> findByType(Class<S> type, long tenantId) Finds the embedding scheme by type.static EmbeddingSchemeDAOget()Gets the object available in the application contextMethods 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
EmbeddingScheme findByName(String name, long tenantId) throws com.logicaldoc.core.PersistenceException Finds a scheme by name.- Parameters:
name- Scheme nametenantId- Tenant identifier- Returns:
- The found scheme
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findByType
<S extends EmbeddingScheme> List<S> findByType(Class<S> type, long tenantId) throws com.logicaldoc.core.PersistenceException Finds the embedding scheme by type.- Type Parameters:
S- concrete scheme type- Parameters:
type- Type of embedding schemetenantId- Tenant identifier- Returns:
- The list of schemes of same type ordered by name
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findByModelId
List<EmbeddingScheme> findByModelId(Long modelId, long tenantId) throws com.logicaldoc.core.PersistenceException Finds schemes that reference an internal model id.- Parameters:
modelId- Model IdentifiertenantId- Tenant identifier- Returns:
- The list of schemes ordered by name
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findByModel
List<EmbeddingScheme> findByModel(String embeddingModel, long tenantId) throws com.logicaldoc.core.PersistenceException Finds schemes that reference an external model name.- Parameters:
embeddingModel- The Embedding Model nametenantId- Tenant identifier- Returns:
- The list of schemes ordered by name
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
findAllEnabled
Finds all enabled schemes (ld_enabled = 1) for the given tenant, excluding deleted ones.- Parameters:
tenantId- Tenant identifier- Returns:
- The list of enabled schemes ordered by name
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-