}
BatchQueryResponse response = client.batchExecute(query);
String error = response.getError();
if (error != null) {
if (error.contains(INTEGRITY_ERROR_MSG)) {
throw new IntegrityException(error);
}
throw new DatabaseException(response.getError());
}
if (response.getSession() != null) {
session = response.getSession();