public boolean subscribeUser(BasicUser user, com.ccc.oauth.apimanagement.model.Service service) { Subscribed sub = new Subscribed(); sub.setService(service); sub.setUserName(user.getUsername()); return subscribedManager.saveE(sub); }
public List<Subscribed> servicesForUser(BasicUser user) { String userName = user.getUsername(); List<Subscribed> subscribed = subscribedManager.elementsWithValue("user_name", userName); return subscribed; }