@@ -0,0 +1,1406 @@
+package com.kiselev.dataframework.repository.factory;%0A%0Aimport com.kiselev.dataframework.repository.entity.QueryEntity;%0Aimport com.kiselev.dataframework.repository.generator.QueryGeneratorFactory;%0Aimport com.kiselev.dataframework.repository.generator.api.QueryGenerator;%0Aimport com.kiselev.dataframework.repository.util.QueryHandlerUtil;%0A%0Aimport java.lang.reflect.InvocationHandler;%0Aimport java.lang.reflect.Method;%0Aimport java.lang.reflect.Proxy;%0Aimport java.lang.reflect.Type;%0A%0A/**%0A * @author Vadim Kiselev%0A * @version 1.0%0A * @since 02/11/2017%0A */%0A%0Apublic class RepositoryFactory %7B%0A%0A    public static %3CRepository%3E Repository implement(final Class%3CRepository%3E repository) %7B%0A        return repository.cast(Proxy.newProxyInstance(%0A                repository.getClassLoader(),%0A                new Class%3C?%3E%5B%5D%7Brepository%7D,%0A                new InvocationHandler() %7B%0A                    @Override%0A                    public Object invoke(Object proxy, Method method, Object%5B%5D arguments) throws Throwable %7B%0A                        Type returnClass = method.getGenericReturnType();%0A%0A                        QueryGenerator generator = QueryGeneratorFactory.determineGenerator(method, arguments);%0A                        QueryEntity queryEntity = generator.generate();%0A%0A                        return QueryHandlerUtil.handleQuery(queryEntity, returnClass);%0A                    %7D%0A                %7D%0A        ));%0A    %7D%0A%7D%0A

Create RepositoryFactory. The service, which dynamically implements client's interface via Dynamic Proxy