Package com.logicaldoc.ai
Class HibernateAIModelHistoryDAO
java.lang.Object
com.logicaldoc.core.HibernatePersistentObjectDAO<AIModelHistory>
com.logicaldoc.core.history.HibernateHistoryDAO<AIModelHistory>
com.logicaldoc.ai.HibernateAIModelHistoryDAO
- All Implemented Interfaces:
AIModelHistoryDAO,com.logicaldoc.core.PersistentObjectDAO<AIModelHistory>
@Repository("aiModelHistoryDAO")
public class HibernateAIModelHistoryDAO
extends com.logicaldoc.core.history.HibernateHistoryDAO<AIModelHistory>
implements AIModelHistoryDAO
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanOldHistories(int ttl) This method deletes all the AI history entries oldest than the given days from now.findByModelId(long modelId) This method selects all histories of a given model.Methods inherited from class com.logicaldoc.core.history.HibernateHistoryDAO
storeMethods inherited from class com.logicaldoc.core.HibernatePersistentObjectDAO
bulkUpdate, delete, 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.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, isMySQL, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store
-
Method Details
-
findByModelId
public List<AIModelHistory> findByModelId(long modelId) throws com.logicaldoc.core.PersistenceException Description copied from interface:AIModelHistoryDAOThis method selects all histories of a given model.- Specified by:
findByModelIdin interfaceAIModelHistoryDAO- Parameters:
modelId- identifier of the model- Returns:
- list of histories ordered by date asc
- Throws:
com.logicaldoc.core.PersistenceException- Error in the database
-
cleanOldHistories
public void cleanOldHistories(int ttl) Description copied from interface:AIModelHistoryDAOThis method deletes all the AI history entries oldest than the given days from now. Ifttlis 0 or -1, the cancellation is not made.- Specified by:
cleanOldHistoriesin interfaceAIModelHistoryDAO- Parameters:
ttl- The maximum number of days over which the history is considered old
-