/
Apathy21
/
company
Обзор
Документация
Войти
/
Apathy21
/
company
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
MainService/src/main/java/org/example/service/AddressService.java
22 строки
602 B
alexeev509
Skeletop company app realization
13 сен 2024, 19:21
13 сен 2024, 19:21
2a02e11
Код
Авторство
О чём код?
package org.example.service; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.inject.Named; import org.example.Entity.Address; import org.example.dao.api.AddressDao; @Named("addressService") @ApplicationScoped public class AddressService { @Inject private AddressDao addressDao; public Address getAddressByBranchOfficeId(long id) { return addressDao.getAddressByBranchOfficeId(id).orElseThrow(); } public Address getAddressByCompanyId(Long id) { return addressDao.getAddressByCompanyId(id).orElseThrow(); } }