@Override public <T> T doReturningWork(final ReturningWork<T> work) throws HibernateException { WorkExecutorVisitable<T> realWork = new WorkExecutorVisitable<T>() { @Override public T accept(WorkExecutor<T> workExecutor, Connection connection) throws SQLException { return workExecutor.executeReturningWork( work, connection ); } }; return doWork( realWork ); }
@Override public void doWork(final Work work) throws HibernateException { WorkExecutorVisitable<Void> realWork = new WorkExecutorVisitable<Void>() { @Override public Void accept(WorkExecutor<Void> workExecutor, Connection connection) throws SQLException { workExecutor.executeWork( work, connection ); return null; } }; doWork( realWork ); }
@Override public void doWork(final Work work) throws HibernateException { WorkExecutorVisitable<Void> realWork = new WorkExecutorVisitable<Void>() { @Override public Void accept(WorkExecutor<Void> workExecutor, Connection connection) throws SQLException { workExecutor.executeWork( work, connection ); return null; } }; doWork( realWork ); }
public void doWork(final Work work) throws HibernateException { WorkExecutorVisitable<Void> realWork = new WorkExecutorVisitable<Void>() { @Override public Void accept(WorkExecutor<Void> workExecutor, Connection connection) throws SQLException { workExecutor.executeWork( work, connection ); return null; } }; doWork( realWork ); }
public <T> T doReturningWork(final ReturningWork<T> work) throws HibernateException { WorkExecutorVisitable<T> realWork = new WorkExecutorVisitable<T>() { @Override public T accept(WorkExecutor<T> workExecutor, Connection connection) throws SQLException { return workExecutor.executeReturningWork( work, connection ); } }; return doWork( realWork ); }
@Override public <T> T doReturningWork(final ReturningWork<T> work) throws HibernateException { WorkExecutorVisitable<T> realWork = new WorkExecutorVisitable<T>() { @Override public T accept(WorkExecutor<T> workExecutor, Connection connection) throws SQLException { return workExecutor.executeReturningWork( work, connection ); } }; return doWork( realWork ); }
public void doWork(final Work work) throws HibernateException { WorkExecutorVisitable<Void> realWork = new WorkExecutorVisitable<Void>() { @Override public Void accept(WorkExecutor<Void> workExecutor, Connection connection) throws SQLException { workExecutor.executeWork( work, connection ); return null; } }; doWork( realWork ); }
public <T> T doReturningWork(final ReturningWork<T> work) throws HibernateException { WorkExecutorVisitable<T> realWork = new WorkExecutorVisitable<T>() { @Override public T accept(WorkExecutor<T> workExecutor, Connection connection) throws SQLException { return workExecutor.executeReturningWork( work, connection ); } }; return doWork( realWork ); }
@Override public boolean runWithConnection() { Object delegate = entityManager.getDelegate(); if (delegate instanceof SessionImpl) { SessionImpl session = (SessionImpl) delegate; if(!cleaner.isUnsatisfied()) { session.doWork(new org.hibernate.jdbc.Work() { @Override public void execute(Connection connection) throws SQLException { cleaner.get().run(connection); } }); } return true; } else { return false; } } }