public void deleteConnection(final long connectionId) {
doWithConnection(new DoWithConnection() {
@Override
public Object doIt(Connection conn) {
if(!handler.existsConnection(connectionId, conn)) {
throw new SqoopException(RepositoryError.JDBCREPO_0017,
"Invalid id: " + connectionId);
}
if(handler.inUseConnection(connectionId, conn)) {
throw new SqoopException(RepositoryError.JDBCREPO_0021,
"Id in use: " + connectionId);
}
handler.deleteConnection(connectionId, conn);
return null;