use of eu.bcvsolutions.idm.core.api.service.CodeableService in project CzechIdMng by bcvsolutions.
the class DefaultLookupService method getDtoLookup.
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public <I extends BaseDto> DtoLookup<I> getDtoLookup(Class<? extends Identifiable> identifiableType) {
ReadDtoService service = getDtoService(identifiableType);
if (service == null) {
LOG.debug("Service for identifiable type [{}] is not found, lookup not found.", identifiableType);
return null;
}
//
DtoLookup<I> lookup = (DtoLookup<I>) dtoLookups.getPluginFor(service.getDtoClass());
if (lookup == null) {
if (service instanceof CodeableService) {
return new CodeableDtoLookup<I>((CodeableService<I>) service);
}
return new DefaultDtoLookup<I>(service);
}
return lookup;
}
Aggregations