Added implementation of batch, exists, and each.

Also tests for DerbyAdaptor.