if (target == null) {
throw new IllegalStateException("Property 'target' is required");
}
ProxyFactory proxyFactory = new ProxyFactory();
proxyFactory.addAdvisor(new CachingModelSourceAdvisor(cachingInterceptor));
if (hasFlushingModels) {
proxyFactory.addAdvisor(new FlushingModelSourceAdvisor(
flushingInterceptor));
}