}
resource.setName(resourceTO.getName());
if (resourceTO.getConnectorId() != null) {
ConnInstance connector = connInstanceDAO.find(resourceTO.getConnectorId());
resource.setConnector(connector);
if (!connector.getResources().contains(resource)) {
connector.addResource(resource);
}
}
resource.setForceMandatoryConstraint(resourceTO.isForceMandatoryConstraint());