@Override public Application convert(ApplicationJson source) { Application application = new Application(); application.setName(source.getName()); application.setProvider(source.getProvider()); application.setEnabled(Boolean.valueOf(source.getEnabled())); return application; }
@Override public ApplicationJson convert(Application application) { ApplicationJson json = new ApplicationJson(); json.setId(application.getId()); json.setName(application.getName()); json.setProvider(application.getProvider()); json.setEnabled(application.getEnabled()); json.setState(application.getState()); return json; }
public Application update(Application application, ApplicationJson json) { application.setProvider(json.getProvider()); application.setName(json.getName()); application.setEnabled(Boolean.valueOf(json.getEnabled())); return application; }