Package ch.bsgroup.scrumit.pojo

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


  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

TOP

Related Classes of ch.bsgroup.scrumit.pojo.SerializablePerson

Copyright © 2018 www.massapicom. 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.