@SuppressWarnings("unchecked")
    public static <T> T create(Class<T> clazz, final TransactionalLink<T> transactionalLink) {
        try {
            ProxyFactory factory = new ProxyFactory();
            factory.setSuperclass(clazz);
            factory.setInterfaces(new Class<?>[]{IgnoreAutoCloseable.class});
            factory.setFilter(method -> !method.getDeclaringClass().equals(Object.class));
            return (T) factory.create(new Class<?>[0], new Object[0], new TransactionalClassProxy<>(transactionalLink));
        } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {
            throw SeedException.wrap(e, TransactionErrorCode.UNABLE_TO_CREATE_TRANSACTIONAL_PROXY).put("class",
                    clazz.getName());
        }
    }
@ SuppressWarnings ( "unchecked" ) public static < T > T create ( Class < T > clazz , final TransactionalLink < T > transactionalLink ) { try { ProxyFactory factory = new ProxyFactory ( ) ; factory . setSuperclass ( clazz ) ; factory . setInterfaces ( new Class < ? > [ ] { IgnoreAutoCloseable . class } ) ; factory . setFilter ( method -> ! method . getDeclaringClass ( ) . equals ( Object . class ) ) ; return ( T ) factory . create ( new Class < ? > [ 0 ] , new Object [ 0 ] , new TransactionalClassProxy < > ( transactionalLink ) ) ; } catch ( NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e ) { throw SeedException . wrap ( e , TransactionErrorCode . UNABLE_TO_CREATE_TRANSACTIONAL_PROXY ) . put ( "class" , clazz . getName ( ) ) ; } }
Create a transactional proxy around the provided {@link TransactionalLink}.

@param <T>               the interface used to create the proxy.
@param clazz             the class representing the transacted resource.
@param transactionalLink the link to access the instance of the transacted resource.
@return the proxy.