persistence/play-java-jdbc/src/main/java/play/db/DefaultDatabase.java
AbstractFunction1<Connection, BoxedUnit> connectionFunction(final ConnectionRunnable block) {
    return new AbstractFunction1<Connection, BoxedUnit>() {
      public BoxedUnit apply(Connection connection) {
        try {
          block.run(connection);
          return BoxedUnit.UNIT;
        } catch (java.sql.SQLException e) {
          throw new RuntimeException("Connection runnable failed", e);
        }
      }
    };
  }
AbstractFunction1<Connection, BoxedUnit> connectionFunction(final ConnectionRunnable block) {
    return new AbstractFunction1<Connection, BoxedUnit>() {
      public BoxedUnit apply(Connection connection) {
        try {
          block.run(connection);
          return BoxedUnit.UNIT;
        } catch (java.sql.SQLException e) {
          throw new RuntimeException("Connection runnable failed", e);
        }
      }
    };
  }
Create a Scala function wrapper for ConnectionRunnable.

@param block a Java functional interface instance to wrap
@return a scala function that wraps the given block