    001package com.hammurapi.store.local;
    002
    003import java.util.Map;
    004
    005import com.hammurapi.extract.Extractor;
    006import com.hammurapi.extract.Predicate;
    007import com.hammurapi.store.Store;
    008
    009/**
    010 * Handle factory allows to configure LocalStore store to use custom handles which
    011 * carry additional information about store entries.
    012 * @author Pavel Vlasov
    013 *
    014 * @param <T>
    015 * @param <PK>
    016 * @param <H>
    017 */
    018public interface HandleFactory<T, PK, S extends Store<T,PK,S>, H extends LocalHandle<T,PK,S>> {
    019
    020        H createHandle(
    021                        S store,
    022                        T obj,
    023                        PK primaryKey,
    024                        Map<S, Map<Extractor<T, ? super PK, S>, ? super PK>> cache,
    025                        Predicate<T, S>[] validators,
    026                        LocalHandle.HandleStrength handleStrength,
    027                        boolean cacheExtracted);
    028
    029}