Examples of SerializablePerson


Examples of ch.bsgroup.scrumit.pojo.SerializablePerson

  public @ResponseBody List<SerializablePerson> getAllPersonsOfProject(@PathVariable int projectid) {
    Set<Person> persons = this.personService.getAllPersonsByProjectId(projectid);
    List<SerializablePerson> serializedPersons = new ArrayList<SerializablePerson>();
    for (Iterator<Person> iterator = persons.iterator(); iterator.hasNext();) {
      Person p = iterator.next();
      SerializablePerson sp = new SerializablePerson(p.getId(), p.getFirstName(), p.getLastName());
      serializedPersons.add(sp);
    }
    return serializedPersons;
  }
View Full Code Here

Examples of ch.bsgroup.scrumit.pojo.SerializablePerson

  public @ResponseBody SerializablePerson getPersonById(@PathVariable int personid) {
    Person p = this.personService.findPersonById(personid);
    if (p == null) {
      throw new ResourceNotFoundException(personid);
    }
    return new SerializablePerson(p.getId(), p.getFirstName(), p.getLastName(), p.getEmail());
  }
View Full Code Here

Examples of com.alibaba.dubbo.common.model.SerializablePerson

    public void test_Map_List_pojo() throws Exception {
        Map<String, List<Object>> map = new HashMap<String, List<Object>>();
       
        List<Object> list = new ArrayList<Object>();
        list.add(new Person());
        list.add(new SerializablePerson());
       
        map.put("k", list);
       
        Object generalize = PojoUtils.generalize(map);
        Object realize = PojoUtils.realize(generalize, Map.class);
View Full Code Here

Examples of com.alibaba.dubbo.common.model.SerializablePerson

    }

    @Test
    public void test_pojo() throws Exception {
        assertObject(new Person());
        assertObject(new SerializablePerson());
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.model.SerializablePerson

    // ================ Simple Type ================

    @Test
    public void test_SPerson() throws Exception {
        assertObject(new SerializablePerson());
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.model.SerializablePerson

        assertObject(new SerializablePerson());
    }

    @Test
    public void test_SPerson_withType() throws Exception {
        assertObjectWithType(new SerializablePerson(), SerializablePerson.class);
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.model.SerializablePerson

    }

    @Test
    public void test_SPersonList() throws Exception {
        List<SerializablePerson> args = new ArrayList<SerializablePerson>();
        args.add(new SerializablePerson());

        assertObject(args);
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.model.SerializablePerson

    }

    @Test
    public void test_SPersonSet() throws Exception {
        Set<SerializablePerson> args = new HashSet<SerializablePerson>();
        args.add(new SerializablePerson());

        assertObject(args);
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.model.SerializablePerson

    }

    @Test
    public void test_IntSPersonMap() throws Exception {
        Map<Integer, SerializablePerson> args = new HashMap<Integer, SerializablePerson>();
        args.put(1, new SerializablePerson());

        assertObject(args);
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.model.SerializablePerson

    }

    @Test
    public void test_StringSPersonMap() throws Exception {
        Map<String, SerializablePerson> args = new HashMap<String, SerializablePerson>();
        args.put("1", new SerializablePerson());

        assertObject(args);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.