}
public void addHresPerformsRole(String resourceID, String selectrole) throws YPersistenceException {
Resource resource = getResource(resourceID);
if (resource == null) {
throw new YPersistenceException(
binaryRelationFKMissingMsg.format(new String[]{"resource", resourceID, "role"}));
}
Role role = getRole(selectrole);
if (role == null) {
throw new YPersistenceException(
binaryRelationFKMissingMsg.format(new String[]{"role", selectrole, "resource"}));
}
HumanResourceRole hResRole = new HumanResourceRole();
hResRole.setHumanResource(resource);
hResRole.setRole(role);