public boolean isUniqueConnectorNameConstraint() {
if (StringUtils.isBlank(name)) {
return true;
}
IConnectorDAO connectorDAO = Registry.getConnectorDAO();
if (isNewObject()) {
return !connectorDAO.existsByNameAnotherTransaction(this);
} else {
Connector found = connectorDAO
.findUniqueByNameAnotherTransaction(name);
return found == null || found.getId().equals(getId());
}
}