
ru.saidgajiev.ormnext.cache.SelectStatementCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ormnext-cache Show documentation
Show all versions of ormnext-cache Show documentation
Library which contains implementations Ormnext cache
The newest version!
package ru.saidgajiev.ormnext.cache;
import ru.saidgadjiev.ormnext.core.dao.DatabaseEngine;
import ru.saidgadjiev.ormnext.core.query.criteria.impl.SelectStatement;
import ru.saidgadjiev.ormnext.core.table.internal.metamodel.MetaModel;
import ru.saidgajiev.ormnext.cache.commons.DigestHelper;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Select statement cache.
*
* @author Said Gadjiev
*/
public class SelectStatementCache {
/**
* Select statement list results cache.
*/
private final Map, Map>> listCache = new ConcurrentHashMap<>();
/**
* Limited select statement cache.
*/
private final Map, Map>> limitedListCache = new ConcurrentHashMap<>();
/**
* Long results cache.
*/
private final Map, Map> longCache = new ConcurrentHashMap<>();
/**
* Digest helper.
*/
private final DigestHelper digestHelper;
/**
* Create a new instance.
*
* @param metaModel target meta model
* @param databaseEngine target database engine
*/
SelectStatementCache(MetaModel metaModel, DatabaseEngine> databaseEngine) {
digestHelper = new DigestHelper(metaModel, databaseEngine);
}
/**
* Put list result object ids to cache.
*
* @param selectStatement target select statement
* @param resultObjectIds target result object ids.
*/
public void putList(SelectStatement> selectStatement, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy