3334353637383940414243
DomainList response = new DomainList(); response.domains = Lists.newArrayList(); for (DomainData data : identityService.listDomains(user)) { Domain domain = toModel(data); response.domains.add(domain); } return response; }
5455565758596061626364
response.domain = toModel(data); return response; } private Domain toModel(DomainData data) { Domain model = new Domain(); model.id = "" + data.getId(); model.name = data.getName(); model.description = data.getDescription();
163164165166167168169170171172
model.domain = toModel(domain); return model; } private Domain toModel(DomainData domain) { Domain model = new Domain(); model.id = Long.toString(domain.getId()); model.name = domain.getName(); return model; }