private UUID mapOwner(String owntype, int val) throws SQLException { if (owntype.equals("e")) { EPerson per = epersonService.findByLegacyId(context, val); return per == null ? null : per.getID(); } else if (owntype.equals("g")) { Group perg = groupService.findByLegacyId(context, val); return perg == null ? null : perg.getID(); } return null; }