├── .gitattributes ├── src ├── site │ ├── resources │ │ └── images │ │ │ ├── en.png │ │ │ ├── es.png │ │ │ ├── fr.png │ │ │ ├── ja.png │ │ │ ├── ko.png │ │ │ └── zh.png │ └── ja │ │ └── markdown │ │ └── index.md ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── ibatis │ │ ├── type │ │ └── package-info.java │ │ ├── jdbc │ │ ├── package-info.java │ │ └── SQL.java │ │ ├── io │ │ └── package-info.java │ │ ├── parsing │ │ ├── package-info.java │ │ └── TokenHandler.java │ │ ├── reflection │ │ ├── package-info.java │ │ ├── invoker │ │ │ └── package-info.java │ │ ├── factory │ │ │ └── package-info.java │ │ ├── wrapper │ │ │ └── package-info.java │ │ └── property │ │ │ └── package-info.java │ │ ├── cache │ │ ├── package-info.java │ │ ├── decorators │ │ │ └── package-info.java │ │ └── impl │ │ │ └── package-info.java │ │ ├── logging │ │ ├── package-info.java │ │ ├── log4j2 │ │ │ └── package-info.java │ │ ├── slf4j │ │ │ └── package-info.java │ │ ├── stdout │ │ │ └── package-info.java │ │ ├── jdk14 │ │ │ └── package-info.java │ │ ├── nologging │ │ │ └── package-info.java │ │ ├── commons │ │ │ └── package-info.java │ │ ├── jdbc │ │ │ └── package-info.java │ │ └── log4j │ │ │ └── package-info.java │ │ ├── mapping │ │ ├── package-info.java │ │ ├── ResultFlag.java │ │ ├── ParameterMode.java │ │ ├── FetchType.java │ │ ├── StatementType.java │ │ └── DefaultDatabaseIdProvider.java │ │ ├── cursor │ │ ├── package-info.java │ │ └── defaults │ │ │ └── package-info.java │ │ ├── plugin │ │ └── package-info.java │ │ ├── scripting │ │ ├── package-info.java │ │ ├── defaults │ │ │ └── package-info.java │ │ └── xmltags │ │ │ ├── package-info.java │ │ │ └── SqlNode.java │ │ ├── datasource │ │ ├── package-info.java │ │ ├── jndi │ │ │ └── package-info.java │ │ ├── unpooled │ │ │ └── package-info.java │ │ └── pooled │ │ │ └── package-info.java │ │ ├── exceptions │ │ └── package-info.java │ │ ├── executor │ │ ├── package-info.java │ │ ├── statement │ │ │ └── package-info.java │ │ ├── keygen │ │ │ └── package-info.java │ │ ├── loader │ │ │ ├── cglib │ │ │ │ └── package-info.java │ │ │ ├── javassist │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── result │ │ │ └── package-info.java │ │ ├── parameter │ │ │ └── package-info.java │ │ ├── resultset │ │ │ └── package-info.java │ │ └── ExecutionPlaceholder.java │ │ ├── session │ │ ├── package-info.java │ │ ├── defaults │ │ │ └── package-info.java │ │ ├── LocalCacheScope.java │ │ ├── ExecutorType.java │ │ └── ResultHandler.java │ │ ├── transaction │ │ ├── jdbc │ │ │ └── package-info.java │ │ ├── package-info.java │ │ └── managed │ │ │ └── package-info.java │ │ ├── binding │ │ └── package-info.java │ │ ├── builder │ │ ├── package-info.java │ │ ├── xml │ │ │ └── package-info.java │ │ └── annotation │ │ │ └── package-info.java │ │ ├── annotations │ │ └── package-info.java │ │ └── package-info.java └── test │ ├── resources │ └── org │ │ └── apache │ │ └── ibatis │ │ ├── submitted │ │ ├── nested_query_cache │ │ │ └── mapper.properties │ │ ├── bind_in_foreach │ │ │ └── CreateDB.sql │ │ ├── no_param_type │ │ │ └── CreateDB.sql │ │ ├── dirty_select │ │ │ └── CreateDB.sql │ │ ├── inline_association_with_dot │ │ │ └── create.sql │ │ ├── literal_string │ │ │ └── CreateDB.sql │ │ ├── overwritingproperties │ │ │ └── create-schema-mysql.sql │ │ ├── array_type_handler │ │ │ └── CreateDB.sql │ │ ├── complex_type │ │ │ └── CreateDB.sql │ │ ├── basetest │ │ │ └── CreateDB.sql │ │ ├── cacheorder │ │ │ └── CreateDB.sql │ │ ├── complex_property │ │ │ └── db.sql │ │ ├── ognlstatic │ │ │ └── CreateDB.sql │ │ ├── valueinmap │ │ │ └── CreateDB.sql │ │ ├── associationtype │ │ │ └── CreateDB.sql │ │ ├── default_method │ │ │ └── CreateDB.sql │ │ ├── lazy_properties │ │ │ └── CreateDB.sql │ │ ├── maptypehandler │ │ │ └── CreateDB.sql │ │ ├── raw_sql_source │ │ │ └── CreateDB.sql │ │ ├── dml_return_types │ │ │ └── CreateDB.sql │ │ ├── enum_interface_type_handler │ │ │ └── CreateDB.sql │ │ ├── global_variables │ │ │ └── CreateDB.sql │ │ ├── hashmaptypehandler │ │ │ └── CreateDB.sql │ │ ├── localtime │ │ │ └── CreateDB.sql │ │ ├── propertiesinmapperfiles │ │ │ └── CreateDB.sql │ │ ├── handle_by_jdbc_type │ │ │ └── CreateDB.sql │ │ ├── resolution │ │ │ └── CreateDB.sql │ │ ├── null_associations │ │ │ └── create-schema-mysql.sql │ │ ├── optional_on_mapper_method │ │ │ └── CreateDB.sql │ │ ├── param_name_resolve │ │ │ └── CreateDB.sql │ │ ├── named_constructor_args │ │ │ └── CreateDB.sql │ │ ├── result_handler_type │ │ │ └── CreateDB.sql │ │ ├── typehandlerinjection │ │ │ └── CreateDB.sql │ │ ├── use_actual_param_name │ │ │ └── CreateDB.sql │ │ ├── uuid_test │ │ │ └── CreateDB.sql │ │ ├── batch_keys │ │ │ └── CreateDB.sql │ │ └── extend │ │ │ └── CreateDB.sql │ │ ├── type │ │ ├── jdbc.properties │ │ ├── ClobReaderTypeHandlerTest.sql │ │ └── BlobInputStreamTypeHandlerTest.sql │ │ ├── builder │ │ └── jdbc.properties │ │ ├── databases │ │ ├── jpetstore │ │ │ └── jpetstore-hsqldb.properties │ │ └── blog │ │ │ └── blog-derby.properties │ │ ├── binding │ │ └── paramtest-schema.sql │ │ └── jdbc │ │ └── ScriptCommentAfterEOLTerminator.sql │ └── java │ └── org │ └── apache │ └── ibatis │ ├── builder │ ├── mapper │ │ └── CustomMapper.java │ └── CustomReflectorFactory.java │ ├── domain │ ├── blog │ │ ├── DraftPost.java │ │ ├── mappers │ │ │ └── NestedBlogMapper.java │ │ └── Section.java │ └── misc │ │ └── generics │ │ ├── GenericInterface.java │ │ ├── GenericAbstract.java │ │ └── GenericSubclass.java │ ├── submitted │ ├── extend │ │ ├── Child.java │ │ └── ExtendMapper.java │ ├── count │ │ └── CountMapper.java │ ├── record_type │ │ └── Item.java │ ├── unknownobject │ │ ├── UnknownObject.java │ │ └── Mapper.java │ ├── simplelistparameter │ │ └── Rv.java │ ├── autodiscover │ │ ├── mappers │ │ │ └── DummyMapper.java │ │ └── aliases │ │ │ └── DummyTypeAlias.java │ ├── mapper_extend │ │ ├── Mapper.java │ │ ├── ChildMapper.java │ │ └── GrandpaMapper.java │ ├── automapping │ │ └── Article.java │ ├── generictyperesolution │ │ └── User.java │ ├── javassist │ │ └── Mapper.java │ ├── xml_external_ref │ │ ├── PetMapper.java │ │ ├── ResultMapReferencePetMapper.java │ │ ├── ParameterMapReferencePetMapper.java │ │ ├── SameIdPetMapper.java │ │ ├── Dog.java │ │ ├── InvalidMapper.java │ │ ├── MultipleCrossIncludePetMapper.java │ │ ├── ResultMapReferencePersonMapper.java │ │ ├── PersonMapper.java │ │ ├── ParameterMapReferencePersonMapper.java │ │ ├── SameIdPersonMapper.java │ │ ├── ReverseIncludePersonMapper.java │ │ ├── MultipleIncludePersonMapper.java │ │ ├── MultipleCrossIncludePersonMapper.java │ │ └── MultipleReverseIncludePersonMapper.java │ ├── complex_type │ │ ├── Property.java │ │ └── Item.java │ ├── primitive_array │ │ └── Mapper.java │ ├── enum_interface_type_handler │ │ ├── HasValue.java │ │ └── XmlMapper.java │ ├── global_variables │ │ └── Mapper.java │ ├── inheritance │ │ └── BaseMapper.java │ ├── missing_id_property │ │ └── CarMapper.java │ ├── nonexistentvariables │ │ └── Mapper.java │ ├── encoding │ │ └── EncodingMapper.java │ ├── mapper_type_parameter │ │ ├── CountryMapper.java │ │ ├── PersonMapper.java │ │ └── PersonListMapper.java │ ├── propertiesinmapperfiles │ │ └── Mapper.java │ ├── lazyload_common_property │ │ ├── ChildMapper.java │ │ ├── FatherMapper.java │ │ └── GrandFatherMapper.java │ ├── order_prefix_removed │ │ └── PersonMapper.java │ ├── serializecircular │ │ ├── AttributeMapper.java │ │ └── DepartmentMapper.java │ ├── deferload_common_property │ │ ├── FatherMapper.java │ │ └── ChildMapper.java │ ├── extends_with_constructor │ │ ├── TeacherMapper.java │ │ └── StudentMapper.java │ ├── inline_association_with_dot │ │ ├── ElementMapper.java │ │ ├── ElementMapperUsingInline.java │ │ └── ElementMapperUsingSubMap.java │ ├── primitives │ │ └── Mapper.java │ ├── basetest │ │ └── Mapper.java │ ├── batch_keys │ │ └── Mapper.java │ ├── include_property │ │ └── DuplicatedIncludePropertiesMapper.java │ ├── bringrags │ │ └── SimpleChildObjectMapper.java │ ├── ognlstatic │ │ ├── Mapper.java │ │ └── StaticClass.java │ ├── typehandlerinjection │ │ └── Mapper.java │ ├── enum_with_method │ │ └── Mapper.java │ ├── multipleiterates │ │ └── Mapper.java │ ├── cursor_nested │ │ └── Mapper.java │ ├── flush_statement_npe │ │ └── PersonMapper.java │ ├── orphan_result_maps │ │ ├── NestedCollectionMapper.java │ │ └── SeparateCollectionMapper.java │ ├── resultmapwithassociationstest │ │ └── Mapper.java │ ├── column_forwarding │ │ └── Mapper.java │ ├── map_class_name_conflict │ │ └── PersonMapper.java │ ├── no_result_type_map │ │ └── ParentMapper.java │ ├── auto_type_from_non_ambiguous_constructor │ │ ├── Account.java │ │ └── FailingMapper.java │ ├── batch_test │ │ └── Mapper.java │ ├── constructor_automapping │ │ └── Mapper.java │ ├── resolution │ │ └── deepresultmap │ │ │ └── MapperA.java │ ├── enumtypehandler_on_annotation │ │ └── Employee.java │ ├── lazyload_proxyfactory_comparison │ │ └── Owned.java │ ├── null_associations │ │ └── FooMapper.java │ ├── multiple_discriminator │ │ └── PersonMapper.java │ ├── nested_query_cache │ │ └── AuthorMapper.java │ ├── overwritingproperties │ │ └── FooMapper.java │ ├── choosewhen │ │ └── ChooseWhenMapper.java │ ├── heavy_initial_load │ │ └── ThingMapper.java │ ├── parent_childs │ │ └── Mapper.java │ ├── parent_reference_3level │ │ └── Mapper.java │ ├── dynsql │ │ └── CustomUtil.java │ └── selectkey │ │ └── SqlProvider.java │ ├── binding │ ├── WrongNamespaceMapper.java │ └── MissingNamespaceMapper.java │ ├── reflection │ └── typeparam │ │ └── Level1Mapper.java │ └── plugin │ └── Mapper.java ├── .mvn └── maven.config ├── renovate.json ├── .github ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ └── sonatype.yaml ├── .gitignore ├── LICENSE_HEADER ├── format.xml └── .editorconfig /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /src/site/resources/images/en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybatis/mybatis-3/HEAD/src/site/resources/images/en.png -------------------------------------------------------------------------------- /src/site/resources/images/es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybatis/mybatis-3/HEAD/src/site/resources/images/es.png -------------------------------------------------------------------------------- /src/site/resources/images/fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybatis/mybatis-3/HEAD/src/site/resources/images/fr.png -------------------------------------------------------------------------------- /src/site/resources/images/ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybatis/mybatis-3/HEAD/src/site/resources/images/ja.png -------------------------------------------------------------------------------- /src/site/resources/images/ko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybatis/mybatis-3/HEAD/src/site/resources/images/ko.png -------------------------------------------------------------------------------- /src/site/resources/images/zh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mybatis/mybatis-3/HEAD/src/site/resources/images/zh.png -------------------------------------------------------------------------------- /.mvn/maven.config: -------------------------------------------------------------------------------- 1 | -Daether.checksums.algorithms=SHA-512,SHA-256,SHA-1,MD5 2 | -Daether.connector.smartChecksums=false 3 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Need Help? 4 | url: https://github.com/mybatis/mybatis-3/discussions 5 | about: Please post questions here. 6 | - name: Report Security Vulnerability 7 | url: https://github.com/mybatis/mybatis-3/security 8 | about: Please report security vulnerabilities here. 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*.iml 2 | /*.ipr 3 | /*.iws 4 | /.classpath 5 | /.factorypath 6 | /.idea 7 | /.project 8 | /.settings 9 | /nb* 10 | /release.properties 11 | /target 12 | .github/keys/ 13 | .profiler/ 14 | 15 | # These are needed if running in IDE without properties set 16 | /ibderby 17 | derby.log 18 | /bin/ 19 | .mvn/wrapper/maven-wrapper.jar 20 | .sts4-cache/ 21 | *.releaseBackup 22 | -------------------------------------------------------------------------------- /LICENSE_HEADER: -------------------------------------------------------------------------------- 1 | Copyright ${license.git.copyrightYears} the original author or authors. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | https://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /src/site/ja/markdown/index.md: -------------------------------------------------------------------------------- 1 | title: MyBatis 3 | イントロダクション 2 | author: Clinton Begin, Iwao AVE! 3 | 4 |

