/** {@inheritDoc} */ @Override public Amendment create(final PropertyMap properties, final UserExecutionContext context) { final String name = properties.get("name"); final Integer projectId = properties.get("projectId"); final Project project = projectDAO.findById(projectId); return createAmendment(project, name); }
/** {@inheritDoc} */ @Override @Transactional public Amendment update( final Integer entityId, final PropertyMap changes, final UserExecutionContext context) { Amendment amendment = amendmentDAO.findById(entityId); amendment.setName((String) changes.get("name")); em().persist(amendment); em().flush(); return amendment; }