Interface AIModelDAO

All Superinterfaces:
com.logicaldoc.core.PersistentObjectDAO<AIModel>
All Known Implementing Classes:
HibernateAIModelDAO

public interface AIModelDAO extends com.logicaldoc.core.PersistentObjectDAO<AIModel>
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 Type
    Method
    Description
    boolean
    existsName(String name, long tenantId)
    Checks the existence of a model name
    findAllModels(Long tenantId)
    Find all the models
    findByName(String name, long tenantId)
    Finds the model by it's name
    static AIModelDAO
    get()
    Gets the object available in the application context
    getModel(long modelId)
    Retrieves the model by the given ID
    getModel(String name, long tenantId)
    Retrieves the model by the given name
    void
    Saves the model using the right concrete DAO

    Methods 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

      static AIModelDAO get()
      Gets the object available in the application context
      Returns:
      the instance of this object in the application context
    • findByName

      AIModel findByName(String name, long tenantId) throws com.logicaldoc.core.PersistenceException
      Finds the model by it's name
      Parameters:
      name - The name
      tenantId - Identifier of the tenant
      Returns:
      The found model
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • existsName

      boolean existsName(String name, long tenantId) throws com.logicaldoc.core.PersistenceException
      Checks the existence of a model name
      Parameters:
      name - The name
      tenantId - Identifier of the tenant
      Returns:
      true if the name exists
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • findAllModels

      List<AIModel> findAllModels(Long tenantId) throws com.logicaldoc.core.PersistenceException
      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

      AIModel getModel(long modelId) throws com.logicaldoc.core.PersistenceException
      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

      AIModel getModel(String name, long tenantId) throws com.logicaldoc.core.PersistenceException
      Retrieves the model by the given name
      Parameters:
      name - name of the model
      tenantId - identifier of the tenant
      Returns:
      the model
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database
    • storeModel

      void storeModel(AIModel model) throws com.logicaldoc.core.PersistenceException
      Saves the model using the right concrete DAO
      Parameters:
      model - the model to be saved
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the database