public DomainQuery replayQuery ( RecordedQuery recordedQuery , IDomainAccess domainAccess ) { Boolean br_old = null ; DomainQuery query ; try { if ( ! Settings . TEST_MODE ) { br_old = QueryRecorder . blockRecording . get ( ) ; if ( this . createNew ) QueryRecorder . blockRecording . set ( Boolean . FALSE ) ; else QueryRecorder . blockRecording . set ( Boolean . TRUE ) ; } this . generic = false ; this . replayedQueryContext = new ReplayedQueryContext ( recordedQuery ) ; query = ( ( IIntDomainAccess ) domainAccess ) . getInternalDomainAccess ( ) . createRecordedQuery ( this . replayedQueryContext , this . createNew ) ; // do record this . id2ObjectMap . put ( QueryRecorder . QUERY_ID , query ) ; for ( Statement stmt : recordedQuery . getStatements ( ) ) { replayStatement ( stmt ) ; } Map < String , Parameter > params = recordedQuery . getParameters ( ) ; if ( params != null ) { QueryExecutor qe = InternalAccess . getQueryExecutor ( query ) ; Iterator < Parameter > pit = params . values ( ) . iterator ( ) ; while ( pit . hasNext ( ) ) { Parameter param = pit . next ( ) ; qe . addParameter ( param ) ; } } } finally { if ( ! Settings . TEST_MODE ) QueryRecorder . blockRecording . set ( br_old ) ; } return query ; }
Create a domain query from a recorded query .