/** * Retrieve * * @param gameModelId * @return static "Finished" string... */ @GET @Path("Encode/{gameModelId : ([1-9][0-9]*)}") public String encode(@PathParam("gameModelId") Long gameModelId) { List<VariableDescriptor> findAll = descriptorFacade.findByGameModelId(gameModelId); for (VariableDescriptor vd : findAll) { List<String> findDistinctNames = descriptorFacade.findDistinctNames(vd.getGameModel()); List<String> findDistinctLabels = descriptorFacade.findDistinctLabels(vd.getGameModel()); findDistinctNames.remove(vd.getName()); findDistinctLabels.remove(vd.getLabel()); Helper.setUniqueName(vd, findDistinctNames); Helper.setUniqueLabel(vd, findDistinctLabels); descriptorFacade.flush(); } return "Finished"; }
public RoleFacade roleFacade() throws NamingException { return Helper.lookupBy(RoleFacade.class); }
/** @return @throws NamingException */ public AccountFacade accountFacade() throws NamingException { return Helper.lookupBy(AccountFacade.class); }