BasicHandle( TransactionHandler transactions, StatementLocator statementLocator, StatementBuilder preparedStatementCache, StatementRewriter statementRewriter, Connection connection, Map<String, Object> globalStatementAttributes, SQLLog log, TimingCollector timingCollector, MappingRegistry mappingRegistry, Foreman foreman, ContainerFactoryRegistry containerFactoryRegistry) { this.statementBuilder = preparedStatementCache; this.statementRewriter = statementRewriter; this.transactions = transactions; this.connection = connection; this.statementLocator = statementLocator; this.log = log; this.timingCollector = timingCollector; this.mappingRegistry = mappingRegistry; this.foreman = foreman; this.globalStatementAttributes = new HashMap<String, Object>(); this.globalStatementAttributes.putAll(globalStatementAttributes); this.containerFactoryRegistry = containerFactoryRegistry.createChild(); }
public Query<Map<String, Object>> createQuery(String sql) { return new Query<Map<String, Object>>( new Binding(), new DefaultMapper(), statementLocator, statementRewriter, this, statementBuilder, sql, new ConcreteStatementContext(globalStatementAttributes), log, timingCollector, Collections.<StatementCustomizer>emptyList(), new MappingRegistry(mappingRegistry), foreman.createChild(), containerFactoryRegistry.createChild()); }