Skip to content

Commit

Permalink
delete<RestaurantService>: deleting unsable methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrielsilvamagalhaes committed May 25, 2024
1 parent b6ac68f commit d6f3a0c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ public List<RestaurantModel> getAll() {
return restaurantRepository.findAll();
}

@Transactional(readOnly = true)
public RestaurantModel findByIdWithComments(Long id) {
return restaurantRepository.findByIdWithComments(id)
.orElseThrow(() -> new EntityNotFoundException("Restaurante não encontrado com id: " + id)
);
}

@Transactional(readOnly = true)
public RestaurantModel findByIdWithAssessments(Long id) {
return restaurantRepository.findByIdWithAssessments(id).orElseThrow(
() -> new EntityNotFoundException("Restaurante não encontrado com id: " + id)
);
}

public RestaurantModel addressRegister(RestaurantModel r) {
r.setState(Viacep.getAddress(r.getCep()).getUf());
r.setCity(Viacep.getAddress(r.getCep()).getLocalidade());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RestaurantRepositoryTest {

@Autowired
EntityManager entityManager;


private RestaurantModel createRestaurant() {
RestaurantModel restaurant = new RestaurantModel(1L, "RestaurantTest", "12345678",
Expand Down

0 comments on commit d6f3a0c

Please sign in to comment.