use of eu.europa.ec.fisheries.uvms.exchange.exception.ExchangeDaoException in project UVMS-ExchangeModule-APP by UnionVMS.
the class ServiceRegistryDaoBean method getServiceSettings.
@Override
public List<ServiceSetting> getServiceSettings(String serviceClassName) throws ExchangeDaoException {
try {
TypedQuery<ServiceSetting> query = em.createNamedQuery(ExchangeConstants.SETTING_FIND_BY_SERVICE, ServiceSetting.class);
query.setParameter("serviceClassName", serviceClassName);
return query.getResultList();
} catch (IllegalArgumentException e) {
LOG.error("[ Error when getting settings ] {}", e.getMessage());
throw new ExchangeDaoException("[ Error when getting settings ] ");
} catch (Exception e) {
LOG.error("[ Error when getting settings ] {}", e.getMessage());
throw new ExchangeDaoException("[ Error when getting settings ] ");
}
}
use of eu.europa.ec.fisheries.uvms.exchange.exception.ExchangeDaoException in project UVMS-ExchangeModule-APP by UnionVMS.
the class ServiceRegistryDaoBean method getServiceCapabilities.
@Override
public List<ServiceCapability> getServiceCapabilities(String serviceClassName) throws ExchangeDaoException {
try {
TypedQuery<ServiceCapability> query = em.createNamedQuery(ExchangeConstants.CAPABILITY_FIND_BY_SERVICE, ServiceCapability.class);
query.setParameter(SERVICE_CLASS_NAME_PARAMETER, serviceClassName);
return query.getResultList();
} catch (IllegalArgumentException e) {
LOG.error("[ Error when getting capabilities ] {}", e.getMessage());
throw new ExchangeDaoException("[ Error when getting capabilities ] ");
} catch (Exception e) {
LOG.error("[ Error when getting capabilities ] {}", e.getMessage());
throw new ExchangeDaoException("[ Error when getting capabilities ] ");
}
}
Aggregations