final Long build = Long.valueOf(buildStr);
final Integer issue = Integer.valueOf(issueStr);
Utils.processPersistable(new Persistable.Transaction() {
public TransactionResult runQuery(EntityManager em) throws Exception {
IssueBuild ib = em.find(IssueBuild.class, issue);
if (ib != null){
ib.setBuildNumber(build);
em.merge(ib);
}else{
ib = new IssueBuild(issue, build);
em.persist(ib);
}
return TransactionResult.COMMIT;
}
});