|
1 | 1 | /*
|
2 |
| - * Copyright 2009-2013 the original author or authors. |
| 2 | + * Copyright 2009-2014 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -505,33 +505,42 @@ public ResultMapping buildResultMapping(
|
505 | 505 | resultType, property, column, javaType, jdbcType, nestedSelect,
|
506 | 506 | nestedResultMap, notNullColumn, columnPrefix, typeHandler, flags, null, null);
|
507 | 507 | }
|
508 |
| - |
509 |
| - /** Backward compatibility signature */ |
510 |
| - public MappedStatement addMappedStatement( |
511 |
| - String id, |
512 |
| - SqlSource sqlSource, |
513 |
| - StatementType statementType, |
514 |
| - SqlCommandType sqlCommandType, |
515 |
| - Integer fetchSize, |
516 |
| - Integer timeout, |
517 |
| - String parameterMap, |
518 |
| - Class<?> parameterType, |
519 |
| - String resultMap, |
520 |
| - Class<?> resultType, |
521 |
| - ResultSetType resultSetType, |
522 |
| - boolean flushCache, |
523 |
| - boolean useCache, |
524 |
| - boolean resultOrdered, |
525 |
| - KeyGenerator keyGenerator, |
526 |
| - String keyProperty, |
527 |
| - String keyColumn, |
528 |
| - String databaseId, |
529 |
| - LanguageDriver lang) { |
530 |
| - return addMappedStatement( |
531 |
| - id, sqlSource, statementType, sqlCommandType, fetchSize, timeout, |
532 |
| - parameterMap, parameterType, resultMap, resultType, resultSetType, |
533 |
| - flushCache, useCache, resultOrdered, keyGenerator, keyProperty, |
534 |
| - keyColumn, databaseId, lang, null); |
| 508 | + |
| 509 | + public LanguageDriver getLanguageDriver(Class<?> langClass) { |
| 510 | + if (langClass != null) { |
| 511 | + configuration.getLanguageRegistry().register(langClass); |
| 512 | + } else { |
| 513 | + langClass = configuration.getLanguageRegistry().getDefaultDriverClass(); |
535 | 514 | }
|
| 515 | + return configuration.getLanguageRegistry().getDriver(langClass); |
| 516 | + } |
| 517 | + |
| 518 | + /** Backward compatibility signature */ |
| 519 | + public MappedStatement addMappedStatement( |
| 520 | + String id, |
| 521 | + SqlSource sqlSource, |
| 522 | + StatementType statementType, |
| 523 | + SqlCommandType sqlCommandType, |
| 524 | + Integer fetchSize, |
| 525 | + Integer timeout, |
| 526 | + String parameterMap, |
| 527 | + Class<?> parameterType, |
| 528 | + String resultMap, |
| 529 | + Class<?> resultType, |
| 530 | + ResultSetType resultSetType, |
| 531 | + boolean flushCache, |
| 532 | + boolean useCache, |
| 533 | + boolean resultOrdered, |
| 534 | + KeyGenerator keyGenerator, |
| 535 | + String keyProperty, |
| 536 | + String keyColumn, |
| 537 | + String databaseId, |
| 538 | + LanguageDriver lang) { |
| 539 | + return addMappedStatement( |
| 540 | + id, sqlSource, statementType, sqlCommandType, fetchSize, timeout, |
| 541 | + parameterMap, parameterType, resultMap, resultType, resultSetType, |
| 542 | + flushCache, useCache, resultOrdered, keyGenerator, keyProperty, |
| 543 | + keyColumn, databaseId, lang, null); |
| 544 | + } |
536 | 545 |
|
537 | 546 | }
|
0 commit comments