private IBundleProvider performSearch ( String theCriteria ) { IFhirResourceDao < ? > subscriptionDao = myDaoRegistry . getSubscriptionDao ( ) ; RuntimeResourceDefinition responseResourceDef = subscriptionDao . validateCriteriaAndReturnResourceDefinition ( theCriteria ) ; SearchParameterMap responseCriteriaUrl = myMatchUrlService . translateMatchUrl ( theCriteria , responseResourceDef ) ; IFhirResourceDao < ? extends IBaseResource > responseDao = myDaoRegistry . getResourceDao ( responseResourceDef . getImplementingClass ( ) ) ; responseCriteriaUrl . setLoadSynchronousUpTo ( 1 ) ; TransactionTemplate txTemplate = new TransactionTemplate ( myTxManager ) ; txTemplate . setPropagationBehavior ( TransactionDefinition . PROPAGATION_REQUIRES_NEW ) ; return txTemplate . execute ( t -> responseDao . search ( responseCriteriaUrl ) ) ; }
Search based on a query criteria