Example #1
0
 /**
  * Get one person by id.
  *
  * @param id the id of the entity
  * @return the entity
  */
 @Transactional(readOnly = true)
 public PersonDTO findOne(Long id) {
   log.debug("Request to get Person : {}", id);
   Person person = personRepository.findOne(id);
   PersonDTO personDTO = personMapper.personToPersonDTO(person);
   return personDTO;
 }
Example #2
0
 /**
  * Save a person.
  *
  * @param personDTO the entity to save
  * @return the persisted entity
  */
 public PersonDTO save(PersonDTO personDTO) {
   log.debug("Request to save Person : {}", personDTO);
   Person person = personMapper.personDTOToPerson(personDTO);
   person = personRepository.save(person);
   PersonDTO result = personMapper.personToPersonDTO(person);
   return result;
 }
Example #3
0
 /**
  * Delete the person by id.
  *
  * @param id the id of the entity
  */
 public void delete(Long id) {
   log.debug("Request to delete Person : {}", id);
   personRepository.delete(id);
 }
Example #4
0
 /**
  * Get all the people.
  *
  * @param pageable the pagination information
  * @return the list of entities
  */
 @Transactional(readOnly = true)
 public Page<Person> findAll(Pageable pageable) {
   log.debug("Request to get all People");
   Page<Person> result = personRepository.findAll(pageable);
   return result;
 }