Adjust for postgres

This commit is contained in:
James Agnew 2017-07-20 14:45:42 -04:00
parent 49ddf76a5d
commit 82e2aadf86
1 changed files with 10 additions and 3 deletions

View File

@ -113,15 +113,22 @@ public class PersistedJpaBundleProvider implements IBundleProvider {
}
protected List<IBaseResource> doSearchOrEverything(final int theFromIndex, final int theToIndex) {
ISearchBuilder sb = myDao.newSearchBuilder();
final ISearchBuilder sb = myDao.newSearchBuilder();
String resourceName = mySearchEntity.getResourceType();
Class<? extends IBaseResource> resourceType = myContext.getResourceDefinition(resourceName).getImplementingClass();
sb.setType(resourceType, resourceName);
List<Long> pidsSubList = mySearchCoordinatorSvc.getResources(myUuid, theFromIndex, theToIndex);
final List<Long> pidsSubList = mySearchCoordinatorSvc.getResources(myUuid, theFromIndex, theToIndex);
return toResourceList(sb, pidsSubList);
TransactionTemplate template = new TransactionTemplate(myPlatformTransactionManager);
template.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRED);
return template.execute(new TransactionCallback<List<IBaseResource>>() {
@Override
public List<IBaseResource> doInTransaction(TransactionStatus theStatus) {
return toResourceList(sb, pidsSubList);
}
});
}
private void ensureDependenciesInjected() {