use of pl.morecraft.dev.settler.web.dto.CommentDTO in project Settler by EmhyrVarEmreis.
the class CommentService method getByPrivilegeObject.
public ResponseEntity<List<CommentDTO>> getByPrivilegeObject(Long objectId) {
PrivilegeObject privilegeObject = privilegeObjectRepository.findOne(objectId);
if (privilegeObject == null) {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
List<Comment> commentList = getByPrivilegeObject(privilegeObject);
List<CommentDTO> commentDTOList = getListPageConverter().convert(commentList, CommentDTO.class);
return new ResponseEntity<>(commentDTOList, HttpStatus.OK);
}
Aggregations