Avoid blank site

5 | 6 | ## イントロダクション 7 | 8 | ### MyBatis とは? 9 | 10 | MyBatis はカスタム SQL、ストアドプロシージャ、高度なマッピング処理に対応した優れた永続化フレームワークです。 MyBatisを使うことで、直接 JDBC を扱うコードを書いたり、クエリ引数やクエリ結果を手動で設定する必要がほとんどなくなります。 MyBatis の設定やデータベースレコードと Java オブジェクトの関連付けは、XML またはアノテーションを使って行うことができます。 11 | 12 | ### このドキュメントの改善にご協力ください... 13 | 14 | このドキュメントの中で誤りや特定の機能に関する記述が抜けていることに気づいたら、詳しく調べてドキュメントを更新して頂けると助かります。 15 | 16 | このマニュアルのソースは Markdown 形式で、[プロジェクトの GitHub リポジトリ](https://github.com/mybatis/mybatis-3/tree/master/src/site)で配布されています。 17 | リポジトリをフォークして内容を編集したらプルリクエストを送信してください。 18 | 19 | このドキュメントを読む必要のある人、つまりあなたこそが最高の著者なのです! 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/type/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Type handlers. 18 | */ 19 | package org.apache.ibatis.type; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Utilities for JDBC. 18 | */ 19 | package org.apache.ibatis.jdbc; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/io/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Utilities to read resources. 18 | */ 19 | package org.apache.ibatis.io; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/parsing/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Parsing utils. 18 | */ 19 | package org.apache.ibatis.parsing; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/reflection/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Reflection utils. 18 | */ 19 | package org.apache.ibatis.reflection; 20 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/nested_query_cache/mapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2009-2022 the original author or authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | url=jdbc:derby:ibderby;create=true 18 | username= 19 | password= 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/cache/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for caching stuff. 18 | */ 19 | package org.apache.ibatis.cache; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for logging. 18 | */ 19 | package org.apache.ibatis.logging; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/mapping/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for mapping. 18 | */ 19 | package org.apache.ibatis.mapping; 20 | -------------------------------------------------------------------------------- /format.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/cursor/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for cursor feature. 18 | */ 19 | package org.apache.ibatis.cursor; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/plugin/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for handing plugins. 18 | */ 19 | package org.apache.ibatis.plugin; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/reflection/invoker/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Unused. 18 | */ 19 | package org.apache.ibatis.reflection.invoker; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/scripting/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for languages. 18 | */ 19 | package org.apache.ibatis.scripting; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/datasource/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for Datasources. 18 | */ 19 | package org.apache.ibatis.datasource; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/exceptions/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for exceptions. 18 | */ 19 | package org.apache.ibatis.exceptions; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Contains the statement executors. 18 | */ 19 | package org.apache.ibatis.executor; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/reflection/factory/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Object factory. 18 | */ 19 | package org.apache.ibatis.reflection.factory; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/reflection/wrapper/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Object wrappers. 18 | */ 19 | package org.apache.ibatis.reflection.wrapper; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/session/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package. Contains the SqlSession. 18 | */ 19 | package org.apache.ibatis.session; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/transaction/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * JDBC transaction. 18 | */ 19 | package org.apache.ibatis.transaction.jdbc; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/transaction/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for transactions. 18 | */ 19 | package org.apache.ibatis.transaction; 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/builder/mapper/CustomMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.builder.mapper; 17 | 18 | public interface CustomMapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/domain/blog/DraftPost.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.domain.blog; 17 | 18 | public class DraftPost extends Post { 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/datasource/jndi/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * JNDI Datasource factory. 18 | */ 19 | package org.apache.ibatis.datasource.jndi; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/statement/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Statement handlers. 18 | */ 19 | package org.apache.ibatis.executor.statement; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/log4j2/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * logger using Log4J 2 feature. 18 | */ 19 | package org.apache.ibatis.logging.log4j2; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/slf4j/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * logger using SLF4J feature. 18 | */ 19 | package org.apache.ibatis.logging.slf4j; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/stdout/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * logger using standard out. 18 | */ 19 | package org.apache.ibatis.logging.stdout; 20 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/type/jdbc.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2009-2023 the original author or authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | driver=org.apache.derby.jdbc.EmbeddedDriver 18 | url=jdbc:derby:ibderby;create=true 19 | username= 20 | password= 21 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/binding/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Binds mapper interfaces with mapped statements. 18 | */ 19 | package org.apache.ibatis.binding; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/cache/decorators/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Contains cache decorators. 18 | */ 19 | package org.apache.ibatis.cache.decorators; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/cache/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Contains the default cache implementation. 18 | */ 19 | package org.apache.ibatis.cache.impl; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/datasource/unpooled/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Hyper-simple Datasource. 18 | */ 19 | package org.apache.ibatis.datasource.unpooled; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/keygen/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Contains the key generators. 18 | */ 19 | package org.apache.ibatis.executor.keygen; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/loader/cglib/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * CGLIB proxy factory. 18 | */ 19 | package org.apache.ibatis.executor.loader.cglib; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/result/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Contains the result handlers. 18 | */ 19 | package org.apache.ibatis.executor.result; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/jdk14/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * logger using JDK logging feature. 18 | */ 19 | package org.apache.ibatis.logging.jdk14; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/nologging/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * logger for no operation. 18 | */ 19 | package org.apache.ibatis.logging.nologging; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/session/defaults/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Default impl for SqlSession. 18 | */ 19 | package org.apache.ibatis.session.defaults; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/transaction/managed/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * External transaction. 18 | */ 19 | package org.apache.ibatis.transaction.managed; 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/extend/Child.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.extend; 17 | 18 | public class Child extends Parent { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/builder/jdbc.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2009-2022 the original author or authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | driver=org.apache.derby.jdbc.EmbeddedDriver 18 | url=jdbc:derby:ibderby;create=true 19 | username= 20 | password= 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/databases/jpetstore/jpetstore-hsqldb.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2009-2022 the original author or authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | driver=org.hsqldb.jdbcDriver 18 | url=jdbc:hsqldb:. 19 | username=sa 20 | password= 21 | 22 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/builder/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for the Configuration building code. 18 | */ 19 | package org.apache.ibatis.builder; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/builder/xml/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Parses XML files to create a Configuration. 18 | */ 19 | package org.apache.ibatis.builder.xml; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/commons/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * logger using Commons Logging feature. 18 | */ 19 | package org.apache.ibatis.logging.commons; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/scripting/defaults/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Default beans for languages. 18 | */ 19 | package org.apache.ibatis.scripting.defaults; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/scripting/xmltags/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Default XML MyBatis language. 18 | */ 19 | package org.apache.ibatis.scripting.xmltags; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/cursor/defaults/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Default implementation for cursor feature. 18 | */ 19 | package org.apache.ibatis.cursor.defaults; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Logging proxies that logs any JDBC statement. 18 | */ 19 | package org.apache.ibatis.logging.jdbc; 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/domain/blog/mappers/NestedBlogMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.domain.blog.mappers; 17 | 18 | public interface NestedBlogMapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/count/CountMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.count; 17 | 18 | public interface CountMapper { 19 | int count(); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/databases/blog/blog-derby.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2009-2023 the original author or authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | driver=org.apache.derby.jdbc.EmbeddedDriver 18 | url=jdbc:derby:ibderby;create=true 19 | username= 20 | password= 21 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/datasource/pooled/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Simple single-thread pooled datasource. 18 | */ 19 | package org.apache.ibatis.datasource.pooled; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/loader/javassist/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Javassist proxy factory. 18 | */ 19 | package org.apache.ibatis.executor.loader.javassist; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/loader/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for loading results into beans. 18 | */ 19 | package org.apache.ibatis.executor.loader; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/parameter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Base package for handling parameters. 18 | */ 19 | package org.apache.ibatis.executor.parameter; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/resultset/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Contains the result processing logic. 18 | */ 19 | package org.apache.ibatis.executor.resultset; 20 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/reflection/property/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Tools for getting/setting properties. 18 | */ 19 | package org.apache.ibatis.reflection.property; 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/record_type/Item.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.record_type; 17 | 18 | public record Item(Integer id, Property property) { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/unknownobject/UnknownObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.unknownobject; 17 | 18 | public class UnknownObject { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2009-2022 the original author or authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | root = true 18 | 19 | [*.{java, xml, sql}] 20 | charset = utf-8 21 | indent_style = space 22 | indent_size = 2 23 | insert_final_newline = true 24 | trim_trailing_whitespace = true 25 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/builder/annotation/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Parses annotations to create a Configuration. 18 | */ 19 | package org.apache.ibatis.builder.annotation; 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/simplelistparameter/Rv.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.simplelistparameter; 17 | 18 | public class Rv extends Vehicle { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/binding/paramtest-schema.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | CREATE TABLE param_test ( 18 | id VARCHAR(255) NOT NULL, 19 | size BIGINT, 20 | PRIMARY KEY (id) 21 | ); 22 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/bind_in_foreach/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2025 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/no_param_type/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/annotations/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Contains all the annotation that are used in mapper interfaces. 18 | */ 19 | package org.apache.ibatis.annotations; 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/binding/WrongNamespaceMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.binding; 17 | 18 | public interface WrongNamespaceMapper { 19 | 20 | void get(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/autodiscover/mappers/DummyMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.autodiscover.mappers; 17 | 18 | public interface DummyMapper { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/mapper_extend/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.mapper_extend; 17 | 18 | public interface Mapper extends ParentMapper { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/jdbc/ScriptCommentAfterEOLTerminator.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | ALTER TABLE product ALTER COLUMN name varchar(80); -- that should not make the ScriptRunner failing 18 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/type/ClobReaderTypeHandlerTest.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | DROP TABLE test_clob; 18 | 19 | CREATE TABLE test_clob ( 20 | id INT PRIMARY KEY, 21 | content CLOB 22 | ); 23 | -------------------------------------------------------------------------------- /.github/workflows/sonatype.yaml: -------------------------------------------------------------------------------- 1 | name: Sonatype 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | permissions: read-all 9 | 10 | jobs: 11 | build: 12 | if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]') 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v6 16 | - name: Set up JDK 17 | uses: actions/setup-java@v5 18 | with: 19 | cache: maven 20 | distribution: temurin 21 | java-version: 21 22 | - name: Deploy to Sonatype 23 | run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true -Prelease -Dgpg.skip 24 | env: 25 | CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} 26 | CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} 27 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/binding/MissingNamespaceMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.binding; 17 | 18 | public interface MissingNamespaceMapper { 19 | 20 | void get(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/automapping/Article.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.automapping; 17 | 18 | public class Article { 19 | public final Integer version = 0; 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/generictyperesolution/User.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.generictyperesolution; 17 | 18 | public class User extends Entity { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/type/BlobInputStreamTypeHandlerTest.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | DROP TABLE test_blob; 18 | 19 | CREATE TABLE test_blob ( 20 | id INT PRIMARY KEY, 21 | content BLOB 22 | ); 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/javassist/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.javassist; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/mapper_extend/ChildMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.mapper_extend; 17 | 18 | public interface ChildMapper extends ParentMapper { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/dirty_select/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table if exists users; 18 | 19 | create table users ( 20 | id serial primary key, 21 | name varchar(30) 22 | ); 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/domain/misc/generics/GenericInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.domain.misc.generics; 17 | 18 | public interface GenericInterface { 19 | void setId(K id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/unknownobject/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.unknownobject; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/PetMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface PetMapper { 19 | Pet select(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/inline_association_with_dot/create.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2023 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | CREATE MEMORY TABLE VALUETABLE(VALUECOLUMN VARCHAR(5)); 18 | INSERT INTO VALUETABLE (VALUECOLUMN) VALUES('value'); 19 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/literal_string/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2024 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table literal_string if exists; 18 | 19 | create table literal_string ( 20 | id int, 21 | txt varchar(32) 22 | ); 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/reflection/typeparam/Level1Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.reflection.typeparam; 17 | 18 | public interface Level1Mapper extends Level0Mapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/complex_type/Property.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.complex_type; 17 | 18 | public class Property { 19 | public int id; 20 | public String value; 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/primitive_array/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.primitive_array; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/ResultMapReferencePetMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface ResultMapReferencePetMapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/overwritingproperties/create-schema-mysql.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | CREATE TABLE FOO 18 | ( 19 | field1 integer, 20 | field2 integer, 21 | field3 integer, 22 | field4 integer 23 | ); 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * The MyBatis data mapper framework makes it easier to use a relational database with object-oriented applications. 18 | */ 19 | package org.apache.ibatis; 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/domain/misc/generics/GenericAbstract.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.domain.misc.generics; 17 | 18 | public abstract class GenericAbstract { 19 | public abstract K getId(); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/enum_interface_type_handler/HasValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.enum_interface_type_handler; 17 | 18 | public interface HasValue { 19 | int getValue(); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/global_variables/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.global_variables; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/inheritance/BaseMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.inheritance; 17 | 18 | public interface BaseMapper { 19 | 20 | T retrieveById(Integer id); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/missing_id_property/CarMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.missing_id_property; 17 | 18 | public interface CarMapper { 19 | Car getCarsInfo(Long id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/nonexistentvariables/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.nonexistentvariables; 17 | 18 | public interface Mapper { 19 | int count(int id, String name); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/ParameterMapReferencePetMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface ParameterMapReferencePetMapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/SameIdPetMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface SameIdPetMapper { 19 | Pet select(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/session/LocalCacheScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.session; 17 | 18 | /** 19 | * @author Eduardo Macarron 20 | */ 21 | public enum LocalCacheScope { 22 | SESSION, STATEMENT 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/encoding/EncodingMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.encoding; 17 | 18 | public interface EncodingMapper { 19 | String select1(); 20 | 21 | String select2(); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/extend/ExtendMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.extend; 17 | 18 | public interface ExtendMapper { 19 | Parent selectParent(); 20 | 21 | Child selectChild(); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/mapper_type_parameter/CountryMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.mapper_type_parameter; 17 | 18 | public interface CountryMapper extends BaseMapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/mapper_type_parameter/PersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.mapper_type_parameter; 17 | 18 | public interface PersonMapper extends BaseMapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/propertiesinmapperfiles/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.propertiesinmapperfiles; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/array_type_handler/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20), 22 | nicknames varchar(20) array 23 | ); 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/executor/ExecutionPlaceholder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.executor; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public enum ExecutionPlaceholder { 22 | EXECUTION_PLACEHOLDER 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/mapping/ResultFlag.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.mapping; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public enum ResultFlag { 22 | 23 | ID, 24 | 25 | CONSTRUCTOR 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/enum_interface_type_handler/XmlMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.enum_interface_type_handler; 17 | 18 | public interface XmlMapper { 19 | int insertUser(User user); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/lazyload_common_property/ChildMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.lazyload_common_property; 17 | 18 | public interface ChildMapper { 19 | Child selectById(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/order_prefix_removed/PersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.order_prefix_removed; 17 | 18 | public interface PersonMapper { 19 | Person select(String orderType); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/serializecircular/AttributeMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.serializecircular; 17 | 18 | public interface AttributeMapper { 19 | Attribute getById(Integer anId); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/serializecircular/DepartmentMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.serializecircular; 17 | 18 | public interface DepartmentMapper { 19 | Department getById(Integer anId); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/complex_type/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2025 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table properties if exists; 18 | 19 | create table properties ( 20 | item_id int, 21 | property_id int, 22 | value varchar(20) 23 | ); 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/parsing/TokenHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.parsing; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public interface TokenHandler { 22 | String handleToken(String content); 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/deferload_common_property/FatherMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.deferload_common_property; 17 | 18 | public interface FatherMapper { 19 | Father selectById(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/extends_with_constructor/TeacherMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.extends_with_constructor; 17 | 18 | public interface TeacherMapper { 19 | Teacher selectById(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/inline_association_with_dot/ElementMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.inline_association_with_dot; 17 | 18 | public interface ElementMapper { 19 | Element selectElement(); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/lazyload_common_property/FatherMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.lazyload_common_property; 17 | 18 | public interface FatherMapper { 19 | Father selectById(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/primitives/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.primitives; 17 | 18 | import java.util.List; 19 | 20 | public interface Mapper { 21 | 22 | List select(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/basetest/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.basetest; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | void insertUser(User user); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/Dog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public class Dog extends Pet { 19 | 20 | private static final long serialVersionUID = 1L; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/InvalidMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | import java.util.Map; 19 | 20 | public interface InvalidMapper { 21 | Map selectAll(); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/basetest/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/cacheorder/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/complex_property/db.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | create table user ( 18 | id int, 19 | username varchar(32) not null, 20 | password varchar(128) not null, 21 | administrator boolean, 22 | primary key (id) 23 | ); 24 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/ognlstatic/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/valueinmap/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/mapping/ParameterMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.mapping; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public enum ParameterMode { 22 | 23 | IN, 24 | 25 | OUT, 26 | 27 | INOUT 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/scripting/xmltags/SqlNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.scripting.xmltags; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public interface SqlNode { 22 | boolean apply(DynamicContext context); 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/batch_keys/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.batch_keys; 17 | 18 | public interface Mapper { 19 | 20 | void insert(User user); 21 | 22 | void insertIdentity(User user); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/include_property/DuplicatedIncludePropertiesMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.include_property; 17 | 18 | public interface DuplicatedIncludePropertiesMapper { 19 | String select(); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/MultipleCrossIncludePetMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface MultipleCrossIncludePetMapper { 19 | Pet select(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/associationtype/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/default_method/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/lazy_properties/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/maptypehandler/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/raw_sql_source/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/mapping/FetchType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.mapping; 17 | 18 | /** 19 | * @author Eduardo Macarron 20 | */ 21 | public enum FetchType { 22 | 23 | LAZY, 24 | 25 | EAGER, 26 | 27 | DEFAULT 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/session/ExecutorType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.session; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public enum ExecutorType { 22 | 23 | SIMPLE, 24 | 25 | REUSE, 26 | 27 | BATCH 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/bringrags/SimpleChildObjectMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.bringrags; 17 | 18 | public interface SimpleChildObjectMapper { 19 | SimpleChildObject getSimpleChildObjectById(String id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/complex_type/Item.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.complex_type; 17 | 18 | import java.util.List; 19 | 20 | public class Item { 21 | public int id; 22 | public List properties; 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/inline_association_with_dot/ElementMapperUsingInline.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.inline_association_with_dot; 17 | 18 | public interface ElementMapperUsingInline extends ElementMapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/inline_association_with_dot/ElementMapperUsingSubMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.inline_association_with_dot; 17 | 18 | public interface ElementMapperUsingSubMap extends ElementMapper { 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/lazyload_common_property/GrandFatherMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.lazyload_common_property; 17 | 18 | public interface GrandFatherMapper { 19 | GrandFather selectById(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/ognlstatic/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.ognlstatic; 17 | 18 | public interface Mapper { 19 | 20 | User getUserStatic(Integer id); 21 | 22 | User getUserIfNode(String id); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/typehandlerinjection/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.typehandlerinjection; 17 | 18 | import java.util.List; 19 | 20 | public interface Mapper { 21 | 22 | List getUsers(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/ResultMapReferencePersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface ResultMapReferencePersonMapper { 19 | Pet selectPet(Integer id); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/dml_return_types/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2023 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(128) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/enum_interface_type_handler/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | color int 22 | ); 23 | 24 | insert into users (id, color) values (1, 2); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/global_variables/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/hashmaptypehandler/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/enum_with_method/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.enum_with_method; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | void insertUser(User user); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/multipleiterates/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.multipleiterates; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | void insertUser(User user); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/PersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface PersonMapper { 19 | Person select(Integer id); 20 | 21 | Pet selectPet(Integer id); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/localtime/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table records if exists; 18 | 19 | create table records ( 20 | id int, 21 | t time(9) 22 | ); 23 | 24 | insert into records (id, t) values 25 | (1, '11:22:33.123456789'); 26 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/propertiesinmapperfiles/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values(1, 'User1'); 25 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/mapping/StatementType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.mapping; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public enum StatementType { 22 | 23 | STATEMENT, 24 | 25 | PREPARED, 26 | 27 | CALLABLE 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/cursor_nested/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.cursor_nested; 17 | 18 | import org.apache.ibatis.cursor.Cursor; 19 | 20 | public interface Mapper { 21 | 22 | Cursor getAllUsers(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/deferload_common_property/ChildMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.deferload_common_property; 17 | 18 | import java.util.List; 19 | 20 | public interface ChildMapper { 21 | List selectAll(); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/flush_statement_npe/PersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.flush_statement_npe; 17 | 18 | public interface PersonMapper { 19 | Person selectById(int id); 20 | 21 | void update(Person person); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/orphan_result_maps/NestedCollectionMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.orphan_result_maps; 17 | 18 | public interface NestedCollectionMapper { 19 | 20 | Blog selectBlogWithPosts(int blogId); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/resultmapwithassociationstest/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.resultmapwithassociationstest; 17 | 18 | import java.util.List; 19 | 20 | public interface Mapper { 21 | List findAll(); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/ParameterMapReferencePersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface ParameterMapReferencePersonMapper { 19 | Person select(Person person); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/handle_by_jdbc_type/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table bools if exists; 18 | 19 | create table bools ( 20 | id int, 21 | b1 int, 22 | b2 char(1) 23 | ); 24 | 25 | insert into bools (id, b1, b2) values(1, 1, 'T'); 26 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/mapping/DefaultDatabaseIdProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.mapping; 17 | 18 | /** 19 | * @author Eduardo Macarron 20 | */ 21 | @Deprecated 22 | public class DefaultDatabaseIdProvider extends VendorDatabaseIdProvider { 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/domain/misc/generics/GenericSubclass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.domain.misc.generics; 17 | 18 | public abstract class GenericSubclass extends GenericAbstract { 19 | @Override 20 | public abstract Long getId(); 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/autodiscover/aliases/DummyTypeAlias.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.autodiscover.aliases; 17 | 18 | import org.apache.ibatis.type.Alias; 19 | 20 | @Alias("testAlias") 21 | public class DummyTypeAlias { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/column_forwarding/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.column_forwarding; 17 | 18 | import org.apache.ibatis.annotations.Param; 19 | 20 | public interface Mapper { 21 | User getUser(@Param("id") int id); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/mapper_extend/GrandpaMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.mapper_extend; 17 | 18 | public interface GrandpaMapper { 19 | 20 | User getUserByName(String name); 21 | 22 | User noMappedStatement(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/ognlstatic/StaticClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.ognlstatic; 17 | 18 | public final class StaticClass { 19 | 20 | public static String value = "User1"; 21 | 22 | private StaticClass() { 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/orphan_result_maps/SeparateCollectionMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.orphan_result_maps; 17 | 18 | public interface SeparateCollectionMapper { 19 | 20 | Blog selectBlogWithPosts(int blogId); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/SameIdPersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface SameIdPersonMapper { 19 | Person select(Integer id); 20 | 21 | Pet selectPet(Integer id); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/resolution/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values 25 | (1, 'User1'), 26 | (2, 'User2'); 27 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/builder/CustomReflectorFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.builder; 17 | 18 | import org.apache.ibatis.reflection.DefaultReflectorFactory; 19 | 20 | public class CustomReflectorFactory extends DefaultReflectorFactory { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/map_class_name_conflict/PersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.map_class_name_conflict; 17 | 18 | public interface PersonMapper { 19 | 20 | Person get(Long id); 21 | 22 | void insert(Person person); 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/no_result_type_map/ParentMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.no_result_type_map; 17 | 18 | import java.util.List; 19 | 20 | public interface ParentMapper { 21 | 22 | List getAllUsersInParent(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/null_associations/create-schema-mysql.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | CREATE TABLE FOO ( 18 | F_FIELD1 BIGINT NOT NULL, 19 | F_FIELD2_FIELD1 BIGINT, 20 | F_FIELD2_FIELD2 BIGINT, 21 | F_FIELD2_FIELD3 BIGINT, 22 | F_FIELD3 BOOLEAN NOT NULL 23 | ); 24 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/jdbc/SQL.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.jdbc; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public class SQL extends AbstractSQL { 22 | 23 | @Override 24 | public SQL getSelf() { 25 | return this; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/session/ResultHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.session; 17 | 18 | /** 19 | * @author Clinton Begin 20 | */ 21 | public interface ResultHandler { 22 | 23 | void handleResult(ResultContext resultContext); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/auto_type_from_non_ambiguous_constructor/Account.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2025 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.auto_type_from_non_ambiguous_constructor; 17 | 18 | public record Account(long accountId, String accountName, String accountType) { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/batch_test/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.batch_test; 17 | 18 | public interface Mapper { 19 | 20 | User getUser(Integer id); 21 | 22 | Dept getDept(Integer id); 23 | 24 | void insertUser(User user); 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/extends_with_constructor/StudentMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.extends_with_constructor; 17 | 18 | import java.util.List; 19 | 20 | public interface StudentMapper { 21 | List selectAllWithTeacher(); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/mapper_type_parameter/PersonListMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.mapper_type_parameter; 17 | 18 | import java.util.List; 19 | 20 | public interface PersonListMapper extends BaseMapper, Integer> { 21 | } 22 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/optional_on_mapper_method/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values 25 | (1, 'User1'), (2, 'User2'); 26 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/domain/blog/Section.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.domain.blog; 17 | 18 | import java.io.Serializable; 19 | 20 | public enum Section implements Serializable { 21 | NEWS, 22 | 23 | VIDEOS, 24 | 25 | IMAGES, 26 | 27 | PODCASTS 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/constructor_automapping/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.constructor_automapping; 17 | 18 | import java.util.List; 19 | 20 | public interface Mapper { 21 | 22 | List
nestedConstructorAutomapping(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/resolution/deepresultmap/MapperA.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.resolution.deepresultmap; 17 | 18 | import org.apache.ibatis.submitted.resolution.User; 19 | 20 | public interface MapperA { 21 | User getUser(Integer id); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/ReverseIncludePersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface ReverseIncludePersonMapper { 19 | Person select(Integer id); 20 | 21 | Pet selectPet(Integer id); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/param_name_resolve/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values (1, 'User1'), (2, 'User2'), (3, 'User3'); 25 | -------------------------------------------------------------------------------- /src/main/java/org/apache/ibatis/logging/log4j/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * logger using Log4J feature. 18 | * 19 | * @deprecated Since 3.5.9 - See https://github.com/mybatis/mybatis-3/issues/1223. This package will remove future. 20 | */ 21 | package org.apache.ibatis.logging.log4j; 22 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/enumtypehandler_on_annotation/Employee.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.enumtypehandler_on_annotation; 17 | 18 | /** 19 | * @since #444 20 | * 21 | * @author Kazuki Shimizu 22 | */ 23 | public class Employee extends Person { 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/lazyload_proxyfactory_comparison/Owned.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.lazyload_proxyfactory_comparison; 17 | 18 | public interface Owned { 19 | OWNERTYPE getOwner(); 20 | 21 | void setOwner(OWNERTYPE owner); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/null_associations/FooMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.null_associations; 17 | 18 | public interface FooMapper { 19 | 20 | void insertFoo(Foo foo); 21 | 22 | Foo selectFoo(); 23 | 24 | int deleteAllFoo(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/MultipleIncludePersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface MultipleIncludePersonMapper { 19 | Person select(Integer id); 20 | 21 | Pet selectPet(Integer id); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/named_constructor_args/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20), 22 | team int 23 | ); 24 | 25 | insert into users (id, name, team) values 26 | (1, 'User1', 99); 27 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/result_handler_type/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table if exists person; 18 | create table person (id int, name varchar(32)); 19 | 20 | insert into person (id, name) values (1, 'John'); 21 | insert into person (id, name) values (2, 'Rebecca'); 22 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/typehandlerinjection/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20), 22 | state int 23 | ); 24 | 25 | insert into users (id, name, state) values(1, 'Inactive', 0); 26 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/use_actual_param_name/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id int, 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values 25 | (1, 'User1'), (2, 'User2'), (3, 'User3'); 26 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/uuid_test/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | 19 | create table users ( 20 | id varchar(36), 21 | name varchar(20) 22 | ); 23 | 24 | insert into users (id, name) values('38400000-8cf0-11bd-b23e-10b96e4ef00d', 'User1'); 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/auto_type_from_non_ambiguous_constructor/FailingMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2025 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.auto_type_from_non_ambiguous_constructor; 17 | 18 | public interface FailingMapper { 19 | 20 | Account1 getAccountAmbiguous(long id); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/multiple_discriminator/PersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.multiple_discriminator; 17 | 18 | public interface PersonMapper { 19 | 20 | Person get(Long id); 21 | 22 | Person get2(Long id); 23 | 24 | Person getLoop(); 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/nested_query_cache/AuthorMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.nested_query_cache; 17 | 18 | import org.apache.ibatis.domain.blog.Author; 19 | 20 | public interface AuthorMapper { 21 | 22 | Author selectAuthor(int id); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/overwritingproperties/FooMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.overwritingproperties; 17 | 18 | public interface FooMapper { 19 | 20 | void insertFoo(Foo foo); 21 | 22 | Foo selectFoo(); 23 | 24 | int deleteAllFoo(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/plugin/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.plugin; 17 | 18 | import org.apache.ibatis.annotations.Select; 19 | 20 | public interface Mapper { 21 | 22 | @Select("select name from users where id = #{id}") 23 | String selectNameById(Integer id); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/choosewhen/ChooseWhenMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2025 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.choosewhen; 17 | 18 | import java.util.List; 19 | import java.util.Map; 20 | 21 | public interface ChooseWhenMapper { 22 | List selectUser(Map param); 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/heavy_initial_load/ThingMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.heavy_initial_load; 17 | 18 | import org.apache.ibatis.annotations.Param; 19 | 20 | public interface ThingMapper { 21 | 22 | Thing selectByCode(@Param("code") Code aCode); 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/parent_childs/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.parent_childs; 17 | 18 | import java.util.List; 19 | 20 | public interface Mapper { 21 | 22 | List getParents(); 23 | 24 | List getParentsWithConstructor(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/parent_reference_3level/Mapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.parent_reference_3level; 17 | 18 | public interface Mapper { 19 | 20 | Blog selectBlogByPrimaryKey(int aId); 21 | 22 | Blog selectBlogByPrimaryKeyColumnPrefix(int aId); 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/MultipleCrossIncludePersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface MultipleCrossIncludePersonMapper { 19 | Person select(Integer id); 20 | 21 | Pet selectPet(Integer id); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/batch_keys/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | drop table users if exists; 18 | drop table users2 if exists; 19 | 20 | create table users ( 21 | id int, 22 | name varchar(16) 23 | ); 24 | 25 | create table users2 ( 26 | id int IDENTITY, 27 | name varchar(16) 28 | ); 29 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/dynsql/CustomUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.dynsql; 17 | 18 | public final class CustomUtil { 19 | public static String esc(final String s) { 20 | return s.replace("'", "''"); 21 | } 22 | 23 | private CustomUtil() { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/selectkey/SqlProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.selectkey; 17 | 18 | public class SqlProvider { 19 | 20 | public String insertTable3_2(Name name) { 21 | return "insert into table3 (id, name) values(#{nameId}, #{name})"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/org/apache/ibatis/submitted/xml_external_ref/MultipleReverseIncludePersonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.ibatis.submitted.xml_external_ref; 17 | 18 | public interface MultipleReverseIncludePersonMapper { 19 | Person select(Integer id); 20 | 21 | Pet selectPet(Integer id); 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/org/apache/ibatis/submitted/extend/CreateDB.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright 2009-2022 the original author or authors. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- https://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | -- WARNING: this file MUST be saved in UTF-8 18 | create table names ( 19 | id int, 20 | firstName varchar(20), 21 | lastName varchar(20) 22 | ); 23 | 24 | insert into names (id, firstName, lastName) values(1, 'first', 'last'); 25 | --------------------------------------------------------------------------------