Showing preview only (1,777K chars total). Download the full file or copy to clipboard to get everything.
Repository: abel533/Mapper
Branch: master
Commit: 8568b9ad7317
Files: 502
Total size: 1.6 MB
Directory structure:
gitextract_5zdklcjy/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── all/
│ ├── README.md
│ ├── dependencies/
│ │ ├── README.md
│ │ └── pom.xml
│ ├── mapper/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ └── ApiInfo.java
│ └── pom.xml
├── base/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ ├── common/
│ │ │ ├── BaseMapper.java
│ │ │ ├── ConditionMapper.java
│ │ │ ├── ExampleMapper.java
│ │ │ ├── IdsMapper.java
│ │ │ ├── Mapper.java
│ │ │ ├── Marker.java
│ │ │ ├── MySqlMapper.java
│ │ │ ├── RowBoundsMapper.java
│ │ │ ├── SaveMapper.java
│ │ │ ├── SqlServerMapper.java
│ │ │ ├── base/
│ │ │ │ ├── BaseDeleteMapper.java
│ │ │ │ ├── BaseInsertMapper.java
│ │ │ │ ├── BaseSelectMapper.java
│ │ │ │ ├── BaseUpdateMapper.java
│ │ │ │ ├── delete/
│ │ │ │ │ ├── DeleteByPrimaryKeyMapper.java
│ │ │ │ │ └── DeleteMapper.java
│ │ │ │ ├── insert/
│ │ │ │ │ ├── InsertMapper.java
│ │ │ │ │ └── InsertSelectiveMapper.java
│ │ │ │ ├── select/
│ │ │ │ │ ├── ExistsWithPrimaryKeyMapper.java
│ │ │ │ │ ├── SelectAllMapper.java
│ │ │ │ │ ├── SelectByPrimaryKeyMapper.java
│ │ │ │ │ ├── SelectCountMapper.java
│ │ │ │ │ ├── SelectMapper.java
│ │ │ │ │ └── SelectOneMapper.java
│ │ │ │ └── update/
│ │ │ │ ├── UpdateByPrimaryKeyMapper.java
│ │ │ │ └── UpdateByPrimaryKeySelectiveMapper.java
│ │ │ ├── condition/
│ │ │ │ ├── DeleteByConditionMapper.java
│ │ │ │ ├── SelectByConditionMapper.java
│ │ │ │ ├── SelectCountByConditionMapper.java
│ │ │ │ ├── UpdateByConditionMapper.java
│ │ │ │ └── UpdateByConditionSelectiveMapper.java
│ │ │ ├── example/
│ │ │ │ ├── DeleteByExampleMapper.java
│ │ │ │ ├── SelectByExampleMapper.java
│ │ │ │ ├── SelectCountByExampleMapper.java
│ │ │ │ ├── SelectOneByExampleMapper.java
│ │ │ │ ├── UpdateByExampleMapper.java
│ │ │ │ └── UpdateByExampleSelectiveMapper.java
│ │ │ ├── ids/
│ │ │ │ ├── DeleteByIdsMapper.java
│ │ │ │ └── SelectByIdsMapper.java
│ │ │ ├── progressive/
│ │ │ │ └── ProgressiveMapper.java
│ │ │ ├── rowbounds/
│ │ │ │ ├── SelectByConditionRowBoundsMapper.java
│ │ │ │ ├── SelectByExampleRowBoundsMapper.java
│ │ │ │ └── SelectRowBoundsMapper.java
│ │ │ ├── special/
│ │ │ │ ├── InsertListMapper.java
│ │ │ │ └── InsertUseGeneratedKeysMapper.java
│ │ │ └── sqlserver/
│ │ │ ├── InsertMapper.java
│ │ │ └── InsertSelectiveMapper.java
│ │ └── provider/
│ │ ├── ConditionProvider.java
│ │ ├── ExampleProvider.java
│ │ ├── IdsProvider.java
│ │ ├── SaveProvider.java
│ │ ├── SpecialProvider.java
│ │ ├── SqlServerProvider.java
│ │ └── base/
│ │ ├── BaseDeleteProvider.java
│ │ ├── BaseInsertProvider.java
│ │ ├── BaseSelectProvider.java
│ │ └── BaseUpdateProvider.java
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ ├── base/
│ │ │ ├── BaseTest.java
│ │ │ ├── Country.java
│ │ │ ├── CountryMapper.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── delete/
│ │ │ │ ├── DeleteByPrimaryKeyMapperTest.java
│ │ │ │ ├── SafeDeleteByFieldTest.java
│ │ │ │ └── SafeDeleteByMethodTest.java
│ │ │ ├── genid/
│ │ │ │ ├── Country.java
│ │ │ │ ├── CountryMapper.java
│ │ │ │ ├── CreateDB.sql
│ │ │ │ ├── InsertGenIdTest.java
│ │ │ │ ├── SimpleGenId.java
│ │ │ │ ├── UUIdGenId.java
│ │ │ │ ├── User.java
│ │ │ │ ├── UserMapper.java
│ │ │ │ └── mybatis-config.xml
│ │ │ ├── mybatis-config.xml
│ │ │ └── update/
│ │ │ ├── SafeUpdateByFieldTest.java
│ │ │ └── SafeUpdateByMethodTest.java
│ │ ├── cache/
│ │ │ ├── CacheTest.java
│ │ │ ├── CountryCacheMapper.java
│ │ │ ├── CountryCacheRefMapper.java
│ │ │ ├── CountryCacheRefMapper.xml
│ │ │ ├── CountryCacheWithXmlMapper.java
│ │ │ ├── CountryCacheWithXmlMapper.xml
│ │ │ └── mybatis-config-cache.xml
│ │ ├── defaultenumtypehandler/
│ │ │ ├── CreateDB.sql
│ │ │ ├── DefaultEnumTypeHandlerTest.java
│ │ │ ├── Dict.java
│ │ │ ├── DictTypeHandler.java
│ │ │ ├── LockDictEnum.java
│ │ │ ├── StateDictEnum.java
│ │ │ ├── User.java
│ │ │ ├── UserMapper.java
│ │ │ └── mybatis-config-defaultenumtypehandler.xml
│ │ ├── entity/
│ │ │ └── model/
│ │ │ └── CountryExample.java
│ │ ├── generatedvalue/
│ │ │ ├── CreateDB.sql
│ │ │ ├── GeneratedValueTest.java
│ │ │ ├── UserAutoIncrement.java
│ │ │ ├── UserAutoIncrementIdentity.java
│ │ │ ├── UserAutoIncrementIdentityMapper.java
│ │ │ ├── UserAutoIncrementMapper.java
│ │ │ ├── UserSqlAfter.java
│ │ │ ├── UserSqlAfterMapper.java
│ │ │ └── mybatis-config-keysql-mysql.xml
│ │ ├── helper/
│ │ │ ├── CamelCaseTest.java
│ │ │ ├── FieldHelperTest.java
│ │ │ ├── FieldTest.java
│ │ │ └── MultipleMapperProviderTest.java
│ │ ├── hsqldb/
│ │ │ ├── HsqldbMapper.java
│ │ │ └── HsqldbProvider.java
│ │ ├── issues/
│ │ │ ├── _216_datetime/
│ │ │ │ ├── CreateDB.sql
│ │ │ │ ├── DateTimeTest.java
│ │ │ │ ├── TimeModel.java
│ │ │ │ ├── TimeModel2.java
│ │ │ │ ├── TimeModel2Mapper.java
│ │ │ │ ├── TimeModel3.java
│ │ │ │ ├── TimeModel3Mapper.java
│ │ │ │ ├── TimeModelMapper.java
│ │ │ │ └── mybatis-config-timestamp.xml
│ │ │ └── package-info.java
│ │ ├── keysql/
│ │ │ ├── CreateDB.sql
│ │ │ ├── KeySqlTest.java
│ │ │ ├── UserAutoIncrement.java
│ │ │ ├── UserAutoIncrementIdentity.java
│ │ │ ├── UserAutoIncrementIdentityMapper.java
│ │ │ ├── UserAutoIncrementMapper.java
│ │ │ ├── UserSqlAfter.java
│ │ │ ├── UserSqlAfterMapper.java
│ │ │ ├── UserSqlBefore.java
│ │ │ ├── UserSqlBeforeMapper.java
│ │ │ └── mybatis-config-keysql-mysql.xml
│ │ ├── mapper/
│ │ │ ├── CachedCountryMapper.java
│ │ │ ├── Country2Mapper.java
│ │ │ ├── CountryIMapper.java
│ │ │ ├── CountryJDBCMapper.java
│ │ │ ├── CountryMapper.java
│ │ │ ├── CountryMultipleMapper.java
│ │ │ ├── CountryTMapper.java
│ │ │ ├── CountryVersionMapper.java
│ │ │ ├── JDBCMapper.java
│ │ │ ├── MultipleCommonMapper.java
│ │ │ ├── MybatisHelper.java
│ │ │ ├── TbUserLogicDeleteMapper.java
│ │ │ ├── TbUserMapper.java
│ │ │ ├── UserInfoAbleMapper.java
│ │ │ ├── UserInfoMapMapper.java
│ │ │ ├── UserInfoMapper.java
│ │ │ ├── UserLogin2Mapper.java
│ │ │ └── UserLoginMapper.java
│ │ ├── model/
│ │ │ ├── BaseLogicDelete.java
│ │ │ ├── Country.java
│ │ │ ├── Country2.java
│ │ │ ├── CountryExample.java
│ │ │ ├── CountryI.java
│ │ │ ├── CountryJDBC.java
│ │ │ ├── CountryT.java
│ │ │ ├── CountryVersion.java
│ │ │ ├── Entity.java
│ │ │ ├── TbUser.java
│ │ │ ├── TbUserLogicDelete.java
│ │ │ ├── UserInfo.java
│ │ │ ├── UserInfoAble.java
│ │ │ ├── UserInfoMap.java
│ │ │ ├── UserLogin.java
│ │ │ ├── UserLogin2.java
│ │ │ ├── UserLogin2Key.java
│ │ │ └── UserParent.java
│ │ ├── rawresultmap/
│ │ │ ├── CreateDB.sql
│ │ │ ├── RawResultMapTest.java
│ │ │ ├── User.java
│ │ │ ├── UserMapper.java
│ │ │ ├── UserMapper.xml
│ │ │ └── mybatis-config-rawresultmap.xml
│ │ ├── test/
│ │ │ ├── able/
│ │ │ │ └── TestBasicAble.java
│ │ │ ├── country/
│ │ │ │ ├── TestCache.java
│ │ │ │ ├── TestDeleteByPrimaryKey.java
│ │ │ │ ├── TestExistsWithPrimaryKey.java
│ │ │ │ ├── TestInsert.java
│ │ │ │ ├── TestInsertSelective.java
│ │ │ │ ├── TestSelect.java
│ │ │ │ ├── TestSelectAll.java
│ │ │ │ ├── TestSelectByPrimaryKey.java
│ │ │ │ ├── TestSelectCount.java
│ │ │ │ ├── TestSelectOne.java
│ │ │ │ ├── TestUpdateByPrimaryKey.java
│ │ │ │ └── TestUpdateByPrimaryKeySelective.java
│ │ │ ├── country2/
│ │ │ │ ├── TestInsert.java
│ │ │ │ └── TestInsertSelective.java
│ │ │ ├── example/
│ │ │ │ ├── TestDeleteByExample.java
│ │ │ │ ├── TestExampleBuilder.java
│ │ │ │ ├── TestSelectByExample.java
│ │ │ │ ├── TestSelectCountByExample.java
│ │ │ │ ├── TestSelectOneByExample.java
│ │ │ │ ├── TestUpdateByExample.java
│ │ │ │ └── TestUpdateByExampleSelective.java
│ │ │ ├── identity/
│ │ │ │ └── TestIndentity.java
│ │ │ ├── ids/
│ │ │ │ └── TestIds.java
│ │ │ ├── jdbc/
│ │ │ │ └── TestJDBC.java
│ │ │ ├── logic/
│ │ │ │ └── TestLogicDelete.java
│ │ │ ├── mysql/
│ │ │ │ └── TestMysql.java
│ │ │ ├── othres/
│ │ │ │ ├── StyleTest.java
│ │ │ │ └── TestDelimiter.java
│ │ │ ├── rowbounds/
│ │ │ │ └── TestSelectRowBounds.java
│ │ │ ├── transientc/
│ │ │ │ └── TestTransient.java
│ │ │ └── user/
│ │ │ ├── TestBasic.java
│ │ │ ├── TestDelete.java
│ │ │ ├── TestMap.java
│ │ │ ├── TestUserLogin.java
│ │ │ └── TestUserLogin2.java
│ │ ├── typehandler/
│ │ │ ├── Address.java
│ │ │ ├── AddressTypeHandler.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── StateEnum.java
│ │ │ ├── StateEnumTypeHandler.java
│ │ │ ├── TypeHandlerTest.java
│ │ │ ├── TypeHandlerTest2.java
│ │ │ ├── User.java
│ │ │ ├── User2.java
│ │ │ ├── User2Mapper.java
│ │ │ ├── UserMapper.java
│ │ │ ├── mybatis-config-typehandler.xml
│ │ │ └── mybatis-config-typehandler2.xml
│ │ └── version/
│ │ ├── CreateDB.sql
│ │ ├── UserInt.java
│ │ ├── UserIntMapper.java
│ │ ├── UserTimestamp.java
│ │ ├── UserTimestampMapper.java
│ │ ├── VersionTest.java
│ │ └── mybatis-config-version.xml
│ └── resources/
│ ├── CachedCountryMapper.xml
│ ├── CreateDB.sql
│ ├── logback.xml
│ └── mybatis-java.xml
├── core/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ ├── LogicDeleteException.java
│ │ ├── MapperException.java
│ │ ├── annotation/
│ │ │ ├── ColumnType.java
│ │ │ ├── KeySql.java
│ │ │ ├── LogicDelete.java
│ │ │ ├── NameStyle.java
│ │ │ ├── Order.java
│ │ │ ├── RegisterMapper.java
│ │ │ └── Version.java
│ │ ├── code/
│ │ │ ├── IdentityDialect.java
│ │ │ ├── ORDER.java
│ │ │ └── Style.java
│ │ ├── entity/
│ │ │ ├── Condition.java
│ │ │ ├── Config.java
│ │ │ ├── EntityColumn.java
│ │ │ ├── EntityField.java
│ │ │ ├── EntityTable.java
│ │ │ ├── Example.java
│ │ │ ├── IDynamicTableName.java
│ │ │ └── SqlsCriteria.java
│ │ ├── genid/
│ │ │ ├── GenId.java
│ │ │ └── GenIdUtil.java
│ │ ├── gensql/
│ │ │ └── GenSql.java
│ │ ├── mapperhelper/
│ │ │ ├── EntityHelper.java
│ │ │ ├── FieldHelper.java
│ │ │ ├── MapperHelper.java
│ │ │ ├── MapperTemplate.java
│ │ │ ├── SelectKeyGenerator.java
│ │ │ ├── SelectKeyHelper.java
│ │ │ ├── SqlHelper.java
│ │ │ └── resolve/
│ │ │ ├── DefaultEntityResolve.java
│ │ │ └── EntityResolve.java
│ │ ├── provider/
│ │ │ └── EmptyProvider.java
│ │ ├── session/
│ │ │ └── Configuration.java
│ │ ├── util/
│ │ │ ├── Assert.java
│ │ │ ├── MetaObjectUtil.java
│ │ │ ├── MsUtil.java
│ │ │ ├── OGNL.java
│ │ │ ├── SimpleTypeUtil.java
│ │ │ ├── SqlReservedWords.java
│ │ │ ├── Sqls.java
│ │ │ └── StringUtil.java
│ │ └── version/
│ │ ├── DefaultNextVersion.java
│ │ ├── NextVersion.java
│ │ ├── VersionException.java
│ │ └── VersionUtil.java
│ └── test/
│ └── java/
│ └── tk/
│ └── mybatis/
│ └── mapper/
│ ├── annotation/
│ │ ├── ColumnTest.java
│ │ ├── ColumnTypeTest.java
│ │ ├── IdTest.java
│ │ ├── KeySqlTest.java
│ │ ├── NameStyleTest.java
│ │ ├── RegisterMapperTest.java
│ │ ├── TableTest.java
│ │ └── VersionTest.java
│ ├── mapperhelper/
│ │ ├── ComplexEntityTest.java
│ │ ├── FieldHelperTest.java
│ │ └── SqlHelperTest.java
│ └── util/
│ └── StringUtilTest.java
├── extra/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ └── additional/
│ │ ├── aggregation/
│ │ │ ├── AggregateCondition.java
│ │ │ ├── AggregateType.java
│ │ │ ├── AggregationMapper.java
│ │ │ └── AggregationProvider.java
│ │ ├── delete/
│ │ │ ├── DeleteByPropertyMapper.java
│ │ │ └── DeletePropertyProvider.java
│ │ ├── dialect/
│ │ │ └── oracle/
│ │ │ ├── InsertListMapper.java
│ │ │ ├── OracleMapper.java
│ │ │ └── OracleProvider.java
│ │ ├── idlist/
│ │ │ ├── DeleteByIdListMapper.java
│ │ │ ├── IdListMapper.java
│ │ │ ├── IdListProvider.java
│ │ │ └── SelectByIdListMapper.java
│ │ ├── insert/
│ │ │ ├── InsertListMapper.java
│ │ │ └── InsertListProvider.java
│ │ ├── select/
│ │ │ ├── SelectByPropertyMapper.java
│ │ │ ├── SelectPropertyProvider.java
│ │ │ ├── SelectSpecifyColumnsMapper.java
│ │ │ └── SelectSpecifyColumnsProvider.java
│ │ ├── update/
│ │ │ ├── batch/
│ │ │ │ ├── BatchUpdateMapper.java
│ │ │ │ ├── BatchUpdateProvider.java
│ │ │ │ └── BatchUpdateSelectiveMapper.java
│ │ │ ├── differ/
│ │ │ │ ├── UpdateByDifferMapper.java
│ │ │ │ └── UpdateByDifferProvider.java
│ │ │ └── force/
│ │ │ ├── UpdateByPrimaryKeySelectiveForceMapper.java
│ │ │ └── UpdateByPrimaryKeySelectiveForceProvider.java
│ │ └── upsert/
│ │ ├── BatchUpsertMapper.java
│ │ ├── BatchUpsertProvider.java
│ │ ├── UpsertMapper.java
│ │ └── UpsertProvider.java
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ └── additional/
│ │ ├── BaseTest.java
│ │ ├── Country.java
│ │ ├── CountryMapper.java
│ │ ├── CreateDB.sql
│ │ ├── aggregation/
│ │ │ ├── AggregationHumpTest.java
│ │ │ ├── AggregationMapperTest.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── User.java
│ │ │ ├── UserHump.java
│ │ │ ├── UserHumpMapper.java
│ │ │ ├── UserMapper.java
│ │ │ └── mybatis-config.xml
│ │ ├── delete/
│ │ │ ├── Course.java
│ │ │ ├── CourseMapper.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── DeleteByPropertyMapperTest.java
│ │ │ └── mybatis-config.xml
│ │ ├── dialect/
│ │ │ └── oracle/
│ │ │ ├── CreateDB.sql
│ │ │ ├── DemoCountry.java
│ │ │ ├── DemoCountryMapper.java
│ │ │ ├── OracleTest.java
│ │ │ └── mybatis-config.xml
│ │ ├── idlist/
│ │ │ ├── ABaseMapper.java
│ │ │ ├── CountryMapper.java
│ │ │ ├── IdListMapperTest.java
│ │ │ └── mybatis-config.xml
│ │ ├── insertlist/
│ │ │ ├── CreateDB.sql
│ │ │ ├── InsertListMapperTest.java
│ │ │ ├── UUIdGenId.java
│ │ │ ├── User.java
│ │ │ ├── UserMapper.java
│ │ │ └── mybatis-config.xml
│ │ ├── mybatis-config.xml
│ │ ├── select/
│ │ │ ├── Book.java
│ │ │ ├── BookMapper.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── SelectByPropertyMapperTest.java
│ │ │ └── mybatis-config.xml
│ │ └── update/
│ │ ├── differ/
│ │ │ ├── CountryMapper.java
│ │ │ ├── UpdateByDifferMapperTest.java
│ │ │ └── mybatis-config.xml
│ │ └── force/
│ │ ├── CountryInt.java
│ │ ├── CountryIntMapper.java
│ │ ├── CreateDB.sql
│ │ ├── UpdateByPrimaryKeySelectiveForceTest.java
│ │ └── mybatis-config.xml
│ └── resources/
│ └── logback.xml
├── generator/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── tk/
│ │ │ └── mybatis/
│ │ │ └── mapper/
│ │ │ └── generator/
│ │ │ ├── FalseMethodPlugin.java
│ │ │ ├── MapperCommentGenerator.java
│ │ │ ├── MapperPlugin.java
│ │ │ ├── TemplateFilePlugin.java
│ │ │ ├── TkMyBatis3Impl.java
│ │ │ ├── TkMyBatis3SimpleImpl.java
│ │ │ ├── file/
│ │ │ │ ├── GenerateByListTemplateFile.java
│ │ │ │ └── GenerateByTemplateFile.java
│ │ │ ├── formatter/
│ │ │ │ ├── FreemarkerTemplateFormatter.java
│ │ │ │ ├── ListTemplateFormatter.java
│ │ │ │ └── TemplateFormatter.java
│ │ │ └── model/
│ │ │ ├── ColumnField.java
│ │ │ ├── TableClass.java
│ │ │ └── TableColumnBuilder.java
│ │ └── resources/
│ │ └── generator/
│ │ ├── mapper.ftl
│ │ ├── mapperXml.ftl
│ │ ├── test-all.ftl
│ │ └── test-one.ftl
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ └── generator/
│ │ └── Generator.java
│ └── resources/
│ ├── CreateDB.sql
│ └── generatorConfig.xml
├── pom.xml
├── solon-plugin/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── tk/
│ │ │ └── mybatis/
│ │ │ └── solon/
│ │ │ ├── TkMapperAdapterFactory.java
│ │ │ ├── TkMapperMybatisAdapter.java
│ │ │ └── XPluginImpl.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── solon/
│ │ └── mybatis-tkmapper-solon-plugin.properties
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── solon/
│ │ └── test/
│ │ ├── TkMapperTest.java
│ │ ├── conf/
│ │ │ └── TestConfig.java
│ │ ├── entity/
│ │ │ └── User.java
│ │ ├── mapper/
│ │ │ └── UserMapper.java
│ │ └── service/
│ │ └── TkMapperServiceTest.java
│ └── resources/
│ ├── app.yml
│ └── mapper/
│ └── UserMapper.xml
├── spring/
│ ├── README.md
│ ├── license.txt
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── spring/
│ │ ├── annotation/
│ │ │ ├── BaseProperties.java
│ │ │ ├── MapperScan.java
│ │ │ ├── MapperScannerRegistrar.java
│ │ │ └── MapperScans.java
│ │ └── mapper/
│ │ ├── ClassPathMapperScanner.java
│ │ ├── MapperFactoryBean.java
│ │ ├── MapperScannerConfigurer.java
│ │ └── SpringBootBindUtil.java
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ ├── annotation/
│ │ │ ├── Country.java
│ │ │ ├── CountryMapper.java
│ │ │ └── SpringAnnotationTest.java
│ │ ├── configuration/
│ │ │ ├── Country.java
│ │ │ ├── CountryMapper.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── SpringConfigTest.java
│ │ │ └── spring.xml
│ │ └── xml/
│ │ ├── Country.java
│ │ ├── CountryMapper.java
│ │ ├── CreateDB.sql
│ │ ├── SpringXmlTest.java
│ │ └── spring.xml
│ └── resources/
│ └── logback.xml
├── spring-boot-starter/
│ ├── README.md
│ ├── mapper-spring-boot-autoconfigure/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── tk/
│ │ │ └── mybatis/
│ │ │ └── mapper/
│ │ │ └── autoconfigure/
│ │ │ ├── ConfigurationCustomizer.java
│ │ │ ├── MapperAutoConfiguration.java
│ │ │ ├── MapperCacheDisabler.java
│ │ │ ├── MapperProperties.java
│ │ │ ├── MybatisDependsOnDatabaseInitializationDetector.java
│ │ │ ├── MybatisLanguageDriverAutoConfiguration.java
│ │ │ ├── MybatisProperties.java
│ │ │ ├── SpringBootVFS.java
│ │ │ └── SqlSessionFactoryBeanCustomizer.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── spring/
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
│ ├── mapper-spring-boot-samples/
│ │ ├── mapper-spring-boot-sample-annotation/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── java/
│ │ │ │ └── tk/
│ │ │ │ └── mybatis/
│ │ │ │ └── sample/
│ │ │ │ ├── SampleMapperApplication.java
│ │ │ │ ├── domain/
│ │ │ │ │ └── Country.java
│ │ │ │ └── mapper/
│ │ │ │ └── CountryMapper.java
│ │ │ └── resources/
│ │ │ ├── application.properties
│ │ │ ├── import.sql
│ │ │ └── logback.xml
│ │ ├── mapper-spring-boot-sample-xml/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── java/
│ │ │ │ └── tk/
│ │ │ │ └── mybatis/
│ │ │ │ └── sample/
│ │ │ │ ├── SampleXmlApplication.java
│ │ │ │ ├── domain/
│ │ │ │ │ └── Country.java
│ │ │ │ └── mapper/
│ │ │ │ ├── BaseMapper.java
│ │ │ │ └── CountryMapper.java
│ │ │ └── resources/
│ │ │ ├── application.yml
│ │ │ ├── import.sql
│ │ │ ├── logback.xml
│ │ │ ├── mybatis-config.xml
│ │ │ └── tk/
│ │ │ └── mybatis/
│ │ │ └── sample/
│ │ │ └── mapper/
│ │ │ └── CountryMapper.xml
│ │ └── pom.xml
│ ├── mapper-spring-boot-starter/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── resources/
│ │ └── META-INF/
│ │ └── spring.provides
│ └── pom.xml
└── weekend/
├── README.md
├── pom.xml
└── src/
├── main/
│ └── java/
│ └── tk/
│ └── mybatis/
│ └── mapper/
│ └── weekend/
│ ├── Fn.java
│ ├── SqlCriteriaHelper.java
│ ├── Weekend.java
│ ├── WeekendCriteria.java
│ ├── WeekendSqls.java
│ ├── WeekendSqlsUtils.java
│ └── reflection/
│ ├── ReflectionOperationException.java
│ └── Reflections.java
└── test/
├── java/
│ └── tk/
│ └── mybatis/
│ └── mapper/
│ └── weekend/
│ ├── MybatisHelper.java
│ ├── SqlCriteriaHelperTest.java
│ ├── UserMapperTest.java
│ ├── WeekendSqlsTest.java
│ ├── WeekendSqlsUtilsTest.java
│ ├── entity/
│ │ ├── Country.java
│ │ └── User.java
│ └── mapper/
│ ├── CountryMapper.java
│ └── UserMapper.java
└── resources/
├── CreateDB.sql
├── logback.xml
└── mybatis-java.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: [ 'https://mybatis.io/donates.html' ] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/workflows/release.yml
================================================
name: Publish package to the Maven Central Repository
on:
push:
tags: [ "*" ]
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: central
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
- id: install-secret-key
name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish package
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
run: mvn --batch-mode --errors -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy
================================================
FILE: .github/workflows/test.yml
================================================
name: Maven test
on:
pull_request:
types: [ opened, reopened, edited ]
push:
branches: [ develop, master ]
permissions:
contents: read
jobs:
mvn_verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Run the Maven verify phase
run: mvn --batch-mode --update-snapshots test
================================================
FILE: .gitignore
================================================
# Maven #
target/
.flattened-pom.xml
# IDEA #
.idea/
*.iml
# Eclipse #
.settings/
.classpath
.project
================================================
FILE: .gitmodules
================================================
[submodule "wiki"]
path = wiki
url = https://github.com/abel533/Mapper.wiki.git
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2014-2017 abel533@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: README.md
================================================
# MyBatis 通用 Mapper6 来了🎉🎉🎉
[](https://maven-badges.herokuapp.com/maven-central/tk.mybatis/mapper)
通用Mapper都可以极大的方便开发人员。可以随意的按照自己的需要选择通用方法,还可以很方便的开发自己的通用方法。
极其方便的使用MyBatis单表的增删改查。
支持单表操作,不支持通用的多表联合查询。
## 版本匹配说明
不同分支支持不同的 Spring Boot 版本,请根据项目实际情况选择对应分支:
| 分支 | Spring Boot 版本 | JDK 版本 | Mapper 版本 |
|------|------------------|----------|-------------|
| master | Spring Boot 4.x | JDK 17+ | 6.0.0+ |
| 5.x | Spring Boot 3.x | JDK 17+ | 5.0.0 |
| 4.3.x | Spring Boot 2.x | JDK 8+ | 4.3.x |
## 基于 JDK 17 + Jakarta JPA 注解 + Spring Boot 4
配置完全兼容,需要使用新版本的 JPA 注解,同步更新(copy) mybatis-spring 4.0.0 和 mybatis-spring-boot-starter 4.0.0。
此次更新主要是依赖的更新,适配最新的 Spring Boot 4.0.2,提供更好的兼容性和稳定性。
```xml
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>6.0.0</version>
</dependency>
```
## 推荐新版本 mybatis-mapper
如果你要在新项目中使用,可以看看新版本的 mybatis-mapper,完全作为 mybatis 扩展存在,
不修改 mybatis, mybatis-spring, mybatis-spring-boot-starter 任何代码,不需要额外配置,可以快速上手。
- mybatis-mapper: https://github.com/mybatis-mapper/mapper
- mybatis-mapper 文档: https://mapper.mybatis.io
- [mybatis-mapper 快速入门](https://mapper.mybatis.io/docs/1.getting-started.html#%E4%BB%8B%E7%BB%8D)
## [**快速入门 - MyBatis 为什么需要通用 Mapper ?**](https://blog.csdn.net/isea533/article/details/83045335)
简介: 在早期项目文档中有过类似主题的内容,但是最近我自己看文档的时候发现一个问题,文档虽然很详细,但是并不适合初次接触的人。为了方便第一次听说,第一次尝试的开发人员了解通用 Mapper,补充此文档。
强烈建议初学者阅读本文,先从整体上了解 通用 Mapper,然后再通过下面的文档更深入的了解。
## [**通用 Mapper 进阶实例:为什么好久都没更新了?**](https://blog.csdn.net/isea533/article/details/104776347)
通过本文,希望读者能有收获,能根据自己的需要设计通用方法,不要只是为了偷懒将自己局限在已有的通用方法中。大而全的通用方法不一定适合自己,根据自己需要选择和设计的通用方法才更满足自己的需要。
## 项目文档
- [文档 - Gitee](https://gitee.com/free/Mapper/wikis/Home)
- [文档 - GitHub](https://github.com/abel533/Mapper/wiki)
- [JavaDoc](https://apidoc.gitee.com/free/Mapper/)
- [更新日志 - Gitee](https://gitee.com/free/Mapper/wikis/changelog)
- [更新日志 - GitHub](https://github.com/abel533/Mapper/wiki/changelog)
## 微信公众号
<img src="wx-mybatis.webp" width="250"/>
## 作者信息
MyBatis 工具网站:[https://mybatis.io](https://mybatis.io)
作者博客:http://blog.csdn.net/isea533 ,http://blog.mybatis.io
作者邮箱:abel533@gmail.com
推荐使用Mybatis分页插件:[PageHelper分页插件](https://github.com/pagehelper/Mybatis-PageHelper)
## 《MyBatis 从入门到精通》

### 简介
本书中从一个简单的 MyBatis 查询入手,搭建起学习 MyBatis 的基础开发环境。 通过全面的示例代码和测试讲解了在 MyBatis XML 方式和注解方式中进行增、删、改、查操作的基本用法,介绍了动态 SQL
在不同方面的应用以及在使用过程中的最佳实践方案。 针对 MyBatis 高级映射、存储过程和类型处理器提供了丰富的示例,通过自下而上的方法使读者更好地理解和掌握MyBatis 的高级用法,同时针对 MyBatis
的代码生成器提供了详细的配置介绍。 此外,本书还提供了缓存配置、插件开发、Spring、Spring Boot 集成的详细内容。 最后通过介绍 Git 和 GitHub 让读者了解MyBatis 开源项目,通过对 MyBatis
源码和测试用例的讲解让读者更好掌握 MyBatis。
### 购买地址:
- [京东](https://item.jd.com/12103309.html)
### 相关介绍
- CSDN博客:http://blog.csdn.net/isea533/article/details/73555400
- GitHub项目:https://github.com/mybatis-book/book
================================================
FILE: all/README.md
================================================
# Mybatis 通用 Mapper3 适配
为了帮助用户从通用 Mapper 3.x 过渡到 4.x 和以后的版本,增加本项目。
本项目下面提供了两个子模块,基于 Maven 依赖传递的 **dependencies** 和基于 maven-shade-plugin 打包为一个大 jar 包的 **mapper** 项目。
**并且本项目下面的 jar 的 Maven 为 tk.mybtis:mapper,也就是从 mapper 3.x 升级到 4.x 的时候可以只改版本号。**
================================================
FILE: all/dependencies/README.md
================================================
# Mybatis 通用 Mapper Jar 集成
[](https://maven-badges.herokuapp.com/maven-central/tk.mybatis/mapper-all-dependencies)
本项目默认集成了 mapper-core, mapper-extra, mapper-generator, mapper-spring, mapper-weekend 项目。
使用时,只需要添加 mapper-all 的依赖即可。
```xml
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-all-dependencies</artifactId>
<version>版本号</version>
</dependency>
```
引入后会自动引入其他依赖。
可以通过在 pom 中增加下面对应的属性来修改依赖的版本号:
```xml
<properties>
<mapper-core.version>4.0.0-SNAPSHOT</mapper-core.version>
<mapper-extra.version>1.0.0-SNAPSHOT</mapper-extra.version>
<mapper-spring.version>1.0.0-SNAPSHOT</mapper-spring.version>
<mapper-weekend.version>1.1.3-SNAPSHOT</mapper-weekend.version>
<mapper-generator.version>1.0.0-SNAPSHOT</mapper-generator.version>
</properties>
```
> 上面具体版本号只是示例,默认不需要自己设置。
================================================
FILE: all/dependencies/pom.xml
================================================
<!--
~ The MIT License (MIT)
~
~ Copyright (c) 2018 abel533@gmail.com
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-all</artifactId>
<version>${revision}</version>
</parent>
<artifactId>mapper-all-dependencies</artifactId>
<packaging>jar</packaging>
<name>dependencies</name>
<description>Mybatis 通用 Mapper Jar 集成</description>
<dependencies>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-core</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-base</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-extra</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-weekend</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-generator</artifactId>
</dependency>
</dependencies>
</project>
================================================
FILE: all/mapper/README.md
================================================
# Mybatis 通用 Mapper Jar 集成
[](https://maven-badges.herokuapp.com/maven-central/tk.mybatis/mapper)
本项目默认集成了 mapper-core, mapper-extra, mapper-generator, mapper-spring, mapper-weekend 项目。
使用时,只需要添加 mapper 的依赖即可。
```xml
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>版本号</version>
</dependency>
```
引入该依赖时不会引入传递依赖。
================================================
FILE: all/mapper/pom.xml
================================================
<!--
~ The MIT License (MIT)
~
~ Copyright (c) 2018 abel533@gmail.com
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-all</artifactId>
<version>${revision}</version>
</parent>
<artifactId>mapper</artifactId>
<packaging>jar</packaging>
<name>mapper</name>
<description>Mybatis 通用 Mapper Jar 集成</description>
<dependencies>
<!--必须依赖-->
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-base</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-extra</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-weekend</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-generator</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<createSourcesJar>true</createSourcesJar>
<artifactSet>
<includes>
<include>tk.mybatis:mapper-core</include>
<include>tk.mybatis:mapper-base</include>
<include>tk.mybatis:mapper-extra</include>
<include>tk.mybatis:mapper-spring</include>
<include>tk.mybatis:mapper-weekend</include>
<include>tk.mybatis:mapper-generator</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: all/mapper/src/main/java/tk/mybatis/mapper/ApiInfo.java
================================================
package tk.mybatis.mapper;
/**
* Java Doc 内容请通过各个独立项目进行查看
*
* @author liuzh
*/
public class ApiInfo {
}
================================================
FILE: all/pom.xml
================================================
<!--
~ The MIT License (MIT)
~
~ Copyright (c) 2018 abel533@gmail.com
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-modules</artifactId>
<version>${revision}</version>
</parent>
<artifactId>mapper-all</artifactId>
<packaging>pom</packaging>
<name>mapper-all</name>
<description>Mybatis 通用 Mapper3 适配</description>
<modules>
<module>mapper</module>
<module>dependencies</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-core</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-base</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-extra</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-weekend</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-generator</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>bom</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: base/README.md
================================================
# Mybatis 通用 Mapper 基础方法实现
[](https://maven-badges.herokuapp.com/maven-central/tk.mybatis/mapper-base)
================================================
FILE: base/pom.xml
================================================
<!--
~ The MIT License (MIT)
~
~ Copyright (c) 2014-2017 abel533@gmail.com
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-modules</artifactId>
<version>${revision}</version>
</parent>
<artifactId>mapper-base</artifactId>
<packaging>jar</packaging>
<name>mapper-base</name>
<description>Mybatis 通用 Mapper 基础方法实现</description>
<url>https://mybatis.io</url>
<dependencies>
<!--必须依赖-->
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-core</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<!--可选依赖-->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.33</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/BaseMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
import tk.mybatis.mapper.common.base.BaseDeleteMapper;
import tk.mybatis.mapper.common.base.BaseInsertMapper;
import tk.mybatis.mapper.common.base.BaseSelectMapper;
import tk.mybatis.mapper.common.base.BaseUpdateMapper;
/**
* 通用Mapper接口,其他接口继承该接口即可
* <p/>
* <p>这是一个例子,自己扩展时可以参考</p>
* <p/>
* <p>项目地址 : <a href="https://github.com/abel533/Mapper" target="_blank">https://github.com/abel533/Mapper</a></p>
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface BaseMapper<T> extends
BaseSelectMapper<T>,
BaseInsertMapper<T>,
BaseUpdateMapper<T>,
BaseDeleteMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/ConditionMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
import tk.mybatis.mapper.common.condition.*;
/**
* 通用Mapper接口,Condition查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface ConditionMapper<T> extends
SelectByConditionMapper<T>,
SelectCountByConditionMapper<T>,
DeleteByConditionMapper<T>,
UpdateByConditionMapper<T>,
UpdateByConditionSelectiveMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/ExampleMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
import tk.mybatis.mapper.common.example.*;
/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface ExampleMapper<T> extends
SelectByExampleMapper<T>,
SelectOneByExampleMapper<T>,
SelectCountByExampleMapper<T>,
DeleteByExampleMapper<T>,
UpdateByExampleMapper<T>,
UpdateByExampleSelectiveMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/IdsMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
import tk.mybatis.mapper.common.ids.DeleteByIdsMapper;
import tk.mybatis.mapper.common.ids.SelectByIdsMapper;
/**
* 通用Mapper接口,根据ids操作
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface IdsMapper<T> extends SelectByIdsMapper<T>, DeleteByIdsMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/Mapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
/**
* 通用Mapper接口,其他接口继承该接口即可
* <p/>
* <p>这是一个例子,自己扩展时可以参考</p>
* <p/>
* <p>项目地址 : <a href="https://github.com/abel533/Mapper" target="_blank">https://github.com/abel533/Mapper</a></p>
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface Mapper<T> extends
BaseMapper<T>,
ExampleMapper<T>,
RowBoundsMapper<T>,
SaveMapper<T>,
Marker {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/Marker.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
/**
* 标记接口,继承该接口的接口,在MapperScannerConfigurer#setMarkerInterface时,会自动注册到通用Mapper
*
* @author liuzh
* @since 3.2.2
*/
public interface Marker {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/MySqlMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
import tk.mybatis.mapper.common.special.InsertListMapper;
import tk.mybatis.mapper.common.special.InsertUseGeneratedKeysMapper;
/**
* 通用Mapper接口,MySql独有的通用方法
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface MySqlMapper<T> extends
InsertListMapper<T>,
InsertUseGeneratedKeysMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/RowBoundsMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
import tk.mybatis.mapper.common.rowbounds.SelectByExampleRowBoundsMapper;
import tk.mybatis.mapper.common.rowbounds.SelectRowBoundsMapper;
/**
* 通用Mapper接口,带RowBounds参数的查询
* <p/>
* 配合分页插件PageHelper可以实现物理分页
* <p/>
* PageHelper - http://git.oschina.net/free/Mybatis_PageHelper
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface RowBoundsMapper<T> extends
SelectByExampleRowBoundsMapper<T>,
SelectRowBoundsMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/SaveMapper.java
================================================
package tk.mybatis.mapper.common;
import org.apache.ibatis.annotations.InsertProvider;
import tk.mybatis.mapper.provider.SaveProvider;
/**
* 通用Mapper接口,保存
* <p>判断主键是否存在, 如果存在且不为空执行update语句,如果主键不存在或为空, 执行insert语句</p>
* Created by YangBin on 2020/5/12
* Copyright (c) 2020 杨斌 All rights reserved.
*/
public interface SaveMapper<T> {
/**
* 保存一个实体,如果实体的主键不为null则更新记录, 主键不存在或主键为null, 则插入记录
*
* @param record 不能为空
* @return
*/
@InsertProvider(type = SaveProvider.class, method = "dynamicSQL")
int save(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/SqlServerMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common;
import tk.mybatis.mapper.common.sqlserver.InsertMapper;
import tk.mybatis.mapper.common.sqlserver.InsertSelectiveMapper;
/**
* 通用Mapper接口,SqlServerMapper独有的通用方法
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SqlServerMapper<T> extends
InsertMapper<T>,
InsertSelectiveMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/BaseDeleteMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.common.base.delete.DeleteByPrimaryKeyMapper;
import tk.mybatis.mapper.common.base.delete.DeleteMapper;
/**
* 通用Mapper接口,基础删除
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface BaseDeleteMapper<T> extends
DeleteMapper<T>,
DeleteByPrimaryKeyMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/BaseInsertMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.common.base.insert.InsertMapper;
import tk.mybatis.mapper.common.base.insert.InsertSelectiveMapper;
/**
* 通用Mapper接口,基础查询
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface BaseInsertMapper<T> extends
InsertMapper<T>,
InsertSelectiveMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/BaseSelectMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.common.base.select.*;
/**
* 通用Mapper接口,基础查询
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface BaseSelectMapper<T> extends
SelectOneMapper<T>,
SelectMapper<T>,
SelectAllMapper<T>,
SelectCountMapper<T>,
SelectByPrimaryKeyMapper<T>,
ExistsWithPrimaryKeyMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/BaseUpdateMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.common.base.update.UpdateByPrimaryKeyMapper;
import tk.mybatis.mapper.common.base.update.UpdateByPrimaryKeySelectiveMapper;
/**
* 通用Mapper接口,基础查询
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface BaseUpdateMapper<T> extends
UpdateByPrimaryKeyMapper<T>,
UpdateByPrimaryKeySelectiveMapper<T> {
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/delete/DeleteByPrimaryKeyMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.delete;
import org.apache.ibatis.annotations.DeleteProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseDeleteProvider;
/**
* 通用Mapper接口,删除
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface DeleteByPrimaryKeyMapper<T> {
/**
* 根据主键字段进行删除,方法参数必须包含完整的主键属性
*
* @param key
* @return
*/
@DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL")
int deleteByPrimaryKey(Object key);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/delete/DeleteMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.delete;
import org.apache.ibatis.annotations.DeleteProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseDeleteProvider;
/**
* 通用Mapper接口,删除
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface DeleteMapper<T> {
/**
* 根据实体属性作为条件进行删除,查询条件使用等号
*
* @param record
* @return
*/
@DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL")
int delete(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/insert/InsertMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.insert;
import org.apache.ibatis.annotations.InsertProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseInsertProvider;
/**
* 通用Mapper接口,插入
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface InsertMapper<T> {
/**
* 保存一个实体,null的属性也会保存,不会使用数据库默认值
*
* @param record
* @return
*/
@InsertProvider(type = BaseInsertProvider.class, method = "dynamicSQL")
int insert(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/insert/InsertSelectiveMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.insert;
import org.apache.ibatis.annotations.InsertProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseInsertProvider;
/**
* 通用Mapper接口,插入
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface InsertSelectiveMapper<T> {
/**
* 保存一个实体,null的属性不会保存,会使用数据库默认值
*
* @param record
* @return
*/
@InsertProvider(type = BaseInsertProvider.class, method = "dynamicSQL")
int insertSelective(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/ExistsWithPrimaryKeyMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.select;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseSelectProvider;
/**
* 通用Mapper接口,查询
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface ExistsWithPrimaryKeyMapper<T> {
/**
* 根据主键字段查询总数,方法参数必须包含完整的主键属性,查询条件使用等号
*
* @param key
* @return
*/
@SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
boolean existsWithPrimaryKey(Object key);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectAllMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.select;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseSelectProvider;
import java.util.List;
/**
* @author liuzh
*/
@RegisterMapper
public interface SelectAllMapper<T> {
/**
* 查询全部结果
*
* @return
*/
@SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
List<T> selectAll();
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectByPrimaryKeyMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.select;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseSelectProvider;
/**
* 通用Mapper接口,其他接口继承该接口即可
* 需要在Entity类中为主键字段加上@javax.persistence.Id注解,声明主键
* 否则无法确认实体类哪个属性是主键
* <p/>
* <p>这是一个例子,自己扩展时可以参考</p>
* <p/>
* <p>项目地址 : <a href="https://github.com/abel533/Mapper" target="_blank">https://github.com/abel533/Mapper</a></p>
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface SelectByPrimaryKeyMapper<T> {
/**
* 根据主键字段进行查询,方法参数必须包含完整的主键属性,查询条件使用等号
*
* @param key
* @return
*/
@SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
T selectByPrimaryKey(Object key);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectCountMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.select;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseSelectProvider;
/**
* 通用Mapper接口,查询
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface SelectCountMapper<T> {
/**
* 根据实体中的属性查询总数,查询条件使用等号
*
* @param record
* @return
*/
@SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
int selectCount(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.select;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseSelectProvider;
import java.util.List;
/**
* 通用Mapper接口,查询
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface SelectMapper<T> {
/**
* 根据实体中的属性值进行查询,查询条件使用等号
*
* @param record
* @return
*/
@SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
List<T> select(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectOneMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.select;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseSelectProvider;
/**
* 通用Mapper接口,查询
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface SelectOneMapper<T> {
/**
* 根据实体中的属性进行查询,只能有一个返回值,有多个结果是抛出异常,查询条件使用等号
*
* @param record
* @return
*/
@SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
T selectOne(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/update/UpdateByPrimaryKeyMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.update;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseUpdateProvider;
/**
* 通用Mapper接口,更新
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface UpdateByPrimaryKeyMapper<T> {
/**
* 根据主键更新实体全部字段,null值会被更新
*
* @param record
* @return
*/
@UpdateProvider(type = BaseUpdateProvider.class, method = "dynamicSQL")
int updateByPrimaryKey(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/base/update/UpdateByPrimaryKeySelectiveMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.base.update;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.base.BaseUpdateProvider;
/**
* 通用Mapper接口,更新
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface UpdateByPrimaryKeySelectiveMapper<T> {
/**
* 根据主键更新属性不为null的值
*
* @param record
* @return
*/
@UpdateProvider(type = BaseUpdateProvider.class, method = "dynamicSQL")
int updateByPrimaryKeySelective(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/DeleteByConditionMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.condition;
import org.apache.ibatis.annotations.DeleteProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.provider.ConditionProvider;
/**
* 通用Mapper接口,Condition查询
*
* @param <T> 不能为空
* @author liuzh
*/
@RegisterMapper
public interface DeleteByConditionMapper<T> {
/**
* 根据Condition条件删除数据
*
* @param condition
* @return
*/
@DeleteProvider(type = ConditionProvider.class, method = "dynamicSQL")
int deleteByCondition(Object condition);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/SelectByConditionMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.condition;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.provider.ConditionProvider;
import java.util.List;
/**
* 通用Mapper接口,Condition查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectByConditionMapper<T> {
/**
* 根据Condition条件进行查询
*
* @param condition
* @return
*/
@SelectProvider(type = ConditionProvider.class, method = "dynamicSQL")
List<T> selectByCondition(Object condition);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/SelectCountByConditionMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.condition;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.provider.ConditionProvider;
/**
* 通用Mapper接口,Condition查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectCountByConditionMapper<T> {
/**
* 根据Condition条件进行查询总数
*
* @param condition
* @return
*/
@SelectProvider(type = ConditionProvider.class, method = "dynamicSQL")
int selectCountByCondition(Object condition);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/UpdateByConditionMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.condition;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.provider.ConditionProvider;
/**
* 通用Mapper接口,Condition查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface UpdateByConditionMapper<T> {
/**
* 根据Condition条件更新实体`record`包含的全部属性,null值会被更新
*
* @param record
* @param condition
* @return
*/
@UpdateProvider(type = ConditionProvider.class, method = "dynamicSQL")
int updateByCondition(@Param("record") T record, @Param("example") Object condition);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/UpdateByConditionSelectiveMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.condition;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.provider.ConditionProvider;
/**
* 通用Mapper接口,Condition查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface UpdateByConditionSelectiveMapper<T> {
/**
* 根据Condition条件更新实体`record`包含的不是null的属性值
*
* @param record
* @param condition
* @return
*/
@UpdateProvider(type = ConditionProvider.class, method = "dynamicSQL")
int updateByConditionSelective(@Param("record") T record, @Param("example") Object condition);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/example/DeleteByExampleMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.example;
import org.apache.ibatis.annotations.DeleteProvider;
import tk.mybatis.mapper.provider.ExampleProvider;
/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface DeleteByExampleMapper<T> {
/**
* 根据Example条件删除数据
*
* @param example
* @return
*/
@DeleteProvider(type = ExampleProvider.class, method = "dynamicSQL")
int deleteByExample(Object example);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/example/SelectByExampleMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.example;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.provider.ExampleProvider;
import java.util.List;
/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectByExampleMapper<T> {
/**
* 根据Example条件进行查询
*
* @param example
* @return
*/
@SelectProvider(type = ExampleProvider.class, method = "dynamicSQL")
List<T> selectByExample(Object example);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/example/SelectCountByExampleMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.example;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.provider.ExampleProvider;
/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectCountByExampleMapper<T> {
/**
* 根据Example条件进行查询总数
*
* @param example
* @return
*/
@SelectProvider(type = ExampleProvider.class, method = "dynamicSQL")
int selectCountByExample(Object example);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/example/SelectOneByExampleMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.example;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.provider.ExampleProvider;
/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectOneByExampleMapper<T> {
/**
* 根据Example条件进行查询
*
* @param example
* @return
*/
@SelectProvider(type = ExampleProvider.class, method = "dynamicSQL")
T selectOneByExample(Object example);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/example/UpdateByExampleMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.example;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.provider.ExampleProvider;
/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface UpdateByExampleMapper<T> {
/**
* 根据Example条件更新实体`record`包含的全部属性,null值会被更新
*
* @param record
* @param example
* @return
*/
@UpdateProvider(type = ExampleProvider.class, method = "dynamicSQL")
int updateByExample(@Param("record") T record, @Param("example") Object example);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/example/UpdateByExampleSelectiveMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.example;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.provider.ExampleProvider;
/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface UpdateByExampleSelectiveMapper<T> {
/**
* 根据Example条件更新实体`record`包含的不是null的属性值
*
* @param record
* @param example
* @return
*/
@UpdateProvider(type = ExampleProvider.class, method = "dynamicSQL")
int updateByExampleSelective(@Param("record") T record, @Param("example") Object example);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/ids/DeleteByIdsMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.ids;
import org.apache.ibatis.annotations.DeleteProvider;
import tk.mybatis.mapper.provider.IdsProvider;
/**
* 通用Mapper接口,根据ids删除
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface DeleteByIdsMapper<T> {
/**
* 根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段
*
* @param ids 如 "1,2,3,4"
* @return
*/
@DeleteProvider(type = IdsProvider.class, method = "dynamicSQL")
int deleteByIds(String ids);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/ids/SelectByIdsMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.ids;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.provider.IdsProvider;
import java.util.List;
/**
* 通用Mapper接口,根据ids查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectByIdsMapper<T> {
/**
* 根据主键字符串进行查询,类中只有存在一个带有@Id注解的字段
*
* @param ids 如 "1,2,3,4"
* @return
*/
@SelectProvider(type = IdsProvider.class, method = "dynamicSQL")
List<T> selectByIds(String ids);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/progressive/ProgressiveMapper.java
================================================
package tk.mybatis.mapper.common.progressive;
import org.apache.ibatis.session.RowBounds;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.common.ExampleMapper;
import tk.mybatis.mapper.common.rowbounds.SelectByExampleRowBoundsMapper;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.util.Assert;
import tk.mybatis.mapper.util.Sqls;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
import java.util.function.Consumer;
/**
* 渐进式处理Mapper,数据库必须包含id字段
* @author 陈添明
*/
@RegisterMapper
public interface ProgressiveMapper<T> extends ExampleMapper<T>, SelectByExampleRowBoundsMapper<T> {
/**
* 渐进式记录处理
* 数据表必须包含id字段
* @param consumer 业务处理逻辑
* @throws NoSuchFieldException 没有id字段会抛出此异常
* @throws IllegalAccessException 无法访问id字段会抛出此异常
*/
default void handleRecordProgressive(Consumer<T> consumer) throws NoSuchFieldException, IllegalAccessException {
Class<?> clz = getParameterType();
long i = 0;
while (true) {
Example example = Example.builder(clz)
.andWhere(Sqls.custom().andGreaterThan("id", i))
.build();
List<T> list = selectByExampleAndRowBounds(example, new RowBounds(0, 100));
if (list.isEmpty()) {
return;
}
for (T t : list) {
consumer.accept(t);
}
T t = list.get(list.size() - 1);
Field idField = t.getClass().getDeclaredField("id");
idField.setAccessible(true);
i = (Long) idField.get(t);
}
}
/**
* 渐进式全量删除
* 数据表必须包含id字段
* 不会因为数据量大导致慢sql
* @throws NoSuchFieldException 没有id字段会抛出此异常
* @throws IllegalAccessException 无法访问id字段会抛出此异常
*/
default void deleteAllProgressive() throws NoSuchFieldException, IllegalAccessException {
Class<?> parameterType = getParameterType();
Long minimumId = getMinimumId();
if (minimumId == null) {
return;
}
Long maxId = getMaxId();
if (maxId == null) {
return;
}
for (Long i = minimumId; i <= maxId; ) {
i = i + 10000;
Example example = Example.builder(parameterType)
.andWhere(Sqls.custom().andBetween("id", minimumId, i))
.build();
deleteByExample(example);
}
}
/**
* 获取泛型参数Class
*
* @return 泛型参数Class
*/
default Class<?> getParameterType() {
Type[] genericInterfaces = this.getClass().getGenericInterfaces();
Class<?> rawClass = (Class<?>) genericInterfaces[0];
Type[] rawClassGenericInterfaces = rawClass.getGenericInterfaces();
Assert.isTrue(rawClassGenericInterfaces.length > 0, "Mapper类必须继承泛型Mapper");
ParameterizedType mapperType = getParameterizedType(rawClassGenericInterfaces);
Assert.notNull(mapperType, "未找到参数化Mapper类型!");
return (Class<?>) mapperType.getActualTypeArguments()[0];
}
/**
* 获取ParameterizedType
* @param rawClassGenericInterfaces 参数化接口
* @return ParameterizedType
*/
default ParameterizedType getParameterizedType(Type[] rawClassGenericInterfaces) {
for (Type genericInterface : rawClassGenericInterfaces) {
if (genericInterface instanceof ParameterizedType) {
return (ParameterizedType) genericInterface;
}
}
return null;
}
/**
* 获取最小id
* @return 最小id
* @throws NoSuchFieldException 没有id字段会抛出此异常
* @throws IllegalAccessException 无法访问id字段会抛出此异常
*/
default Long getMinimumId() throws NoSuchFieldException, IllegalAccessException {
Class<?> parameterType = getParameterType();
Example example = Example.builder(parameterType)
.select("id")
.orderBy("id")
.build();
List<T> list = selectByExampleAndRowBounds(example, new RowBounds(0, 1));
if (list.isEmpty()) {
return null;
}
T t = list.get(0);
Field idField = t.getClass().getDeclaredField("id");
idField.setAccessible(true);
return (Long) idField.get(t);
}
/**
* 获取最大id
* @return 最大id
* @throws NoSuchFieldException 没有id字段会抛出此异常
* @throws IllegalAccessException 无法访问id字段会抛出此异常
*/
default Long getMaxId() throws NoSuchFieldException, IllegalAccessException {
Class<?> parameterType = getParameterType();
Example example = Example.builder(parameterType)
.select("id")
.orderByDesc("id")
.build();
List<T> list = selectByExampleAndRowBounds(example, new RowBounds(0, 1));
if (list.isEmpty()) {
return null;
}
T t = list.get(0);
Field idField = t.getClass().getDeclaredField("id");
idField.setAccessible(true);
return (Long) idField.get(t);
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectByConditionRowBoundsMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.rowbounds;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.session.RowBounds;
import tk.mybatis.mapper.provider.ConditionProvider;
import java.util.List;
/**
* 通用Mapper接口,Condition查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectByConditionRowBoundsMapper<T> {
/**
* 根据example条件和RowBounds进行分页查询,该方法和selectByExampleAndRowBounds完全一样,只是名字改成了Condition
*
* @param condition
* @param rowBounds
* @return
*/
@SelectProvider(type = ConditionProvider.class, method = "dynamicSQL")
List<T> selectByConditionAndRowBounds(Object condition, RowBounds rowBounds);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectByExampleRowBoundsMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.rowbounds;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.session.RowBounds;
import tk.mybatis.mapper.provider.ExampleProvider;
import java.util.List;
/**
* 通用Mapper接口,查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectByExampleRowBoundsMapper<T> {
/**
* 根据example条件和RowBounds进行分页查询
*
* @param example
* @param rowBounds
* @return
*/
@SelectProvider(type = ExampleProvider.class, method = "dynamicSQL")
List<T> selectByExampleAndRowBounds(Object example, RowBounds rowBounds);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectRowBoundsMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.rowbounds;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.session.RowBounds;
import tk.mybatis.mapper.provider.base.BaseSelectProvider;
import java.util.List;
/**
* 通用Mapper接口,查询
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface SelectRowBoundsMapper<T> {
/**
* 根据实体属性和RowBounds进行分页查询
*
* @param record
* @param rowBounds
* @return
*/
@SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
List<T> selectByRowBounds(T record, RowBounds rowBounds);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/special/InsertListMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.special;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import tk.mybatis.mapper.provider.SpecialProvider;
import java.util.List;
/**
* 通用Mapper接口,特殊方法,批量插入,支持批量插入的数据库都可以使用,例如mysql,h2等
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface InsertListMapper<T> {
/**
* 批量插入,支持批量插入的数据库可以使用,例如MySQL,H2等,另外该接口限制实体包含`id`属性并且必须为自增列
*
* @param recordList
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SpecialProvider.class, method = "dynamicSQL")
int insertList(List<? extends T> recordList);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/special/InsertUseGeneratedKeysMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.special;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import tk.mybatis.mapper.provider.SpecialProvider;
/**
* 通用Mapper接口,特殊方法,批量插入,支持批量插入的数据库都可以使用,例如mysql,h2等
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface InsertUseGeneratedKeysMapper<T> {
/**
* 插入数据,限制为实体包含`id`属性并且必须为自增列,实体配置的主键策略无效
*
* @param record
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SpecialProvider.class, method = "dynamicSQL")
int insertUseGeneratedKeys(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/sqlserver/InsertMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.sqlserver;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import tk.mybatis.mapper.provider.SqlServerProvider;
/**
* 通用Mapper接口,插入
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface InsertMapper<T> {
/**
* 插入数据库,`null`值也会插入,不会使用列的默认值
*
* @param record
* @return
*/
@Options(useGeneratedKeys = true)
@InsertProvider(type = SqlServerProvider.class, method = "dynamicSQL")
int insert(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/common/sqlserver/InsertSelectiveMapper.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.common.sqlserver;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import tk.mybatis.mapper.provider.SqlServerProvider;
/**
* 通用Mapper接口,插入
*
* @param <T> 不能为空
* @author liuzh
*/
@tk.mybatis.mapper.annotation.RegisterMapper
public interface InsertSelectiveMapper<T> {
@Options(useGeneratedKeys = true)
@InsertProvider(type = SqlServerProvider.class, method = "dynamicSQL")
int insertSelective(T record);
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/ConditionProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider;
import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;
/**
* ConditionProvider实现类,基础方法实现类
*
* @author liuzh
*/
public class ConditionProvider extends MapperTemplate {
private ExampleProvider exampleProvider;
public ConditionProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
exampleProvider = new ExampleProvider(mapperClass, mapperHelper);
}
/**
* 根据Condition查询总数
*
* @param ms
* @return
*/
public String selectCountByCondition(MappedStatement ms) {
return exampleProvider.selectCountByExample(ms);
}
/**
* 根据Condition删除
*
* @param ms
* @return
*/
public String deleteByCondition(MappedStatement ms) {
return exampleProvider.deleteByExample(ms);
}
/**
* 根据Condition查询
*
* @param ms
* @return
*/
public String selectByCondition(MappedStatement ms) {
return exampleProvider.selectByExample(ms);
}
/**
* 根据Condition查询
*
* @param ms
* @return
*/
public String selectByConditionAndRowBounds(MappedStatement ms) {
return exampleProvider.selectByExample(ms);
}
/**
* 根据Example更新非null字段
*
* @param ms
* @return
*/
public String updateByConditionSelective(MappedStatement ms) {
return exampleProvider.updateByExampleSelective(ms);
}
/**
* 根据Condition更新
*
* @param ms
* @return
*/
public String updateByCondition(MappedStatement ms) {
return exampleProvider.updateByExample(ms);
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/ExampleProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlCommandType;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;
import tk.mybatis.mapper.mapperhelper.SqlHelper;
import tk.mybatis.mapper.util.MetaObjectUtil;
/**
* ExampleProvider实现类,基础方法实现类
*
* @author liuzh
*/
public class ExampleProvider extends MapperTemplate {
public ExampleProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
/**
* 根据Example查询总数
*
* @param ms
* @return
*/
public String selectCountByExample(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder("SELECT ");
if (isCheckExampleEntityClass()) {
sql.append(SqlHelper.exampleCheck(entityClass));
}
sql.append(SqlHelper.exampleCountColumn(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.exampleWhereClause());
sql.append(SqlHelper.exampleForUpdate());
return sql.toString();
}
/**
* 根据Example删除
*
* @param ms
* @return
*/
public String deleteByExample(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
if (isCheckExampleEntityClass()) {
sql.append(SqlHelper.exampleCheck(entityClass));
}
//如果设置了安全删除,就不允许执行不带查询条件的 delete 方法
if (getConfig().isSafeDelete()) {
sql.append(SqlHelper.exampleHasAtLeastOneCriteriaCheck("_parameter"));
}
if (SqlHelper.hasLogicDeleteColumn(entityClass)) {
sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass)));
sql.append("<set>");
sql.append(SqlHelper.logicDeleteColumnEqualsValue(entityClass, true));
sql.append("</set>");
MetaObjectUtil.forObject(ms).setValue("sqlCommandType", SqlCommandType.UPDATE);
} else {
sql.append(SqlHelper.deleteFromTable(entityClass, tableName(entityClass)));
}
sql.append(SqlHelper.exampleWhereClause());
return sql.toString();
}
/**
* 根据Example查询
*
* @param ms
* @return
*/
public String selectByExample(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
//将返回值修改为实体类型
setResultType(ms, entityClass);
StringBuilder sql = new StringBuilder("SELECT ");
if (isCheckExampleEntityClass()) {
sql.append(SqlHelper.exampleCheck(entityClass));
}
sql.append("<if test=\"distinct\">distinct</if>");
//支持查询指定列
sql.append(SqlHelper.exampleSelectColumns(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.exampleWhereClause());
sql.append(SqlHelper.exampleOrderBy(entityClass));
sql.append(SqlHelper.exampleForUpdate());
return sql.toString();
}
/**
* 根据Example查询
*
* @param ms
* @return
*/
public String selectByExampleAndRowBounds(MappedStatement ms) {
return selectByExample(ms);
}
/**
* 根据Example更新非null字段
*
* @param ms
* @return
*/
public String updateByExampleSelective(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
if (isCheckExampleEntityClass()) {
sql.append(SqlHelper.exampleCheck(entityClass));
}
//安全更新,Example 必须包含条件
if (getConfig().isSafeUpdate()) {
sql.append(SqlHelper.exampleHasAtLeastOneCriteriaCheck("example"));
}
sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass), "example"));
sql.append(SqlHelper.updateSetColumnsIgnoreVersion(entityClass, "record", true, isNotEmpty()));
sql.append(SqlHelper.updateByExampleWhereClause());
return sql.toString();
}
/**
* 根据Example更新
*
* @param ms
* @return
*/
public String updateByExample(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
if (isCheckExampleEntityClass()) {
sql.append(SqlHelper.exampleCheck(entityClass));
}
//安全更新,Example 必须包含条件
if (getConfig().isSafeUpdate()) {
sql.append(SqlHelper.exampleHasAtLeastOneCriteriaCheck("example"));
}
sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass), "example"));
sql.append(SqlHelper.updateSetColumnsIgnoreVersion(entityClass, "record", false, false));
sql.append(SqlHelper.updateByExampleWhereClause());
return sql.toString();
}
/**
* 根据Example查询一个结果
*
* @param ms
* @return
*/
public String selectOneByExample(MappedStatement ms) {
return selectByExample(ms);
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/IdsProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider;
import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.MapperException;
import tk.mybatis.mapper.entity.EntityColumn;
import tk.mybatis.mapper.mapperhelper.EntityHelper;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;
import tk.mybatis.mapper.mapperhelper.SqlHelper;
import java.util.Set;
/**
* 通过 ids 字符串的各种操作
* <p/>
* ids 如 "1,2,3"
*
* @author liuzh
*/
public class IdsProvider extends MapperTemplate {
public IdsProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
/**
* 根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段
*
* @param ms
* @return
*/
public String deleteByIds(MappedStatement ms) {
final Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.deleteFromTable(entityClass, tableName(entityClass)));
Set<EntityColumn> columnList = EntityHelper.getPKColumns(entityClass);
if (columnList.size() == 1) {
EntityColumn column = columnList.iterator().next();
sql.append(" where ");
sql.append(column.getColumn());
sql.append(" in (${_parameter})");
} else {
throw new MapperException("继承 deleteByIds 方法的实体类[" + entityClass.getName() + "]中必须只有一个带有 @Id 注解的字段");
}
return sql.toString();
}
/**
* 根据主键字符串进行查询,类中只有存在一个带有@Id注解的字段
*
* @param ms
* @return
*/
public String selectByIds(MappedStatement ms) {
final Class<?> entityClass = getEntityClass(ms);
//将返回值修改为实体类型
setResultType(ms, entityClass);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.selectAllColumns(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
Set<EntityColumn> columnList = EntityHelper.getPKColumns(entityClass);
if (columnList.size() == 1) {
EntityColumn column = columnList.iterator().next();
sql.append(" where ");
sql.append(column.getColumn());
sql.append(" in (${_parameter})");
} else {
throw new MapperException("继承 selectByIds 方法的实体类[" + entityClass.getName() + "]中必须只有一个带有 @Id 注解的字段");
}
return sql.toString();
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/SaveProvider.java
================================================
package tk.mybatis.mapper.provider;
import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.MapperException;
import tk.mybatis.mapper.entity.EntityColumn;
import tk.mybatis.mapper.mapperhelper.*;
import java.lang.reflect.Field;
import java.util.Set;
/**
* 保存实现类
* Created by YangBin on 2020/5/12
* Copyright (c) 2020 杨斌 All rights reserved.
*/
public class SaveProvider extends MapperTemplate {
public SaveProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
/**
* 保存策略: 如果主键不为空则更新记录, 如果没有主键或者主键为空,则插入.
* @param ms
* @return
*/
public String save(MappedStatement ms){
Class<?> entityClass = getEntityClass(ms);
Field[] fields = entityClass.getFields();
StringBuilder sql = new StringBuilder();
Set<EntityColumn> columnList = EntityHelper.getPKColumns(entityClass);
if (columnList.size() == 1) {
EntityColumn column = (EntityColumn)columnList.iterator().next();
String id = column.getColumn();
sql.append("<choose>");
sql.append("<when test='" + id + "!=null'>");
sql.append(updateByPrimaryKey(ms));
sql.append("</when>");
sql.append("<otherwise>");
sql.append(insert(ms));
sql.append("</otherwise>");
sql.append("</choose>");
return sql.toString();
}
return insert(ms);
}
/**
* 通过主键更新全部字段
*
* @param ms
*/
public String updateByPrimaryKey(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.updateSetColumns(entityClass, null, false, false));
sql.append(SqlHelper.wherePKColumns(entityClass, true));
return sql.toString();
}
public String insert(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
//获取全部列
Set<EntityColumn> columnList = EntityHelper.getColumns(entityClass);
processKey(sql, entityClass, ms, columnList);
sql.append(SqlHelper.insertIntoTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.insertColumns(entityClass, false, false, false));
sql.append("<trim prefix=\"VALUES(\" suffix=\")\" suffixOverrides=\",\">");
for (EntityColumn column : columnList) {
if (!column.isInsertable()) {
continue;
}
//优先使用传入的属性值,当原属性property!=null时,用原属性
//自增的情况下,如果默认有值,就会备份到property_cache中,所以这里需要先判断备份的值是否存在
if (column.isIdentity()) {
sql.append(SqlHelper.getIfCacheNotNull(column, column.getColumnHolder(null, "_cache", ",")));
} else {
//其他情况值仍然存在原property中
sql.append(SqlHelper.getIfNotNull(column, column.getColumnHolder(null, null, ","), isNotEmpty()));
}
//当属性为null时,如果存在主键策略,会自动获取值,如果不存在,则使用null
if (column.isIdentity()) {
sql.append(SqlHelper.getIfCacheIsNull(column, column.getColumnHolder() + ","));
} else {
//当null的时候,如果不指定jdbcType,oracle可能会报异常,指定VARCHAR不影响其他
sql.append(SqlHelper.getIfIsNull(column, column.getColumnHolder(null, null, ","), isNotEmpty()));
}
}
sql.append("</trim>");
return sql.toString();
}
private void processKey(StringBuilder sql, Class<?> entityClass, MappedStatement ms, Set<EntityColumn> columnList){
//Identity列只能有一个
Boolean hasIdentityKey = false;
//先处理cache或bind节点
for (EntityColumn column : columnList) {
if (column.isIdentity()) {
//这种情况下,如果原先的字段有值,需要先缓存起来,否则就一定会使用自动增长
//这是一个bind节点
sql.append(SqlHelper.getBindCache(column));
//如果是Identity列,就需要插入selectKey
//如果已经存在Identity列,抛出异常
if (hasIdentityKey) {
//jdbc类型只需要添加一次
if (column.getGenerator() != null && column.getGenerator().equals("JDBC")) {
continue;
}
throw new MapperException(ms.getId() + "对应的实体类" + entityClass.getName() + "中包含多个MySql的自动增长列,最多只能有一个!");
}
//插入selectKey
SelectKeyHelper.newSelectKeyMappedStatement(ms, column, entityClass, isBEFORE(), getIDENTITY(column));
hasIdentityKey = true;
} else if(column.getGenIdClass() != null){
sql.append("<bind name=\"").append(column.getColumn()).append("GenIdBind\" value=\"@tk.mybatis.mapper.genid.GenIdUtil@genId(");
sql.append("_parameter").append(", '").append(column.getProperty()).append("'");
sql.append(", @").append(column.getGenIdClass().getName()).append("@class");
sql.append(", '").append(tableName(entityClass)).append("'");
sql.append(", '").append(column.getColumn()).append("')");
sql.append("\"/>");
}
}
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/SpecialProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider;
import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.entity.EntityColumn;
import tk.mybatis.mapper.mapperhelper.EntityHelper;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;
import tk.mybatis.mapper.mapperhelper.SqlHelper;
import java.util.Set;
/**
* SpecialProvider实现类,特殊方法实现类
*
* @author liuzh
*/
public class SpecialProvider extends MapperTemplate {
public SpecialProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
/**
* 批量插入
*
* @param ms
*/
public String insertList(MappedStatement ms) {
final Class<?> entityClass = getEntityClass(ms);
//开始拼sql
StringBuilder sql = new StringBuilder();
sql.append("<bind name=\"listNotEmptyCheck\" value=\"@tk.mybatis.mapper.util.OGNL@notEmptyCollectionCheck(list, '" + ms.getId() + " 方法参数为空')\"/>");
sql.append(SqlHelper.insertIntoTable(entityClass, tableName(entityClass), "list[0]"));
sql.append(SqlHelper.insertColumns(entityClass, true, false, false));
sql.append(" VALUES ");
sql.append("<foreach collection=\"list\" item=\"record\" separator=\",\" >");
sql.append("<trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\">");
//获取全部列
Set<EntityColumn> columnList = EntityHelper.getColumns(entityClass);
//当某个列有主键策略时,不需要考虑他的属性是否为空,因为如果为空,一定会根据主键策略给他生成一个值
for (EntityColumn column : columnList) {
if (!column.isId() && column.isInsertable()) {
sql.append(column.getColumnHolder("record") + ",");
}
}
sql.append("</trim>");
sql.append("</foreach>");
// 反射把MappedStatement中的设置主键名
EntityHelper.setKeyProperties(EntityHelper.getPKColumns(entityClass), ms);
return sql.toString();
}
/**
* 插入,主键id,自增
*
* @param ms
*/
public String insertUseGeneratedKeys(MappedStatement ms) {
final Class<?> entityClass = getEntityClass(ms);
//开始拼sql
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.insertIntoTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.insertColumns(entityClass, true, false, false));
sql.append(SqlHelper.insertValuesColumns(entityClass, true, false, false));
// 反射把MappedStatement中的设置主键名
EntityHelper.setKeyProperties(EntityHelper.getPKColumns(entityClass), ms);
return sql.toString();
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/SqlServerProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider;
import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.mapperhelper.EntityHelper;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;
import tk.mybatis.mapper.mapperhelper.SqlHelper;
/**
* SqlServerProvider实现类,特殊方法实现类
*
* @author liuzh
*/
public class SqlServerProvider extends MapperTemplate {
public SqlServerProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
/**
* 插入
*
* @param ms
*/
public String insert(MappedStatement ms) {
final Class<?> entityClass = getEntityClass(ms);
//开始拼sql
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.insertIntoTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.insertColumns(entityClass, true, false, false));
sql.append(SqlHelper.insertValuesColumns(entityClass, true, false, false));
// 反射把MappedStatement中的设置主键名
EntityHelper.setKeyProperties(EntityHelper.getPKColumns(entityClass), ms);
return sql.toString();
}
/**
* 插入不为null的字段
*
* @param ms
* @return
*/
public String insertSelective(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.insertIntoTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.insertColumns(entityClass, true, true, isNotEmpty()));
sql.append(SqlHelper.insertValuesColumns(entityClass, true, true, isNotEmpty()));
// 反射把MappedStatement中的设置主键名
EntityHelper.setKeyProperties(EntityHelper.getPKColumns(entityClass), ms);
return sql.toString();
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/base/BaseDeleteProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider.base;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlCommandType;
import tk.mybatis.mapper.mapperhelper.EntityHelper;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;
import tk.mybatis.mapper.mapperhelper.SqlHelper;
import tk.mybatis.mapper.util.MetaObjectUtil;
/**
* BaseDeleteMapper实现类,基础方法实现类
*
* @author liuzh
*/
public class BaseDeleteProvider extends MapperTemplate {
public BaseDeleteProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
/**
* 通过条件删除
*
* @param ms
* @return
*/
public String delete(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
//如果设置了安全删除,就不允许执行不带查询条件的 delete 方法
if (getConfig().isSafeDelete()) {
sql.append(SqlHelper.notAllNullParameterCheck("_parameter", EntityHelper.getColumns(entityClass)));
}
// 如果是逻辑删除,则修改为更新表,修改逻辑删除字段的值
if (SqlHelper.hasLogicDeleteColumn(entityClass)) {
sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass)));
sql.append("<set>");
sql.append(SqlHelper.logicDeleteColumnEqualsValue(entityClass, true));
sql.append("</set>");
MetaObjectUtil.forObject(ms).setValue("sqlCommandType", SqlCommandType.UPDATE);
} else {
sql.append(SqlHelper.deleteFromTable(entityClass, tableName(entityClass)));
}
sql.append(SqlHelper.whereAllIfColumns(entityClass, isNotEmpty()));
return sql.toString();
}
/**
* 通过主键删除
*
* @param ms
*/
public String deleteByPrimaryKey(MappedStatement ms) {
final Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
if (SqlHelper.hasLogicDeleteColumn(entityClass)) {
sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass)));
sql.append("<set>");
sql.append(SqlHelper.logicDeleteColumnEqualsValue(entityClass, true));
sql.append("</set>");
MetaObjectUtil.forObject(ms).setValue("sqlCommandType", SqlCommandType.UPDATE);
} else {
sql.append(SqlHelper.deleteFromTable(entityClass, tableName(entityClass)));
}
sql.append(SqlHelper.wherePKColumns(entityClass));
return sql.toString();
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/base/BaseInsertProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider.base;
import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.MapperException;
import tk.mybatis.mapper.entity.EntityColumn;
import tk.mybatis.mapper.mapperhelper.*;
import java.util.Set;
/**
* BaseInsertProvider实现类,基础方法实现类
*
* @author liuzh
*/
public class BaseInsertProvider extends MapperTemplate {
public BaseInsertProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
public String insert(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
//获取全部列
Set<EntityColumn> columnList = EntityHelper.getColumns(entityClass);
EntityColumn logicDeleteColumn = SqlHelper.getLogicDeleteColumn(entityClass);
processKey(sql, entityClass, ms, columnList);
sql.append(SqlHelper.insertIntoTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.insertColumns(entityClass, false, false, false));
sql.append("<trim prefix=\"VALUES(\" suffix=\")\" suffixOverrides=\",\">");
for (EntityColumn column : columnList) {
if (!column.isInsertable()) {
continue;
}
if (logicDeleteColumn != null && logicDeleteColumn == column) {
sql.append(SqlHelper.getLogicDeletedValue(column, false)).append(",");
continue;
}
//优先使用传入的属性值,当原属性property!=null时,用原属性
//自增的情况下,如果默认有值,就会备份到property_cache中,所以这里需要先判断备份的值是否存在
if (column.isIdentity()) {
sql.append(SqlHelper.getIfCacheNotNull(column, column.getColumnHolder(null, "_cache", ",")));
} else {
//其他情况值仍然存在原property中
sql.append(SqlHelper.getIfNotNull(column, column.getColumnHolder(null, null, ","), isNotEmpty()));
}
//当属性为null时,如果存在主键策略,会自动获取值,如果不存在,则使用null
if (column.isIdentity()) {
sql.append(SqlHelper.getIfCacheIsNull(column, column.getColumnHolder() + ","));
} else {
//当null的时候,如果不指定jdbcType,oracle可能会报异常,指定VARCHAR不影响其他
sql.append(SqlHelper.getIfIsNull(column, column.getColumnHolder(null, null, ","), isNotEmpty()));
}
}
sql.append("</trim>");
return sql.toString();
}
public String insertSelective(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
//获取全部列
Set<EntityColumn> columnList = EntityHelper.getColumns(entityClass);
EntityColumn logicDeleteColumn = SqlHelper.getLogicDeleteColumn(entityClass);
processKey(sql, entityClass, ms, columnList);
sql.append(SqlHelper.insertIntoTable(entityClass, tableName(entityClass)));
sql.append("<trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\">");
for (EntityColumn column : columnList) {
if (!column.isInsertable()) {
continue;
}
if (column.isIdentity()) {
sql.append(column.getColumn()).append(",");
} else {
if (logicDeleteColumn != null && logicDeleteColumn == column) {
sql.append(column.getColumn()).append(",");
continue;
}
sql.append(SqlHelper.getIfNotNull(column, column.getColumn() + ",", isNotEmpty()));
}
}
sql.append("</trim>");
sql.append("<trim prefix=\"VALUES(\" suffix=\")\" suffixOverrides=\",\">");
for (EntityColumn column : columnList) {
if (!column.isInsertable()) {
continue;
}
if (logicDeleteColumn != null && logicDeleteColumn == column) {
sql.append(SqlHelper.getLogicDeletedValue(column, false)).append(",");
continue;
}
//优先使用传入的属性值,当原属性property!=null时,用原属性
//自增的情况下,如果默认有值,就会备份到property_cache中,所以这里需要先判断备份的值是否存在
if (column.isIdentity()) {
sql.append(SqlHelper.getIfCacheNotNull(column, column.getColumnHolder(null, "_cache", ",")));
} else {
//其他情况值仍然存在原property中
sql.append(SqlHelper.getIfNotNull(column, column.getColumnHolder(null, null, ","), isNotEmpty()));
}
//当属性为null时,如果存在主键策略,会自动获取值,如果不存在,则使用null
//序列的情况
if (column.isIdentity()) {
sql.append(SqlHelper.getIfCacheIsNull(column, column.getColumnHolder() + ","));
}
}
sql.append("</trim>");
return sql.toString();
}
private void processKey(StringBuilder sql, Class<?> entityClass, MappedStatement ms, Set<EntityColumn> columnList) {
//Identity列只能有一个
Boolean hasIdentityKey = false;
//先处理cache或bind节点
for (EntityColumn column : columnList) {
if (column.isIdentity()) {
//这种情况下,如果原先的字段有值,需要先缓存起来,否则就一定会使用自动增长
//这是一个bind节点
sql.append(SqlHelper.getBindCache(column));
//如果是Identity列,就需要插入selectKey
//如果已经存在Identity列,抛出异常
if (hasIdentityKey) {
//jdbc类型只需要添加一次
if (column.getGenerator() != null && "JDBC".equals(column.getGenerator())) {
continue;
}
throw new MapperException(ms.getId() + "对应的实体类" + entityClass.getName() + "中包含多个MySql的自动增长列,最多只能有一个!");
}
//插入selectKey
SelectKeyHelper.newSelectKeyMappedStatement(ms, column, entityClass, isBEFORE(), getIDENTITY(column));
hasIdentityKey = true;
} else if (column.getGenIdClass() != null) {
sql.append("<bind name=\"").append(column.getColumn()).append("GenIdBind\" value=\"@tk.mybatis.mapper.genid.GenIdUtil@genId(");
sql.append("_parameter").append(", '").append(column.getProperty()).append("'");
sql.append(", @").append(column.getGenIdClass().getName()).append("@class");
sql.append(", '").append(tableName(entityClass)).append("'");
sql.append(", '").append(column.getColumn()).append("')");
sql.append("\"/>");
}
}
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/base/BaseSelectProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider.base;
import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;
import tk.mybatis.mapper.mapperhelper.SqlHelper;
/**
* BaseSelectProvider实现类,基础方法实现类
*
* @author liuzh
*/
public class BaseSelectProvider extends MapperTemplate {
public BaseSelectProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
/**
* 查询
*
* @param ms
* @return
*/
public String selectOne(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
//修改返回值类型为实体类型
setResultType(ms, entityClass);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.selectAllColumns(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.whereAllIfColumns(entityClass, isNotEmpty()));
return sql.toString();
}
/**
* 查询
*
* @param ms
* @return
*/
public String select(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
//修改返回值类型为实体类型
setResultType(ms, entityClass);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.selectAllColumns(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.whereAllIfColumns(entityClass, isNotEmpty()));
sql.append(SqlHelper.orderByDefault(entityClass));
return sql.toString();
}
/**
* 查询
*
* @param ms
* @return
*/
public String selectByRowBounds(MappedStatement ms) {
return select(ms);
}
/**
* 根据主键进行查询
*
* @param ms
*/
public String selectByPrimaryKey(MappedStatement ms) {
final Class<?> entityClass = getEntityClass(ms);
//将返回值修改为实体类型
setResultType(ms, entityClass);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.selectAllColumns(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.wherePKColumns(entityClass));
return sql.toString();
}
/**
* 查询总数
*
* @param ms
* @return
*/
public String selectCount(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.selectCount(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.whereAllIfColumns(entityClass, isNotEmpty()));
return sql.toString();
}
/**
* 根据主键查询总数
*
* @param ms
* @return
*/
public String existsWithPrimaryKey(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.selectCountExists(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.wherePKColumns(entityClass));
return sql.toString();
}
/**
* 查询全部结果
*
* @param ms
* @return
*/
public String selectAll(MappedStatement ms) {
final Class<?> entityClass = getEntityClass(ms);
//修改返回值类型为实体类型
setResultType(ms, entityClass);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.selectAllColumns(entityClass));
sql.append(SqlHelper.fromTable(entityClass, tableName(entityClass)));
// 逻辑删除的未删除查询条件
sql.append("<where>");
sql.append(SqlHelper.whereLogicDelete(entityClass, false));
sql.append("</where>");
sql.append(SqlHelper.orderByDefault(entityClass));
return sql.toString();
}
}
================================================
FILE: base/src/main/java/tk/mybatis/mapper/provider/base/BaseUpdateProvider.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.provider.base;
import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;
import tk.mybatis.mapper.mapperhelper.SqlHelper;
/**
* BaseUpdateProvider实现类,基础方法实现类
*
* @author liuzh
*/
public class BaseUpdateProvider extends MapperTemplate {
public BaseUpdateProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
super(mapperClass, mapperHelper);
}
/**
* 通过主键更新全部字段
*
* @param ms
*/
public String updateByPrimaryKey(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.updateSetColumns(entityClass, null, false, false));
sql.append(SqlHelper.wherePKColumns(entityClass, true));
return sql.toString();
}
/**
* 通过主键更新不为null的字段
*
* @param ms
* @return
*/
public String updateByPrimaryKeySelective(MappedStatement ms) {
Class<?> entityClass = getEntityClass(ms);
StringBuilder sql = new StringBuilder();
sql.append(SqlHelper.updateTable(entityClass, tableName(entityClass)));
sql.append(SqlHelper.updateSetColumns(entityClass, null, true, isNotEmpty()));
sql.append(SqlHelper.wherePKColumns(entityClass, true));
return sql.toString();
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/BaseTest.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.base;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.jdbc.ScriptRunner;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.Before;
import tk.mybatis.mapper.entity.Config;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import java.io.IOException;
import java.io.Reader;
import java.net.URL;
import java.sql.Connection;
/**
* 测试基类
*
* @author liuzh
*/
public abstract class BaseTest {
private SqlSessionFactory sqlSessionFactory;
@Before
public final void init() {
try {
Reader reader = getConfigFileAsReader();
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
reader.close();
//配置通用 Mapper
configMapperHelper();
//执行初始化 SQL
runSql(getSqlFileAsReader());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
/**
* 配置通用 Mapper
*/
protected void configMapperHelper() {
SqlSession session = getSqlSession();
try {
//创建一个MapperHelper
MapperHelper mapperHelper = new MapperHelper();
//设置配置
mapperHelper.setConfig(getConfig());
//配置完成后,执行下面的操作
mapperHelper.processConfiguration(session.getConfiguration());
} finally {
session.close();
}
}
/**
* 执行 Sql
*
* @param reader
*/
protected void runSql(Reader reader) {
if (reader == null) {
return;
}
SqlSession sqlSession = getSqlSession();
try {
Connection conn = sqlSession.getConnection();
ScriptRunner runner = new ScriptRunner(conn);
runner.setLogWriter(null);
runner.runScript(reader);
try {
reader.close();
} catch (IOException e) {
}
} finally {
sqlSession.close();
}
}
/**
* 获取 Mapper 配置
*
* @return
*/
protected Config getConfig() {
return new Config();
}
/**
* 获取 mybatis 配置
*
* @return
*/
protected Reader getConfigFileAsReader() throws IOException {
URL url = BaseTest.class.getResource("mybatis-config.xml");
return toReader(url);
}
;
/**
* 获取初始化 sql
*
* @return
*/
protected Reader getSqlFileAsReader() throws IOException {
URL url = BaseTest.class.getResource("CreateDB.sql");
return toReader(url);
}
;
/**
* 转为 Reader
*
* @param url
* @return
* @throws IOException
*/
protected Reader toReader(URL url) throws IOException {
return Resources.getUrlAsReader(url.toString());
}
/**
* 获取Session
*
* @return
*/
protected SqlSession getSqlSession() {
return sqlSessionFactory.openSession();
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/Country.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.base;
import jakarta.persistence.Id;
import java.io.Serializable;
/**
* @author liuzh
*/
public class Country implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Long id;
private String countryname;
private String countrycode;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCountryname() {
return countryname;
}
public void setCountryname(String countryname) {
this.countryname = countryname;
}
public String getCountrycode() {
return countrycode;
}
public void setCountrycode(String countrycode) {
this.countrycode = countrycode;
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/CountryMapper.java
================================================
package tk.mybatis.mapper.base;
import tk.mybatis.mapper.common.Mapper;
public interface CountryMapper extends Mapper<Country> {
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/CreateDB.sql
================================================
drop table country if exists;
create table country
(
id integer NOT NULL PRIMARY KEY,
countryname varchar(32),
countrycode VARCHAR(2) DEFAULT 'HH',
version INTEGER DEFAULT 1 NOT NULL
);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (1, 'Angola', 'AO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (2, 'Afghanistan', 'AF', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (3, 'Albania', 'AL', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (4, 'Algeria', 'DZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (5, 'Andorra', 'AD', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (6, 'Anguilla', 'AI', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (7, 'Antigua and Barbuda', 'AG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (8, 'Argentina', 'AR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (9, 'Armenia', 'AM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (10, 'Australia', 'AU', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (11, 'Austria', 'AT', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (12, 'Azerbaijan', 'AZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (13, 'Bahamas', 'BS', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (14, 'Bahrain', 'BH', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (15, 'Bangladesh', 'BD', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (16, 'Barbados', 'BB', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (17, 'Belarus', 'BY', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (18, 'Belgium', 'BE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (19, 'Belize', 'BZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (20, 'Benin', 'BJ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (21, 'Bermuda Is.', 'BM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (22, 'Bolivia', 'BO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (23, 'Botswana', 'BW', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (24, 'Brazil', 'BR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (25, 'Brunei', 'BN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (26, 'Bulgaria', 'BG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (27, 'Burkina-faso', 'BF', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (28, 'Burma', 'MM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (29, 'Burundi', 'BI', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (30, 'Cameroon', 'CM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (31, 'Canada', 'CA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (32, 'Central African Republic', 'CF', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (33, 'Chad', 'TD', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (34, 'Chile', 'CL', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (35, 'China', 'CN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (36, 'Colombia', 'CO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (37, 'Congo', 'CG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (38, 'Cook Is.', 'CK', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (39, 'Costa Rica', 'CR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (40, 'Cuba', 'CU', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (41, 'Cyprus', 'CY', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (42, 'Czech Republic', 'CZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (43, 'Denmark', 'DK', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (44, 'Djibouti', 'DJ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (45, 'Dominica Rep.', 'DO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (46, 'Ecuador', 'EC', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (47, 'Egypt', 'EG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (48, 'EI Salvador', 'SV', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (49, 'Estonia', 'EE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (50, 'Ethiopia', 'ET', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (51, 'Fiji', 'FJ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (52, 'Finland', 'FI', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (53, 'France', 'FR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (54, 'French Guiana', 'GF', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (55, 'Gabon', 'GA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (56, 'Gambia', 'GM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (57, 'Georgia', 'GE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (58, 'Germany', 'DE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (59, 'Ghana', 'GH', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (60, 'Gibraltar', 'GI', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (61, 'Greece', 'GR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (62, 'Grenada', 'GD', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (63, 'Guam', 'GU', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (64, 'Guatemala', 'GT', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (65, 'Guinea', 'GN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (66, 'Guyana', 'GY', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (67, 'Haiti', 'HT', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (68, 'Honduras', 'HN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (69, 'Hongkong', 'HK', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (70, 'Hungary', 'HU', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (71, 'Iceland', 'IS', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (72, 'India', 'IN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (73, 'Indonesia', 'ID', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (74, 'Iran', 'IR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (75, 'Iraq', 'IQ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (76, 'Ireland', 'IE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (77, 'Israel', 'IL', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (78, 'Italy', 'IT', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (79, 'Jamaica', 'JM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (80, 'Japan', 'JP', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (81, 'Jordan', 'JO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (82, 'Kampuchea (Cambodia )', 'KH', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (83, 'Kazakstan', 'KZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (84, 'Kenya', 'KE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (85, 'Korea', 'KR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (86, 'Kuwait', 'KW', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (87, 'Kyrgyzstan', 'KG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (88, 'Laos', 'LA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (89, 'Latvia', 'LV', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (90, 'Lebanon', 'LB', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (91, 'Lesotho', 'LS', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (92, 'Liberia', 'LR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (93, 'Libya', 'LY', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (94, 'Liechtenstein', 'LI', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (95, 'Lithuania', 'LT', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (96, 'Luxembourg', 'LU', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (97, 'Macao', 'MO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (98, 'Madagascar', 'MG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (99, 'Malawi', 'MW', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (100, 'Malaysia', 'MY', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (101, 'Maldives', 'MV', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (102, 'Mali', 'ML', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (103, 'Malta', 'MT', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (104, 'Mauritius', 'MU', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (105, 'Mexico', 'MX', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (106, 'Moldova, Republic of', 'MD', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (107, 'Monaco', 'MC', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (108, 'Mongolia', 'MN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (109, 'Montserrat Is', 'MS', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (110, 'Morocco', 'MA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (111, 'Mozambique', 'MZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (112, 'Namibia', 'NA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (113, 'Nauru', 'NR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (114, 'Nepal', 'NP', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (115, 'Netherlands', 'NL', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (116, 'New Zealand', 'NZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (117, 'Nicaragua', 'NI', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (118, 'Niger', 'NE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (119, 'Nigeria', 'NG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (120, 'North Korea', 'KP', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (121, 'Norway', 'NO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (122, 'Oman', 'OM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (123, 'Pakistan', 'PK', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (124, 'Panama', 'PA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (125, 'Papua New Cuinea', 'PG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (126, 'Paraguay', 'PY', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (127, 'Peru', 'PE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (128, 'Philippines', 'PH', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (129, 'Poland', 'PL', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (130, 'French Polynesia', 'PF', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (131, 'Portugal', 'PT', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (132, 'Puerto Rico', 'PR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (133, 'Qatar', 'QA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (134, 'Romania', 'RO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (135, 'Russia', 'RU', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (136, 'Saint Lueia', 'LC', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (137, 'Saint Vincent', 'VC', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (138, 'San Marino', 'SM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (139, 'Sao Tome and Principe', 'ST', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (140, 'Saudi Arabia', 'SA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (141, 'Senegal', 'SN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (142, 'Seychelles', 'SC', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (143, 'Sierra Leone', 'SL', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (144, 'Singapore', 'SG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (145, 'Slovakia', 'SK', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (146, 'Slovenia', 'SI', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (147, 'Solomon Is', 'SB', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (148, 'Somali', 'SO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (149, 'South Africa', 'ZA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (150, 'Spain', 'ES', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (151, 'Sri Lanka', 'LK', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (152, 'St.Lucia', 'LC', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (153, 'St.Vincent', 'VC', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (154, 'Sudan', 'SD', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (155, 'Suriname', 'SR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (156, 'Swaziland', 'SZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (157, 'Sweden', 'SE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (158, 'Switzerland', 'CH', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (159, 'Syria', 'SY', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (160, 'Taiwan', 'TW', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (161, 'Tajikstan', 'TJ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (162, 'Tanzania', 'TZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (163, 'Thailand', 'TH', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (164, 'Togo', 'TG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (165, 'Tonga', 'TO', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (166, 'Trinidad and Tobago', 'TT', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (167, 'Tunisia', 'TN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (168, 'Turkey', 'TR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (169, 'Turkmenistan', 'TM', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (170, 'Uganda', 'UG', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (171, 'Ukraine', 'UA', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (172, 'United Arab Emirates', 'AE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (173, 'United Kiongdom', 'GB', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (174, 'United States of America', 'US', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (175, 'Uruguay', 'UY', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (176, 'Uzbekistan', 'UZ', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (177, 'Venezuela', 'VE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (178, 'Vietnam', 'VN', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (179, 'Yemen', 'YE', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (180, 'Yugoslavia', 'YU', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (181, 'Zimbabwe', 'ZW', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (182, 'Zaire', 'ZR', 1);
INSERT INTO country (id, countryname, countrycode, version)
VALUES (183, 'Zambia', 'ZM', 1);
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/delete/DeleteByPrimaryKeyMapperTest.java
================================================
package tk.mybatis.mapper.base.delete;
import org.apache.ibatis.session.SqlSession;
import org.junit.Assert;
import org.junit.Test;
import tk.mybatis.mapper.base.BaseTest;
import tk.mybatis.mapper.base.CountryMapper;
public class DeleteByPrimaryKeyMapperTest extends BaseTest {
@Test
public void testDeleteByPrimaryKey() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Assert.assertEquals(183, mapper.selectAll().size());
Assert.assertEquals(1, mapper.deleteByPrimaryKey(1L));
Assert.assertEquals(182, mapper.selectAll().size());
Assert.assertEquals(1, mapper.deleteByPrimaryKey(2));
Assert.assertEquals(181, mapper.selectAll().size());
Assert.assertEquals(1, mapper.deleteByPrimaryKey("3"));
Assert.assertEquals(180, mapper.selectAll().size());
Assert.assertEquals(0, mapper.deleteByPrimaryKey(1));
Assert.assertEquals(180, mapper.selectAll().size());
} finally {
sqlSession.close();
}
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/delete/SafeDeleteByFieldTest.java
================================================
package tk.mybatis.mapper.base.delete;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import tk.mybatis.mapper.base.BaseTest;
import tk.mybatis.mapper.base.Country;
import tk.mybatis.mapper.base.CountryMapper;
import tk.mybatis.mapper.entity.Config;
import tk.mybatis.mapper.entity.Example;
public class SafeDeleteByFieldTest extends BaseTest {
@Override
protected Config getConfig() {
Config config = super.getConfig();
config.setSafeDelete(true);
return config;
}
@Test(expected = PersistenceException.class)
public void testSafeDelete() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
mapper.delete(new Country());
} finally {
sqlSession.close();
}
}
@Test(expected = PersistenceException.class)
public void testSafeDeleteNull() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
mapper.delete(null);
} finally {
sqlSession.close();
}
}
@Test(expected = PersistenceException.class)
public void testSafeDeleteByExample() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
mapper.deleteByExample(new Example(Country.class));
} finally {
sqlSession.close();
}
}
@Test(expected = PersistenceException.class)
public void testSafeDeleteByExampleNull() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
mapper.deleteByExample(null);
} finally {
sqlSession.close();
}
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/delete/SafeDeleteByMethodTest.java
================================================
package tk.mybatis.mapper.base.delete;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import tk.mybatis.mapper.base.BaseTest;
import tk.mybatis.mapper.base.Country;
import tk.mybatis.mapper.base.CountryMapper;
import tk.mybatis.mapper.entity.Config;
import tk.mybatis.mapper.entity.Example;
public class SafeDeleteByMethodTest extends BaseTest {
@Override
protected Config getConfig() {
Config config = super.getConfig();
config.setSafeDelete(true);
//和 SafeDeleteByFieldTest 测试的区别在此,这里将会使后面调用 EntityField.getValue 时,使用 getter 方法获取值
config.setEnableMethodAnnotation(true);
return config;
}
@Test(expected = PersistenceException.class)
public void testSafeDelete() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
mapper.delete(new Country());
} finally {
sqlSession.close();
}
}
@Test(expected = PersistenceException.class)
public void testSafeDeleteNull() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
mapper.delete(null);
} finally {
sqlSession.close();
}
}
@Test(expected = PersistenceException.class)
public void testSafeDeleteByExample() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
mapper.deleteByExample(new Example(Country.class));
} finally {
sqlSession.close();
}
}
@Test(expected = PersistenceException.class)
public void testSafeDeleteByExampleNull() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
mapper.deleteByExample(null);
} finally {
sqlSession.close();
}
}
@Test(expected = PersistenceException.class)
public void testSafeDeleteByExampleWithNullValueCriterion() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Example example = new Example(Country.class);
example.createCriteria().andEqualTo("countryname", null);
mapper.deleteByExample(example);
} finally {
sqlSession.close();
}
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/Country.java
================================================
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.base.genid;
import tk.mybatis.mapper.annotation.KeySql;
import jakarta.persistence.Id;
import java.io.Serializable;
/**
* @author liuzh
*/
public class Country implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@KeySql(genId = SimpleGenId.class)
private Long id;
private String countryname;
private String countrycode;
public Country() {
}
public Country(String countryname, String countrycode) {
this.countryname = countryname;
this.countrycode = countrycode;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCountryname() {
return countryname;
}
public void setCountryname(String countryname) {
this.countryname = countryname;
}
public String getCountrycode() {
return countrycode;
}
public void setCountrycode(String countrycode) {
this.countrycode = countrycode;
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/CountryMapper.java
================================================
package tk.mybatis.mapper.base.genid;
import tk.mybatis.mapper.common.base.BaseInsertMapper;
public interface CountryMapper extends BaseInsertMapper<Country> {
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/CreateDB.sql
================================================
drop table country if exists;
drop table user if exists;
create table country
(
id bigint NOT NULL PRIMARY KEY,
countryname varchar(32),
countrycode VARCHAR(2)
);
create table user
(
id varchar(64) NOT NULL PRIMARY KEY,
name varchar(32),
code VARCHAR(2)
);
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/InsertGenIdTest.java
================================================
package tk.mybatis.mapper.base.genid;
import org.apache.ibatis.session.SqlSession;
import org.junit.Assert;
import org.junit.Test;
import tk.mybatis.mapper.base.BaseTest;
import java.io.IOException;
import java.io.Reader;
import java.net.URL;
/**
* @author liuzh
*/
public class InsertGenIdTest extends BaseTest {
private String[][] countries = new String[][]{
{"Angola", "AO"},
{"Afghanistan", "AF"},
{"Albania", "AL"},
{"Algeria", "DZ"},
{"Andorra", "AD"},
{"Anguilla", "AI"},
{"Antigua and Barbuda", "AG"},
{"Argentina", "AR"},
{"Armenia", "AM"},
{"Australia", "AU"},
{"Austria", "AT"},
{"Azerbaijan", "AZ"},
{"Bahamas", "BS"},
{"Bahrain", "BH"},
{"Bangladesh", "BD"},
{"Barbados", "BB"},
{"Belarus", "BY"},
{"Belgium", "BE"},
{"Belize", "BZ"},
{"Benin", "BJ"},
{"Bermuda Is.", "BM"},
{"Bolivia", "BO"},
{"Botswana", "BW"},
{"Brazil", "BR"},
{"Brunei", "BN"},
{"Bulgaria", "BG"},
{"Burkina-faso", "BF"},
{"Burma", "MM"},
{"Burundi", "BI"},
{"Cameroon", "CM"},
{"Canada", "CA"},
{"Central African Republic", "CF"},
{"Chad", "TD"},
{"Chile", "CL"},
{"China", "CN"}
};
/**
* 获取 mybatis 配置
*
* @return
*/
protected Reader getConfigFileAsReader() throws IOException {
URL url = getClass().getResource("mybatis-config.xml");
return toReader(url);
}
;
/**
* 获取初始化 sql
*
* @return
*/
protected Reader getSqlFileAsReader() throws IOException {
URL url = getClass().getResource("CreateDB.sql");
return toReader(url);
}
;
@Test
public void testGenId() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
for (int i = 0; i < countries.length; i++) {
Country country = new Country(countries[i][0], countries[i][1]);
Assert.assertEquals(1, mapper.insert(country));
Assert.assertNotNull(country.getId());
System.out.println(country.getId());
}
} finally {
sqlSession.close();
}
}
@Test
public void testGenIdWithExistsId() {
SqlSession sqlSession = getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Country country = new Country("test", "T");
country.setId(9999L);
Assert.assertEquals(1, mapper.insert(country));
Assert.assertNotNull(country.getId());
Assert.assertEquals(new Long(9999), country.getId());
System.out.println(country.getId());
} finally {
sqlSession.close();
}
}
@Test
public void testUUID() {
SqlSession sqlSession = getSqlSession();
try {
UserMapper mapper = sqlSession.getMapper(UserMapper.class);
for (int i = 0; i < countries.length; i++) {
User user = new User(countries[i][0], countries[i][1]);
Assert.assertEquals(1, mapper.insert(user));
Assert.assertNotNull(user.getId());
System.out.println(user.getId());
}
} finally {
sqlSession.close();
}
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/SimpleGenId.java
================================================
package tk.mybatis.mapper.base.genid;
import tk.mybatis.mapper.genid.GenId;
/**
* 一个简单的实现,不考虑任何特殊情况,不要用于生产环境
*
* @author liuzh
*/
public class SimpleGenId implements GenId<Long> {
private Long time;
private Integer seq;
@Override
public synchronized Long genId(String table, String column) {
long current = System.currentTimeMillis();
if (time == null || time != current) {
time = current;
seq = 1;
} else if (current == time) {
seq++;
}
return (time << 20) | seq;
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/UUIdGenId.java
================================================
package tk.mybatis.mapper.base.genid;
import tk.mybatis.mapper.genid.GenId;
import java.util.UUID;
/**
* @author liuzh
*/
public class UUIdGenId implements GenId<String> {
@Override
public String genId(String table, String column) {
return UUID.randomUUID().toString();
}
}
================================================
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/User.java
================================================
package tk.mybatis.mapper.base.genid;
import tk.mybatis.mapper.annotation.KeySql;
import jakarta.persistence.Id;
/**
* @author liuzh
*/
public class User {
@Id
@KeySql(genId = UUIdGenId.class)
private String id;
private String name;
private String code;
public User() {
}
public User(String name, String code) {
this.name = name;
this.code = code;
}
gitextract_5zdklcjy/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── all/
│ ├── README.md
│ ├── dependencies/
│ │ ├── README.md
│ │ └── pom.xml
│ ├── mapper/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ └── ApiInfo.java
│ └── pom.xml
├── base/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ ├── common/
│ │ │ ├── BaseMapper.java
│ │ │ ├── ConditionMapper.java
│ │ │ ├── ExampleMapper.java
│ │ │ ├── IdsMapper.java
│ │ │ ├── Mapper.java
│ │ │ ├── Marker.java
│ │ │ ├── MySqlMapper.java
│ │ │ ├── RowBoundsMapper.java
│ │ │ ├── SaveMapper.java
│ │ │ ├── SqlServerMapper.java
│ │ │ ├── base/
│ │ │ │ ├── BaseDeleteMapper.java
│ │ │ │ ├── BaseInsertMapper.java
│ │ │ │ ├── BaseSelectMapper.java
│ │ │ │ ├── BaseUpdateMapper.java
│ │ │ │ ├── delete/
│ │ │ │ │ ├── DeleteByPrimaryKeyMapper.java
│ │ │ │ │ └── DeleteMapper.java
│ │ │ │ ├── insert/
│ │ │ │ │ ├── InsertMapper.java
│ │ │ │ │ └── InsertSelectiveMapper.java
│ │ │ │ ├── select/
│ │ │ │ │ ├── ExistsWithPrimaryKeyMapper.java
│ │ │ │ │ ├── SelectAllMapper.java
│ │ │ │ │ ├── SelectByPrimaryKeyMapper.java
│ │ │ │ │ ├── SelectCountMapper.java
│ │ │ │ │ ├── SelectMapper.java
│ │ │ │ │ └── SelectOneMapper.java
│ │ │ │ └── update/
│ │ │ │ ├── UpdateByPrimaryKeyMapper.java
│ │ │ │ └── UpdateByPrimaryKeySelectiveMapper.java
│ │ │ ├── condition/
│ │ │ │ ├── DeleteByConditionMapper.java
│ │ │ │ ├── SelectByConditionMapper.java
│ │ │ │ ├── SelectCountByConditionMapper.java
│ │ │ │ ├── UpdateByConditionMapper.java
│ │ │ │ └── UpdateByConditionSelectiveMapper.java
│ │ │ ├── example/
│ │ │ │ ├── DeleteByExampleMapper.java
│ │ │ │ ├── SelectByExampleMapper.java
│ │ │ │ ├── SelectCountByExampleMapper.java
│ │ │ │ ├── SelectOneByExampleMapper.java
│ │ │ │ ├── UpdateByExampleMapper.java
│ │ │ │ └── UpdateByExampleSelectiveMapper.java
│ │ │ ├── ids/
│ │ │ │ ├── DeleteByIdsMapper.java
│ │ │ │ └── SelectByIdsMapper.java
│ │ │ ├── progressive/
│ │ │ │ └── ProgressiveMapper.java
│ │ │ ├── rowbounds/
│ │ │ │ ├── SelectByConditionRowBoundsMapper.java
│ │ │ │ ├── SelectByExampleRowBoundsMapper.java
│ │ │ │ └── SelectRowBoundsMapper.java
│ │ │ ├── special/
│ │ │ │ ├── InsertListMapper.java
│ │ │ │ └── InsertUseGeneratedKeysMapper.java
│ │ │ └── sqlserver/
│ │ │ ├── InsertMapper.java
│ │ │ └── InsertSelectiveMapper.java
│ │ └── provider/
│ │ ├── ConditionProvider.java
│ │ ├── ExampleProvider.java
│ │ ├── IdsProvider.java
│ │ ├── SaveProvider.java
│ │ ├── SpecialProvider.java
│ │ ├── SqlServerProvider.java
│ │ └── base/
│ │ ├── BaseDeleteProvider.java
│ │ ├── BaseInsertProvider.java
│ │ ├── BaseSelectProvider.java
│ │ └── BaseUpdateProvider.java
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ ├── base/
│ │ │ ├── BaseTest.java
│ │ │ ├── Country.java
│ │ │ ├── CountryMapper.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── delete/
│ │ │ │ ├── DeleteByPrimaryKeyMapperTest.java
│ │ │ │ ├── SafeDeleteByFieldTest.java
│ │ │ │ └── SafeDeleteByMethodTest.java
│ │ │ ├── genid/
│ │ │ │ ├── Country.java
│ │ │ │ ├── CountryMapper.java
│ │ │ │ ├── CreateDB.sql
│ │ │ │ ├── InsertGenIdTest.java
│ │ │ │ ├── SimpleGenId.java
│ │ │ │ ├── UUIdGenId.java
│ │ │ │ ├── User.java
│ │ │ │ ├── UserMapper.java
│ │ │ │ └── mybatis-config.xml
│ │ │ ├── mybatis-config.xml
│ │ │ └── update/
│ │ │ ├── SafeUpdateByFieldTest.java
│ │ │ └── SafeUpdateByMethodTest.java
│ │ ├── cache/
│ │ │ ├── CacheTest.java
│ │ │ ├── CountryCacheMapper.java
│ │ │ ├── CountryCacheRefMapper.java
│ │ │ ├── CountryCacheRefMapper.xml
│ │ │ ├── CountryCacheWithXmlMapper.java
│ │ │ ├── CountryCacheWithXmlMapper.xml
│ │ │ └── mybatis-config-cache.xml
│ │ ├── defaultenumtypehandler/
│ │ │ ├── CreateDB.sql
│ │ │ ├── DefaultEnumTypeHandlerTest.java
│ │ │ ├── Dict.java
│ │ │ ├── DictTypeHandler.java
│ │ │ ├── LockDictEnum.java
│ │ │ ├── StateDictEnum.java
│ │ │ ├── User.java
│ │ │ ├── UserMapper.java
│ │ │ └── mybatis-config-defaultenumtypehandler.xml
│ │ ├── entity/
│ │ │ └── model/
│ │ │ └── CountryExample.java
│ │ ├── generatedvalue/
│ │ │ ├── CreateDB.sql
│ │ │ ├── GeneratedValueTest.java
│ │ │ ├── UserAutoIncrement.java
│ │ │ ├── UserAutoIncrementIdentity.java
│ │ │ ├── UserAutoIncrementIdentityMapper.java
│ │ │ ├── UserAutoIncrementMapper.java
│ │ │ ├── UserSqlAfter.java
│ │ │ ├── UserSqlAfterMapper.java
│ │ │ └── mybatis-config-keysql-mysql.xml
│ │ ├── helper/
│ │ │ ├── CamelCaseTest.java
│ │ │ ├── FieldHelperTest.java
│ │ │ ├── FieldTest.java
│ │ │ └── MultipleMapperProviderTest.java
│ │ ├── hsqldb/
│ │ │ ├── HsqldbMapper.java
│ │ │ └── HsqldbProvider.java
│ │ ├── issues/
│ │ │ ├── _216_datetime/
│ │ │ │ ├── CreateDB.sql
│ │ │ │ ├── DateTimeTest.java
│ │ │ │ ├── TimeModel.java
│ │ │ │ ├── TimeModel2.java
│ │ │ │ ├── TimeModel2Mapper.java
│ │ │ │ ├── TimeModel3.java
│ │ │ │ ├── TimeModel3Mapper.java
│ │ │ │ ├── TimeModelMapper.java
│ │ │ │ └── mybatis-config-timestamp.xml
│ │ │ └── package-info.java
│ │ ├── keysql/
│ │ │ ├── CreateDB.sql
│ │ │ ├── KeySqlTest.java
│ │ │ ├── UserAutoIncrement.java
│ │ │ ├── UserAutoIncrementIdentity.java
│ │ │ ├── UserAutoIncrementIdentityMapper.java
│ │ │ ├── UserAutoIncrementMapper.java
│ │ │ ├── UserSqlAfter.java
│ │ │ ├── UserSqlAfterMapper.java
│ │ │ ├── UserSqlBefore.java
│ │ │ ├── UserSqlBeforeMapper.java
│ │ │ └── mybatis-config-keysql-mysql.xml
│ │ ├── mapper/
│ │ │ ├── CachedCountryMapper.java
│ │ │ ├── Country2Mapper.java
│ │ │ ├── CountryIMapper.java
│ │ │ ├── CountryJDBCMapper.java
│ │ │ ├── CountryMapper.java
│ │ │ ├── CountryMultipleMapper.java
│ │ │ ├── CountryTMapper.java
│ │ │ ├── CountryVersionMapper.java
│ │ │ ├── JDBCMapper.java
│ │ │ ├── MultipleCommonMapper.java
│ │ │ ├── MybatisHelper.java
│ │ │ ├── TbUserLogicDeleteMapper.java
│ │ │ ├── TbUserMapper.java
│ │ │ ├── UserInfoAbleMapper.java
│ │ │ ├── UserInfoMapMapper.java
│ │ │ ├── UserInfoMapper.java
│ │ │ ├── UserLogin2Mapper.java
│ │ │ └── UserLoginMapper.java
│ │ ├── model/
│ │ │ ├── BaseLogicDelete.java
│ │ │ ├── Country.java
│ │ │ ├── Country2.java
│ │ │ ├── CountryExample.java
│ │ │ ├── CountryI.java
│ │ │ ├── CountryJDBC.java
│ │ │ ├── CountryT.java
│ │ │ ├── CountryVersion.java
│ │ │ ├── Entity.java
│ │ │ ├── TbUser.java
│ │ │ ├── TbUserLogicDelete.java
│ │ │ ├── UserInfo.java
│ │ │ ├── UserInfoAble.java
│ │ │ ├── UserInfoMap.java
│ │ │ ├── UserLogin.java
│ │ │ ├── UserLogin2.java
│ │ │ ├── UserLogin2Key.java
│ │ │ └── UserParent.java
│ │ ├── rawresultmap/
│ │ │ ├── CreateDB.sql
│ │ │ ├── RawResultMapTest.java
│ │ │ ├── User.java
│ │ │ ├── UserMapper.java
│ │ │ ├── UserMapper.xml
│ │ │ └── mybatis-config-rawresultmap.xml
│ │ ├── test/
│ │ │ ├── able/
│ │ │ │ └── TestBasicAble.java
│ │ │ ├── country/
│ │ │ │ ├── TestCache.java
│ │ │ │ ├── TestDeleteByPrimaryKey.java
│ │ │ │ ├── TestExistsWithPrimaryKey.java
│ │ │ │ ├── TestInsert.java
│ │ │ │ ├── TestInsertSelective.java
│ │ │ │ ├── TestSelect.java
│ │ │ │ ├── TestSelectAll.java
│ │ │ │ ├── TestSelectByPrimaryKey.java
│ │ │ │ ├── TestSelectCount.java
│ │ │ │ ├── TestSelectOne.java
│ │ │ │ ├── TestUpdateByPrimaryKey.java
│ │ │ │ └── TestUpdateByPrimaryKeySelective.java
│ │ │ ├── country2/
│ │ │ │ ├── TestInsert.java
│ │ │ │ └── TestInsertSelective.java
│ │ │ ├── example/
│ │ │ │ ├── TestDeleteByExample.java
│ │ │ │ ├── TestExampleBuilder.java
│ │ │ │ ├── TestSelectByExample.java
│ │ │ │ ├── TestSelectCountByExample.java
│ │ │ │ ├── TestSelectOneByExample.java
│ │ │ │ ├── TestUpdateByExample.java
│ │ │ │ └── TestUpdateByExampleSelective.java
│ │ │ ├── identity/
│ │ │ │ └── TestIndentity.java
│ │ │ ├── ids/
│ │ │ │ └── TestIds.java
│ │ │ ├── jdbc/
│ │ │ │ └── TestJDBC.java
│ │ │ ├── logic/
│ │ │ │ └── TestLogicDelete.java
│ │ │ ├── mysql/
│ │ │ │ └── TestMysql.java
│ │ │ ├── othres/
│ │ │ │ ├── StyleTest.java
│ │ │ │ └── TestDelimiter.java
│ │ │ ├── rowbounds/
│ │ │ │ └── TestSelectRowBounds.java
│ │ │ ├── transientc/
│ │ │ │ └── TestTransient.java
│ │ │ └── user/
│ │ │ ├── TestBasic.java
│ │ │ ├── TestDelete.java
│ │ │ ├── TestMap.java
│ │ │ ├── TestUserLogin.java
│ │ │ └── TestUserLogin2.java
│ │ ├── typehandler/
│ │ │ ├── Address.java
│ │ │ ├── AddressTypeHandler.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── StateEnum.java
│ │ │ ├── StateEnumTypeHandler.java
│ │ │ ├── TypeHandlerTest.java
│ │ │ ├── TypeHandlerTest2.java
│ │ │ ├── User.java
│ │ │ ├── User2.java
│ │ │ ├── User2Mapper.java
│ │ │ ├── UserMapper.java
│ │ │ ├── mybatis-config-typehandler.xml
│ │ │ └── mybatis-config-typehandler2.xml
│ │ └── version/
│ │ ├── CreateDB.sql
│ │ ├── UserInt.java
│ │ ├── UserIntMapper.java
│ │ ├── UserTimestamp.java
│ │ ├── UserTimestampMapper.java
│ │ ├── VersionTest.java
│ │ └── mybatis-config-version.xml
│ └── resources/
│ ├── CachedCountryMapper.xml
│ ├── CreateDB.sql
│ ├── logback.xml
│ └── mybatis-java.xml
├── core/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ ├── LogicDeleteException.java
│ │ ├── MapperException.java
│ │ ├── annotation/
│ │ │ ├── ColumnType.java
│ │ │ ├── KeySql.java
│ │ │ ├── LogicDelete.java
│ │ │ ├── NameStyle.java
│ │ │ ├── Order.java
│ │ │ ├── RegisterMapper.java
│ │ │ └── Version.java
│ │ ├── code/
│ │ │ ├── IdentityDialect.java
│ │ │ ├── ORDER.java
│ │ │ └── Style.java
│ │ ├── entity/
│ │ │ ├── Condition.java
│ │ │ ├── Config.java
│ │ │ ├── EntityColumn.java
│ │ │ ├── EntityField.java
│ │ │ ├── EntityTable.java
│ │ │ ├── Example.java
│ │ │ ├── IDynamicTableName.java
│ │ │ └── SqlsCriteria.java
│ │ ├── genid/
│ │ │ ├── GenId.java
│ │ │ └── GenIdUtil.java
│ │ ├── gensql/
│ │ │ └── GenSql.java
│ │ ├── mapperhelper/
│ │ │ ├── EntityHelper.java
│ │ │ ├── FieldHelper.java
│ │ │ ├── MapperHelper.java
│ │ │ ├── MapperTemplate.java
│ │ │ ├── SelectKeyGenerator.java
│ │ │ ├── SelectKeyHelper.java
│ │ │ ├── SqlHelper.java
│ │ │ └── resolve/
│ │ │ ├── DefaultEntityResolve.java
│ │ │ └── EntityResolve.java
│ │ ├── provider/
│ │ │ └── EmptyProvider.java
│ │ ├── session/
│ │ │ └── Configuration.java
│ │ ├── util/
│ │ │ ├── Assert.java
│ │ │ ├── MetaObjectUtil.java
│ │ │ ├── MsUtil.java
│ │ │ ├── OGNL.java
│ │ │ ├── SimpleTypeUtil.java
│ │ │ ├── SqlReservedWords.java
│ │ │ ├── Sqls.java
│ │ │ └── StringUtil.java
│ │ └── version/
│ │ ├── DefaultNextVersion.java
│ │ ├── NextVersion.java
│ │ ├── VersionException.java
│ │ └── VersionUtil.java
│ └── test/
│ └── java/
│ └── tk/
│ └── mybatis/
│ └── mapper/
│ ├── annotation/
│ │ ├── ColumnTest.java
│ │ ├── ColumnTypeTest.java
│ │ ├── IdTest.java
│ │ ├── KeySqlTest.java
│ │ ├── NameStyleTest.java
│ │ ├── RegisterMapperTest.java
│ │ ├── TableTest.java
│ │ └── VersionTest.java
│ ├── mapperhelper/
│ │ ├── ComplexEntityTest.java
│ │ ├── FieldHelperTest.java
│ │ └── SqlHelperTest.java
│ └── util/
│ └── StringUtilTest.java
├── extra/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ └── additional/
│ │ ├── aggregation/
│ │ │ ├── AggregateCondition.java
│ │ │ ├── AggregateType.java
│ │ │ ├── AggregationMapper.java
│ │ │ └── AggregationProvider.java
│ │ ├── delete/
│ │ │ ├── DeleteByPropertyMapper.java
│ │ │ └── DeletePropertyProvider.java
│ │ ├── dialect/
│ │ │ └── oracle/
│ │ │ ├── InsertListMapper.java
│ │ │ ├── OracleMapper.java
│ │ │ └── OracleProvider.java
│ │ ├── idlist/
│ │ │ ├── DeleteByIdListMapper.java
│ │ │ ├── IdListMapper.java
│ │ │ ├── IdListProvider.java
│ │ │ └── SelectByIdListMapper.java
│ │ ├── insert/
│ │ │ ├── InsertListMapper.java
│ │ │ └── InsertListProvider.java
│ │ ├── select/
│ │ │ ├── SelectByPropertyMapper.java
│ │ │ ├── SelectPropertyProvider.java
│ │ │ ├── SelectSpecifyColumnsMapper.java
│ │ │ └── SelectSpecifyColumnsProvider.java
│ │ ├── update/
│ │ │ ├── batch/
│ │ │ │ ├── BatchUpdateMapper.java
│ │ │ │ ├── BatchUpdateProvider.java
│ │ │ │ └── BatchUpdateSelectiveMapper.java
│ │ │ ├── differ/
│ │ │ │ ├── UpdateByDifferMapper.java
│ │ │ │ └── UpdateByDifferProvider.java
│ │ │ └── force/
│ │ │ ├── UpdateByPrimaryKeySelectiveForceMapper.java
│ │ │ └── UpdateByPrimaryKeySelectiveForceProvider.java
│ │ └── upsert/
│ │ ├── BatchUpsertMapper.java
│ │ ├── BatchUpsertProvider.java
│ │ ├── UpsertMapper.java
│ │ └── UpsertProvider.java
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ └── additional/
│ │ ├── BaseTest.java
│ │ ├── Country.java
│ │ ├── CountryMapper.java
│ │ ├── CreateDB.sql
│ │ ├── aggregation/
│ │ │ ├── AggregationHumpTest.java
│ │ │ ├── AggregationMapperTest.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── User.java
│ │ │ ├── UserHump.java
│ │ │ ├── UserHumpMapper.java
│ │ │ ├── UserMapper.java
│ │ │ └── mybatis-config.xml
│ │ ├── delete/
│ │ │ ├── Course.java
│ │ │ ├── CourseMapper.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── DeleteByPropertyMapperTest.java
│ │ │ └── mybatis-config.xml
│ │ ├── dialect/
│ │ │ └── oracle/
│ │ │ ├── CreateDB.sql
│ │ │ ├── DemoCountry.java
│ │ │ ├── DemoCountryMapper.java
│ │ │ ├── OracleTest.java
│ │ │ └── mybatis-config.xml
│ │ ├── idlist/
│ │ │ ├── ABaseMapper.java
│ │ │ ├── CountryMapper.java
│ │ │ ├── IdListMapperTest.java
│ │ │ └── mybatis-config.xml
│ │ ├── insertlist/
│ │ │ ├── CreateDB.sql
│ │ │ ├── InsertListMapperTest.java
│ │ │ ├── UUIdGenId.java
│ │ │ ├── User.java
│ │ │ ├── UserMapper.java
│ │ │ └── mybatis-config.xml
│ │ ├── mybatis-config.xml
│ │ ├── select/
│ │ │ ├── Book.java
│ │ │ ├── BookMapper.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── SelectByPropertyMapperTest.java
│ │ │ └── mybatis-config.xml
│ │ └── update/
│ │ ├── differ/
│ │ │ ├── CountryMapper.java
│ │ │ ├── UpdateByDifferMapperTest.java
│ │ │ └── mybatis-config.xml
│ │ └── force/
│ │ ├── CountryInt.java
│ │ ├── CountryIntMapper.java
│ │ ├── CreateDB.sql
│ │ ├── UpdateByPrimaryKeySelectiveForceTest.java
│ │ └── mybatis-config.xml
│ └── resources/
│ └── logback.xml
├── generator/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── tk/
│ │ │ └── mybatis/
│ │ │ └── mapper/
│ │ │ └── generator/
│ │ │ ├── FalseMethodPlugin.java
│ │ │ ├── MapperCommentGenerator.java
│ │ │ ├── MapperPlugin.java
│ │ │ ├── TemplateFilePlugin.java
│ │ │ ├── TkMyBatis3Impl.java
│ │ │ ├── TkMyBatis3SimpleImpl.java
│ │ │ ├── file/
│ │ │ │ ├── GenerateByListTemplateFile.java
│ │ │ │ └── GenerateByTemplateFile.java
│ │ │ ├── formatter/
│ │ │ │ ├── FreemarkerTemplateFormatter.java
│ │ │ │ ├── ListTemplateFormatter.java
│ │ │ │ └── TemplateFormatter.java
│ │ │ └── model/
│ │ │ ├── ColumnField.java
│ │ │ ├── TableClass.java
│ │ │ └── TableColumnBuilder.java
│ │ └── resources/
│ │ └── generator/
│ │ ├── mapper.ftl
│ │ ├── mapperXml.ftl
│ │ ├── test-all.ftl
│ │ └── test-one.ftl
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ └── generator/
│ │ └── Generator.java
│ └── resources/
│ ├── CreateDB.sql
│ └── generatorConfig.xml
├── pom.xml
├── solon-plugin/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── tk/
│ │ │ └── mybatis/
│ │ │ └── solon/
│ │ │ ├── TkMapperAdapterFactory.java
│ │ │ ├── TkMapperMybatisAdapter.java
│ │ │ └── XPluginImpl.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── solon/
│ │ └── mybatis-tkmapper-solon-plugin.properties
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── solon/
│ │ └── test/
│ │ ├── TkMapperTest.java
│ │ ├── conf/
│ │ │ └── TestConfig.java
│ │ ├── entity/
│ │ │ └── User.java
│ │ ├── mapper/
│ │ │ └── UserMapper.java
│ │ └── service/
│ │ └── TkMapperServiceTest.java
│ └── resources/
│ ├── app.yml
│ └── mapper/
│ └── UserMapper.xml
├── spring/
│ ├── README.md
│ ├── license.txt
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── spring/
│ │ ├── annotation/
│ │ │ ├── BaseProperties.java
│ │ │ ├── MapperScan.java
│ │ │ ├── MapperScannerRegistrar.java
│ │ │ └── MapperScans.java
│ │ └── mapper/
│ │ ├── ClassPathMapperScanner.java
│ │ ├── MapperFactoryBean.java
│ │ ├── MapperScannerConfigurer.java
│ │ └── SpringBootBindUtil.java
│ └── test/
│ ├── java/
│ │ └── tk/
│ │ └── mybatis/
│ │ └── mapper/
│ │ ├── annotation/
│ │ │ ├── Country.java
│ │ │ ├── CountryMapper.java
│ │ │ └── SpringAnnotationTest.java
│ │ ├── configuration/
│ │ │ ├── Country.java
│ │ │ ├── CountryMapper.java
│ │ │ ├── CreateDB.sql
│ │ │ ├── SpringConfigTest.java
│ │ │ └── spring.xml
│ │ └── xml/
│ │ ├── Country.java
│ │ ├── CountryMapper.java
│ │ ├── CreateDB.sql
│ │ ├── SpringXmlTest.java
│ │ └── spring.xml
│ └── resources/
│ └── logback.xml
├── spring-boot-starter/
│ ├── README.md
│ ├── mapper-spring-boot-autoconfigure/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── tk/
│ │ │ └── mybatis/
│ │ │ └── mapper/
│ │ │ └── autoconfigure/
│ │ │ ├── ConfigurationCustomizer.java
│ │ │ ├── MapperAutoConfiguration.java
│ │ │ ├── MapperCacheDisabler.java
│ │ │ ├── MapperProperties.java
│ │ │ ├── MybatisDependsOnDatabaseInitializationDetector.java
│ │ │ ├── MybatisLanguageDriverAutoConfiguration.java
│ │ │ ├── MybatisProperties.java
│ │ │ ├── SpringBootVFS.java
│ │ │ └── SqlSessionFactoryBeanCustomizer.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── spring/
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
│ ├── mapper-spring-boot-samples/
│ │ ├── mapper-spring-boot-sample-annotation/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── java/
│ │ │ │ └── tk/
│ │ │ │ └── mybatis/
│ │ │ │ └── sample/
│ │ │ │ ├── SampleMapperApplication.java
│ │ │ │ ├── domain/
│ │ │ │ │ └── Country.java
│ │ │ │ └── mapper/
│ │ │ │ └── CountryMapper.java
│ │ │ └── resources/
│ │ │ ├── application.properties
│ │ │ ├── import.sql
│ │ │ └── logback.xml
│ │ ├── mapper-spring-boot-sample-xml/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── java/
│ │ │ │ └── tk/
│ │ │ │ └── mybatis/
│ │ │ │ └── sample/
│ │ │ │ ├── SampleXmlApplication.java
│ │ │ │ ├── domain/
│ │ │ │ │ └── Country.java
│ │ │ │ └── mapper/
│ │ │ │ ├── BaseMapper.java
│ │ │ │ └── CountryMapper.java
│ │ │ └── resources/
│ │ │ ├── application.yml
│ │ │ ├── import.sql
│ │ │ ├── logback.xml
│ │ │ ├── mybatis-config.xml
│ │ │ └── tk/
│ │ │ └── mybatis/
│ │ │ └── sample/
│ │ │ └── mapper/
│ │ │ └── CountryMapper.xml
│ │ └── pom.xml
│ ├── mapper-spring-boot-starter/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── resources/
│ │ └── META-INF/
│ │ └── spring.provides
│ └── pom.xml
└── weekend/
├── README.md
├── pom.xml
└── src/
├── main/
│ └── java/
│ └── tk/
│ └── mybatis/
│ └── mapper/
│ └── weekend/
│ ├── Fn.java
│ ├── SqlCriteriaHelper.java
│ ├── Weekend.java
│ ├── WeekendCriteria.java
│ ├── WeekendSqls.java
│ ├── WeekendSqlsUtils.java
│ └── reflection/
│ ├── ReflectionOperationException.java
│ └── Reflections.java
└── test/
├── java/
│ └── tk/
│ └── mybatis/
│ └── mapper/
│ └── weekend/
│ ├── MybatisHelper.java
│ ├── SqlCriteriaHelperTest.java
│ ├── UserMapperTest.java
│ ├── WeekendSqlsTest.java
│ ├── WeekendSqlsUtilsTest.java
│ ├── entity/
│ │ ├── Country.java
│ │ └── User.java
│ └── mapper/
│ ├── CountryMapper.java
│ └── UserMapper.java
└── resources/
├── CreateDB.sql
├── logback.xml
└── mybatis-java.xml
Showing preview only (251K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2745 symbols across 409 files)
FILE: all/mapper/src/main/java/tk/mybatis/mapper/ApiInfo.java
class ApiInfo (line 8) | public class ApiInfo {
FILE: base/src/main/java/tk/mybatis/mapper/common/BaseMapper.java
type BaseMapper (line 42) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/ConditionMapper.java
type ConditionMapper (line 36) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/ExampleMapper.java
type ExampleMapper (line 35) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/IdsMapper.java
type IdsMapper (line 36) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/Mapper.java
type Mapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/Marker.java
type Marker (line 33) | public interface Marker {
FILE: base/src/main/java/tk/mybatis/mapper/common/MySqlMapper.java
type MySqlMapper (line 36) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/RowBoundsMapper.java
type RowBoundsMapper (line 40) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/SaveMapper.java
type SaveMapper (line 12) | public interface SaveMapper<T> {
method save (line 20) | @InsertProvider(type = SaveProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/SqlServerMapper.java
type SqlServerMapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/base/BaseDeleteMapper.java
type BaseDeleteMapper (line 37) | @RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/base/BaseInsertMapper.java
type BaseInsertMapper (line 37) | @RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/base/BaseSelectMapper.java
type BaseSelectMapper (line 36) | @RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/base/BaseUpdateMapper.java
type BaseUpdateMapper (line 37) | @RegisterMapper
FILE: base/src/main/java/tk/mybatis/mapper/common/base/delete/DeleteByPrimaryKeyMapper.java
type DeleteByPrimaryKeyMapper (line 37) | @RegisterMapper
method deleteByPrimaryKey (line 46) | @DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/delete/DeleteMapper.java
type DeleteMapper (line 37) | @RegisterMapper
method delete (line 46) | @DeleteProvider(type = BaseDeleteProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/insert/InsertMapper.java
type InsertMapper (line 37) | @RegisterMapper
method insert (line 46) | @InsertProvider(type = BaseInsertProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/insert/InsertSelectiveMapper.java
type InsertSelectiveMapper (line 37) | @RegisterMapper
method insertSelective (line 46) | @InsertProvider(type = BaseInsertProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/ExistsWithPrimaryKeyMapper.java
type ExistsWithPrimaryKeyMapper (line 37) | @RegisterMapper
method existsWithPrimaryKey (line 46) | @SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectAllMapper.java
type SelectAllMapper (line 36) | @RegisterMapper
method selectAll (line 44) | @SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectByPrimaryKeyMapper.java
type SelectByPrimaryKeyMapper (line 43) | @RegisterMapper
method selectByPrimaryKey (line 52) | @SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectCountMapper.java
type SelectCountMapper (line 37) | @RegisterMapper
method selectCount (line 46) | @SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectMapper.java
type SelectMapper (line 39) | @RegisterMapper
method select (line 48) | @SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/select/SelectOneMapper.java
type SelectOneMapper (line 37) | @RegisterMapper
method selectOne (line 46) | @SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/update/UpdateByPrimaryKeyMapper.java
type UpdateByPrimaryKeyMapper (line 37) | @RegisterMapper
method updateByPrimaryKey (line 46) | @UpdateProvider(type = BaseUpdateProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/base/update/UpdateByPrimaryKeySelectiveMapper.java
type UpdateByPrimaryKeySelectiveMapper (line 37) | @RegisterMapper
method updateByPrimaryKeySelective (line 46) | @UpdateProvider(type = BaseUpdateProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/DeleteByConditionMapper.java
type DeleteByConditionMapper (line 37) | @RegisterMapper
method deleteByCondition (line 46) | @DeleteProvider(type = ConditionProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/SelectByConditionMapper.java
type SelectByConditionMapper (line 38) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectByCondition (line 47) | @SelectProvider(type = ConditionProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/SelectCountByConditionMapper.java
type SelectCountByConditionMapper (line 36) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectCountByCondition (line 45) | @SelectProvider(type = ConditionProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/UpdateByConditionMapper.java
type UpdateByConditionMapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
method updateByCondition (line 47) | @UpdateProvider(type = ConditionProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/condition/UpdateByConditionSelectiveMapper.java
type UpdateByConditionSelectiveMapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
method updateByConditionSelective (line 47) | @UpdateProvider(type = ConditionProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/example/DeleteByExampleMapper.java
type DeleteByExampleMapper (line 36) | @tk.mybatis.mapper.annotation.RegisterMapper
method deleteByExample (line 45) | @DeleteProvider(type = ExampleProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/example/SelectByExampleMapper.java
type SelectByExampleMapper (line 38) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectByExample (line 47) | @SelectProvider(type = ExampleProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/example/SelectCountByExampleMapper.java
type SelectCountByExampleMapper (line 36) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectCountByExample (line 45) | @SelectProvider(type = ExampleProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/example/SelectOneByExampleMapper.java
type SelectOneByExampleMapper (line 36) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectOneByExample (line 45) | @SelectProvider(type = ExampleProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/example/UpdateByExampleMapper.java
type UpdateByExampleMapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
method updateByExample (line 47) | @UpdateProvider(type = ExampleProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/example/UpdateByExampleSelectiveMapper.java
type UpdateByExampleSelectiveMapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
method updateByExampleSelective (line 47) | @UpdateProvider(type = ExampleProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/ids/DeleteByIdsMapper.java
type DeleteByIdsMapper (line 36) | @tk.mybatis.mapper.annotation.RegisterMapper
method deleteByIds (line 45) | @DeleteProvider(type = IdsProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/ids/SelectByIdsMapper.java
type SelectByIdsMapper (line 38) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectByIds (line 47) | @SelectProvider(type = IdsProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/progressive/ProgressiveMapper.java
type ProgressiveMapper (line 21) | @RegisterMapper
method handleRecordProgressive (line 31) | default void handleRecordProgressive(Consumer<T> consumer) throws NoSu...
method deleteAllProgressive (line 61) | default void deleteAllProgressive() throws NoSuchFieldException, Illeg...
method getParameterType (line 87) | default Class<?> getParameterType() {
method getParameterizedType (line 102) | default ParameterizedType getParameterizedType(Type[] rawClassGenericI...
method getMinimumId (line 118) | default Long getMinimumId() throws NoSuchFieldException, IllegalAccess...
method getMaxId (line 141) | default Long getMaxId() throws NoSuchFieldException, IllegalAccessExce...
FILE: base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectByConditionRowBoundsMapper.java
type SelectByConditionRowBoundsMapper (line 39) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectByConditionAndRowBounds (line 49) | @SelectProvider(type = ConditionProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectByExampleRowBoundsMapper.java
type SelectByExampleRowBoundsMapper (line 39) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectByExampleAndRowBounds (line 49) | @SelectProvider(type = ExampleProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectRowBoundsMapper.java
type SelectRowBoundsMapper (line 39) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectByRowBounds (line 49) | @SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
FILE: base/src/main/java/tk/mybatis/mapper/common/special/InsertListMapper.java
type InsertListMapper (line 39) | @tk.mybatis.mapper.annotation.RegisterMapper
method insertList (line 48) | @Options(useGeneratedKeys = true)
FILE: base/src/main/java/tk/mybatis/mapper/common/special/InsertUseGeneratedKeysMapper.java
type InsertUseGeneratedKeysMapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
method insertUseGeneratedKeys (line 46) | @Options(useGeneratedKeys = true)
FILE: base/src/main/java/tk/mybatis/mapper/common/sqlserver/InsertMapper.java
type InsertMapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
method insert (line 46) | @Options(useGeneratedKeys = true)
FILE: base/src/main/java/tk/mybatis/mapper/common/sqlserver/InsertSelectiveMapper.java
type InsertSelectiveMapper (line 37) | @tk.mybatis.mapper.annotation.RegisterMapper
method insertSelective (line 40) | @Options(useGeneratedKeys = true)
FILE: base/src/main/java/tk/mybatis/mapper/provider/ConditionProvider.java
class ConditionProvider (line 36) | public class ConditionProvider extends MapperTemplate {
method ConditionProvider (line 40) | public ConditionProvider(Class<?> mapperClass, MapperHelper mapperHelp...
method selectCountByCondition (line 51) | public String selectCountByCondition(MappedStatement ms) {
method deleteByCondition (line 61) | public String deleteByCondition(MappedStatement ms) {
method selectByCondition (line 72) | public String selectByCondition(MappedStatement ms) {
method selectByConditionAndRowBounds (line 82) | public String selectByConditionAndRowBounds(MappedStatement ms) {
method updateByConditionSelective (line 92) | public String updateByConditionSelective(MappedStatement ms) {
method updateByCondition (line 102) | public String updateByCondition(MappedStatement ms) {
FILE: base/src/main/java/tk/mybatis/mapper/provider/ExampleProvider.java
class ExampleProvider (line 39) | public class ExampleProvider extends MapperTemplate {
method ExampleProvider (line 41) | public ExampleProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method selectCountByExample (line 51) | public String selectCountByExample(MappedStatement ms) {
method deleteByExample (line 70) | public String deleteByExample(MappedStatement ms) {
method selectByExample (line 100) | public String selectByExample(MappedStatement ms) {
method selectByExampleAndRowBounds (line 124) | public String selectByExampleAndRowBounds(MappedStatement ms) {
method updateByExampleSelective (line 134) | public String updateByExampleSelective(MappedStatement ms) {
method updateByExample (line 156) | public String updateByExample(MappedStatement ms) {
method selectOneByExample (line 178) | public String selectOneByExample(MappedStatement ms) {
FILE: base/src/main/java/tk/mybatis/mapper/provider/IdsProvider.java
class IdsProvider (line 44) | public class IdsProvider extends MapperTemplate {
method IdsProvider (line 46) | public IdsProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method deleteByIds (line 56) | public String deleteByIds(MappedStatement ms) {
method selectByIds (line 78) | public String selectByIds(MappedStatement ms) {
FILE: base/src/main/java/tk/mybatis/mapper/provider/SaveProvider.java
class SaveProvider (line 16) | public class SaveProvider extends MapperTemplate {
method SaveProvider (line 19) | public SaveProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method save (line 28) | public String save(MappedStatement ms){
method updateByPrimaryKey (line 56) | public String updateByPrimaryKey(MappedStatement ms) {
method insert (line 65) | public String insert(MappedStatement ms) {
method processKey (line 98) | private void processKey(StringBuilder sql, Class<?> entityClass, Mappe...
FILE: base/src/main/java/tk/mybatis/mapper/provider/SpecialProvider.java
class SpecialProvider (line 41) | public class SpecialProvider extends MapperTemplate {
method SpecialProvider (line 43) | public SpecialProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method insertList (line 52) | public String insertList(MappedStatement ms) {
method insertUseGeneratedKeys (line 84) | public String insertUseGeneratedKeys(MappedStatement ms) {
FILE: base/src/main/java/tk/mybatis/mapper/provider/SqlServerProvider.java
class SqlServerProvider (line 38) | public class SqlServerProvider extends MapperTemplate {
method SqlServerProvider (line 40) | public SqlServerProvider(Class<?> mapperClass, MapperHelper mapperHelp...
method insert (line 49) | public String insert(MappedStatement ms) {
method insertSelective (line 69) | public String insertSelective(MappedStatement ms) {
FILE: base/src/main/java/tk/mybatis/mapper/provider/base/BaseDeleteProvider.java
class BaseDeleteProvider (line 40) | public class BaseDeleteProvider extends MapperTemplate {
method BaseDeleteProvider (line 42) | public BaseDeleteProvider(Class<?> mapperClass, MapperHelper mapperHel...
method delete (line 52) | public String delete(MappedStatement ms) {
method deleteByPrimaryKey (line 78) | public String deleteByPrimaryKey(MappedStatement ms) {
FILE: base/src/main/java/tk/mybatis/mapper/provider/base/BaseInsertProvider.java
class BaseInsertProvider (line 39) | public class BaseInsertProvider extends MapperTemplate {
method BaseInsertProvider (line 41) | public BaseInsertProvider(Class<?> mapperClass, MapperHelper mapperHel...
method insert (line 45) | public String insert(MappedStatement ms) {
method insertSelective (line 83) | public String insertSelective(MappedStatement ms) {
method processKey (line 135) | private void processKey(StringBuilder sql, Class<?> entityClass, Mappe...
FILE: base/src/main/java/tk/mybatis/mapper/provider/base/BaseSelectProvider.java
class BaseSelectProvider (line 37) | public class BaseSelectProvider extends MapperTemplate {
method BaseSelectProvider (line 39) | public BaseSelectProvider(Class<?> mapperClass, MapperHelper mapperHel...
method selectOne (line 49) | public String selectOne(MappedStatement ms) {
method select (line 66) | public String select(MappedStatement ms) {
method selectByRowBounds (line 84) | public String selectByRowBounds(MappedStatement ms) {
method selectByPrimaryKey (line 93) | public String selectByPrimaryKey(MappedStatement ms) {
method selectCount (line 110) | public String selectCount(MappedStatement ms) {
method existsWithPrimaryKey (line 125) | public String existsWithPrimaryKey(MappedStatement ms) {
method selectAll (line 140) | public String selectAll(MappedStatement ms) {
FILE: base/src/main/java/tk/mybatis/mapper/provider/base/BaseUpdateProvider.java
class BaseUpdateProvider (line 37) | public class BaseUpdateProvider extends MapperTemplate {
method BaseUpdateProvider (line 39) | public BaseUpdateProvider(Class<?> mapperClass, MapperHelper mapperHel...
method updateByPrimaryKey (line 48) | public String updateByPrimaryKey(MappedStatement ms) {
method updateByPrimaryKeySelective (line 63) | public String updateByPrimaryKeySelective(MappedStatement ms) {
FILE: base/src/test/java/tk/mybatis/mapper/base/BaseTest.java
class BaseTest (line 46) | public abstract class BaseTest {
method init (line 49) | @Before
method configMapperHelper (line 67) | protected void configMapperHelper() {
method runSql (line 86) | protected void runSql(Reader reader) {
method getConfig (line 110) | protected Config getConfig() {
method getConfigFileAsReader (line 119) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 131) | protected Reader getSqlFileAsReader() throws IOException {
method toReader (line 145) | protected Reader toReader(URL url) throws IOException {
method getSqlSession (line 154) | protected SqlSession getSqlSession() {
FILE: base/src/test/java/tk/mybatis/mapper/base/Country.java
class Country (line 33) | public class Country implements Serializable {
method getId (line 40) | public Long getId() {
method setId (line 44) | public void setId(Long id) {
method getCountryname (line 48) | public String getCountryname() {
method setCountryname (line 52) | public void setCountryname(String countryname) {
method getCountrycode (line 56) | public String getCountrycode() {
method setCountrycode (line 60) | public void setCountrycode(String countrycode) {
FILE: base/src/test/java/tk/mybatis/mapper/base/CountryMapper.java
type CountryMapper (line 5) | public interface CountryMapper extends Mapper<Country> {
FILE: base/src/test/java/tk/mybatis/mapper/base/CreateDB.sql
type country (line 3) | create table country
FILE: base/src/test/java/tk/mybatis/mapper/base/delete/DeleteByPrimaryKeyMapperTest.java
class DeleteByPrimaryKeyMapperTest (line 9) | public class DeleteByPrimaryKeyMapperTest extends BaseTest {
method testDeleteByPrimaryKey (line 11) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/base/delete/SafeDeleteByFieldTest.java
class SafeDeleteByFieldTest (line 12) | public class SafeDeleteByFieldTest extends BaseTest {
method getConfig (line 14) | @Override
method testSafeDelete (line 21) | @Test(expected = PersistenceException.class)
method testSafeDeleteNull (line 32) | @Test(expected = PersistenceException.class)
method testSafeDeleteByExample (line 43) | @Test(expected = PersistenceException.class)
method testSafeDeleteByExampleNull (line 54) | @Test(expected = PersistenceException.class)
FILE: base/src/test/java/tk/mybatis/mapper/base/delete/SafeDeleteByMethodTest.java
class SafeDeleteByMethodTest (line 12) | public class SafeDeleteByMethodTest extends BaseTest {
method getConfig (line 14) | @Override
method testSafeDelete (line 23) | @Test(expected = PersistenceException.class)
method testSafeDeleteNull (line 34) | @Test(expected = PersistenceException.class)
method testSafeDeleteByExample (line 46) | @Test(expected = PersistenceException.class)
method testSafeDeleteByExampleNull (line 57) | @Test(expected = PersistenceException.class)
method testSafeDeleteByExampleWithNullValueCriterion (line 68) | @Test(expected = PersistenceException.class)
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/Country.java
class Country (line 35) | public class Country implements Serializable {
method Country (line 43) | public Country() {
method Country (line 46) | public Country(String countryname, String countrycode) {
method getId (line 51) | public Long getId() {
method setId (line 55) | public void setId(Long id) {
method getCountryname (line 59) | public String getCountryname() {
method setCountryname (line 63) | public void setCountryname(String countryname) {
method getCountrycode (line 67) | public String getCountrycode() {
method setCountrycode (line 71) | public void setCountrycode(String countrycode) {
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/CountryMapper.java
type CountryMapper (line 5) | public interface CountryMapper extends BaseInsertMapper<Country> {
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/CreateDB.sql
type country (line 4) | create table country
type user (line 11) | create table user
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/InsertGenIdTest.java
class InsertGenIdTest (line 15) | public class InsertGenIdTest extends BaseTest {
method getConfigFileAsReader (line 59) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 71) | protected Reader getSqlFileAsReader() throws IOException {
method testGenId (line 78) | @Test
method testGenIdWithExistsId (line 94) | @Test
method testUUID (line 111) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/SimpleGenId.java
class SimpleGenId (line 10) | public class SimpleGenId implements GenId<Long> {
method genId (line 14) | @Override
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/UUIdGenId.java
class UUIdGenId (line 10) | public class UUIdGenId implements GenId<String> {
method genId (line 11) | @Override
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/User.java
class User (line 10) | public class User {
method User (line 17) | public User() {
method User (line 20) | public User(String name, String code) {
method getId (line 25) | public String getId() {
method setId (line 29) | public void setId(String id) {
method getName (line 33) | public String getName() {
method setName (line 37) | public void setName(String name) {
method getCode (line 41) | public String getCode() {
method setCode (line 45) | public void setCode(String code) {
FILE: base/src/test/java/tk/mybatis/mapper/base/genid/UserMapper.java
type UserMapper (line 5) | public interface UserMapper extends BaseInsertMapper<User> {
FILE: base/src/test/java/tk/mybatis/mapper/base/update/SafeUpdateByFieldTest.java
class SafeUpdateByFieldTest (line 12) | public class SafeUpdateByFieldTest extends BaseTest {
method getConfig (line 14) | @Override
method testSafeUpdate (line 21) | @Test(expected = PersistenceException.class)
method testSafeUpdateNull (line 32) | @Test(expected = PersistenceException.class)
method testSafeUpdateNull2 (line 43) | @Test(expected = PersistenceException.class)
method testSafeUpdateByExample (line 54) | @Test(expected = PersistenceException.class)
method testSafeUpdateByExampleNull (line 65) | @Test(expected = PersistenceException.class)
FILE: base/src/test/java/tk/mybatis/mapper/base/update/SafeUpdateByMethodTest.java
class SafeUpdateByMethodTest (line 12) | public class SafeUpdateByMethodTest extends BaseTest {
method getConfig (line 14) | @Override
method testSafeUpdate (line 23) | @Test(expected = PersistenceException.class)
method testSafeUpdateNull (line 34) | @Test(expected = PersistenceException.class)
method testSafeUpdateNull2 (line 45) | @Test(expected = PersistenceException.class)
method testSafeUpdateByExample (line 56) | @Test(expected = PersistenceException.class)
method testSafeUpdateByExampleNull (line 67) | @Test(expected = PersistenceException.class)
FILE: base/src/test/java/tk/mybatis/mapper/cache/CacheTest.java
class CacheTest (line 17) | public class CacheTest extends BaseTest {
method getConfigFileAsReader (line 19) | @Override
method testNoCache (line 24) | @Test
method testSingleInterfaceCache (line 54) | @Test
method testCountryCacheRefMapper (line 93) | @Test
method testCountryCacheWithXmlMapper (line 157) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/cache/CountryCacheMapper.java
type CountryCacheMapper (line 10) | @CacheNamespace
FILE: base/src/test/java/tk/mybatis/mapper/cache/CountryCacheRefMapper.java
type CountryCacheRefMapper (line 12) | @CacheNamespaceRef(CountryCacheRefMapper.class)
method selectById (line 22) | Country selectById(Integer id);
FILE: base/src/test/java/tk/mybatis/mapper/cache/CountryCacheWithXmlMapper.java
type CountryCacheWithXmlMapper (line 12) | @CacheNamespace
method selectById (line 21) | Country selectById(Integer id);
FILE: base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/CreateDB.sql
type user (line 3) | create table user
FILE: base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/DefaultEnumTypeHandlerTest.java
class DefaultEnumTypeHandlerTest (line 16) | public class DefaultEnumTypeHandlerTest extends BaseTest {
method getConfig (line 18) | @Override
method getConfigFileAsReader (line 25) | @Override
method getSqlFileAsReader (line 30) | @Override
method testSelect (line 35) | @Test
method testInsert (line 61) | @Test
method testUpdate (line 84) | @Test
method testDelete (line 107) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/Dict.java
type Dict (line 6) | public interface Dict {
method getValue (line 8) | int getValue();
method getName (line 10) | String getName();
FILE: base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/DictTypeHandler.java
class DictTypeHandler (line 14) | public class DictTypeHandler extends BaseTypeHandler<Dict> {
method DictTypeHandler (line 19) | public DictTypeHandler(Class<? extends Dict> type) {
method setNonNullParameter (line 30) | @Override
method convertToDict (line 35) | private Dict convertToDict(int value) {
method getNullableResult (line 44) | @Override
method getNullableResult (line 53) | @Override
method getNullableResult (line 62) | @Override
FILE: base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/LockDictEnum.java
type LockDictEnum (line 6) | public enum LockDictEnum implements Dict {
method LockDictEnum (line 12) | private LockDictEnum(int value) {
method getValue (line 16) | @Override
method getName (line 21) | @Override
FILE: base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/StateDictEnum.java
type StateDictEnum (line 6) | public enum StateDictEnum implements Dict {
method StateDictEnum (line 12) | private StateDictEnum(int value) {
method getValue (line 16) | @Override
method getName (line 21) | @Override
FILE: base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/User.java
class User (line 9) | public class User implements Serializable {
method getId (line 17) | public Integer getId() {
method setId (line 21) | public void setId(Integer id) {
method getName (line 25) | public String getName() {
method setName (line 29) | public void setName(String name) {
method getLock (line 33) | public LockDictEnum getLock() {
method setLock (line 37) | public void setLock(LockDictEnum lock) {
method getState (line 41) | public StateDictEnum getState() {
method setState (line 45) | public void setState(StateDictEnum state) {
FILE: base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/UserMapper.java
type UserMapper (line 8) | public interface UserMapper extends Mapper<User> {
FILE: base/src/test/java/tk/mybatis/mapper/entity/model/CountryExample.java
class CountryExample (line 30) | public class CountryExample {
method CountryExample (line 37) | public CountryExample() {
method or (line 41) | public void or(Criteria criteria) {
method or (line 45) | public Criteria or() {
method createCriteria (line 51) | public Criteria createCriteria() {
method createCriteriaInternal (line 59) | protected Criteria createCriteriaInternal() {
method clear (line 64) | public void clear() {
class GeneratedCriteria (line 70) | protected abstract static class GeneratedCriteria {
method GeneratedCriteria (line 73) | protected GeneratedCriteria() {
method addCriterion (line 78) | protected void addCriterion(String condition) {
method addCriterion (line 85) | protected void addCriterion(String condition, Object value, String p...
method addCriterion (line 92) | protected void addCriterion(String condition, Object value1, Object ...
method andIdIsNull (line 99) | public Criteria andIdIsNull() {
method andIdIsNotNull (line 104) | public Criteria andIdIsNotNull() {
method andIdEqualTo (line 109) | public Criteria andIdEqualTo(Integer value) {
method andIdNotEqualTo (line 114) | public Criteria andIdNotEqualTo(Integer value) {
method andIdGreaterThan (line 119) | public Criteria andIdGreaterThan(Integer value) {
method andIdGreaterThanOrEqualTo (line 124) | public Criteria andIdGreaterThanOrEqualTo(Integer value) {
method andIdLessThan (line 129) | public Criteria andIdLessThan(Integer value) {
method andIdLessThanOrEqualTo (line 134) | public Criteria andIdLessThanOrEqualTo(Integer value) {
method andIdIn (line 139) | public Criteria andIdIn(List<Integer> values) {
method andIdNotIn (line 144) | public Criteria andIdNotIn(List<Integer> values) {
method andIdBetween (line 149) | public Criteria andIdBetween(Integer value1, Integer value2) {
method andIdNotBetween (line 154) | public Criteria andIdNotBetween(Integer value1, Integer value2) {
method andCountrynameIsNull (line 159) | public Criteria andCountrynameIsNull() {
method andCountrynameIsNotNull (line 164) | public Criteria andCountrynameIsNotNull() {
method andCountrynameEqualTo (line 169) | public Criteria andCountrynameEqualTo(String value) {
method andCountrynameNotEqualTo (line 174) | public Criteria andCountrynameNotEqualTo(String value) {
method andCountrynameGreaterThan (line 179) | public Criteria andCountrynameGreaterThan(String value) {
method andCountrynameGreaterThanOrEqualTo (line 184) | public Criteria andCountrynameGreaterThanOrEqualTo(String value) {
method andCountrynameLessThan (line 189) | public Criteria andCountrynameLessThan(String value) {
method andCountrynameLessThanOrEqualTo (line 194) | public Criteria andCountrynameLessThanOrEqualTo(String value) {
method andCountrynameLike (line 199) | public Criteria andCountrynameLike(String value) {
method andCountrynameNotLike (line 204) | public Criteria andCountrynameNotLike(String value) {
method andCountrynameIn (line 209) | public Criteria andCountrynameIn(List<String> values) {
method andCountrynameNotIn (line 214) | public Criteria andCountrynameNotIn(List<String> values) {
method andCountrynameBetween (line 219) | public Criteria andCountrynameBetween(String value1, String value2) {
method andCountrynameNotBetween (line 224) | public Criteria andCountrynameNotBetween(String value1, String value...
method andCountrycodeIsNull (line 229) | public Criteria andCountrycodeIsNull() {
method andCountrycodeIsNotNull (line 234) | public Criteria andCountrycodeIsNotNull() {
method andCountrycodeEqualTo (line 239) | public Criteria andCountrycodeEqualTo(String value) {
method andCountrycodeNotEqualTo (line 244) | public Criteria andCountrycodeNotEqualTo(String value) {
method andCountrycodeGreaterThan (line 249) | public Criteria andCountrycodeGreaterThan(String value) {
method andCountrycodeGreaterThanOrEqualTo (line 254) | public Criteria andCountrycodeGreaterThanOrEqualTo(String value) {
method andCountrycodeLessThan (line 259) | public Criteria andCountrycodeLessThan(String value) {
method andCountrycodeLessThanOrEqualTo (line 264) | public Criteria andCountrycodeLessThanOrEqualTo(String value) {
method andCountrycodeLike (line 269) | public Criteria andCountrycodeLike(String value) {
method andCountrycodeNotLike (line 274) | public Criteria andCountrycodeNotLike(String value) {
method andCountrycodeIn (line 279) | public Criteria andCountrycodeIn(List<String> values) {
method andCountrycodeNotIn (line 284) | public Criteria andCountrycodeNotIn(List<String> values) {
method andCountrycodeBetween (line 289) | public Criteria andCountrycodeBetween(String value1, String value2) {
method andCountrycodeNotBetween (line 294) | public Criteria andCountrycodeNotBetween(String value1, String value...
method getAllCriteria (line 299) | public List<Criterion> getAllCriteria() {
method getCriteria (line 303) | public List<Criterion> getCriteria() {
method isValid (line 307) | public boolean isValid() {
class Criteria (line 312) | public static class Criteria extends GeneratedCriteria {
method Criteria (line 314) | protected Criteria() {
class Criterion (line 319) | public static class Criterion {
method Criterion (line 336) | protected Criterion(String condition) {
method Criterion (line 343) | protected Criterion(String condition, Object value, String typeHandl...
method Criterion (line 355) | protected Criterion(String condition, Object value) {
method Criterion (line 359) | protected Criterion(String condition, Object value, Object secondVal...
method Criterion (line 368) | protected Criterion(String condition, Object value, Object secondVal...
method getCondition (line 372) | public String getCondition() {
method getSecondValue (line 376) | public Object getSecondValue() {
method getTypeHandler (line 380) | public String getTypeHandler() {
method getValue (line 384) | public Object getValue() {
method isBetweenValue (line 388) | public boolean isBetweenValue() {
method isListValue (line 392) | public boolean isListValue() {
method isNoValue (line 396) | public boolean isNoValue() {
method isSingleValue (line 400) | public boolean isSingleValue() {
method getOrderByClause (line 405) | public String getOrderByClause() {
method setOrderByClause (line 409) | public void setOrderByClause(String orderByClause) {
method getOredCriteria (line 413) | public List<Criteria> getOredCriteria() {
method isDistinct (line 417) | public boolean isDistinct() {
method setDistinct (line 421) | public void setDistinct(boolean distinct) {
FILE: base/src/test/java/tk/mybatis/mapper/generatedvalue/CreateDB.sql
type `user` (line 7) | CREATE TABLE `user`
type `user_auto_increment` (line 19) | CREATE TABLE `user_auto_increment`
FILE: base/src/test/java/tk/mybatis/mapper/generatedvalue/GeneratedValueTest.java
class GeneratedValueTest (line 16) | @Ignore("这个测试需要使用 MySql 数据库")
method getConfig (line 19) | @Override
method getConfigFileAsReader (line 27) | @Override
method getSqlFileAsReader (line 32) | @Override
method testUserAutoIncrement (line 37) | @Test
method testUserAutoIncrementIdentity (line 55) | @Test
method testUserSqlAfter (line 73) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/generatedvalue/UserAutoIncrement.java
class UserAutoIncrement (line 11) | @Table(name = "user_auto_increment")
method getId (line 19) | public Integer getId() {
method setId (line 23) | public void setId(Integer id) {
method getName (line 27) | public String getName() {
method setName (line 31) | public void setName(String name) {
FILE: base/src/test/java/tk/mybatis/mapper/generatedvalue/UserAutoIncrementIdentity.java
class UserAutoIncrementIdentity (line 8) | @Table(name = "user_auto_increment")
method getId (line 16) | public Integer getId() {
method setId (line 20) | public void setId(Integer id) {
method getName (line 24) | public String getName() {
method setName (line 28) | public void setName(String name) {
FILE: base/src/test/java/tk/mybatis/mapper/generatedvalue/UserAutoIncrementIdentityMapper.java
type UserAutoIncrementIdentityMapper (line 8) | public interface UserAutoIncrementIdentityMapper extends Mapper<UserAuto...
FILE: base/src/test/java/tk/mybatis/mapper/generatedvalue/UserAutoIncrementMapper.java
type UserAutoIncrementMapper (line 8) | public interface UserAutoIncrementMapper extends Mapper<UserAutoIncremen...
FILE: base/src/test/java/tk/mybatis/mapper/generatedvalue/UserSqlAfter.java
class UserSqlAfter (line 8) | @Table(name = "user_auto_increment")
method getId (line 18) | public Integer getId() {
method setId (line 22) | public void setId(Integer id) {
method getName (line 26) | public String getName() {
method setName (line 30) | public void setName(String name) {
FILE: base/src/test/java/tk/mybatis/mapper/generatedvalue/UserSqlAfterMapper.java
type UserSqlAfterMapper (line 8) | public interface UserSqlAfterMapper extends Mapper<UserSqlAfter> {
FILE: base/src/test/java/tk/mybatis/mapper/helper/CamelCaseTest.java
class CamelCaseTest (line 35) | public class CamelCaseTest {
method testCamelhumpToUnderline (line 37) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/helper/FieldHelperTest.java
class FieldHelperTest (line 40) | public class FieldHelperTest {
method test1 (line 42) | @Test
method test2 (line 57) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/helper/FieldTest.java
class FieldTest (line 48) | public class FieldTest {
method _getProperties (line 56) | private static List<EntityField> _getProperties(Class<?> entityClass) {
method _getGenericTypeMap (line 88) | private static Map<String, Class<?>> _getGenericTypeMap(Class<?> entit...
method processAllColumns (line 117) | private static void processAllColumns(Class<?> entityClass, List<Entit...
method test1 (line 155) | public void test1() throws IntrospectionException {
method test2 (line 170) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/helper/MultipleMapperProviderTest.java
class MultipleMapperProviderTest (line 20) | public class MultipleMapperProviderTest {
method test (line 21) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/hsqldb/HsqldbMapper.java
type HsqldbMapper (line 38) | @RegisterMapper
method selectPage (line 48) | @SelectProvider(type = HsqldbProvider.class, method = "dynamicSQL")
FILE: base/src/test/java/tk/mybatis/mapper/hsqldb/HsqldbProvider.java
class HsqldbProvider (line 41) | public class HsqldbProvider extends MapperTemplate {
method HsqldbProvider (line 42) | public HsqldbProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method selectPage (line 52) | public SqlNode selectPage(MappedStatement ms) {
FILE: base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/CreateDB.sql
type test_timestamp (line 3) | create table test_timestamp
FILE: base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/DateTimeTest.java
class DateTimeTest (line 15) | public class DateTimeTest extends BaseTest {
method getConfigFileAsReader (line 17) | @Override
method getSqlFileAsReader (line 22) | @Override
method toDate (line 27) | private String toDate(Date date) {
method toTime (line 32) | private String toTime(Date date) {
method toDatetime (line 37) | private String toDatetime(Date date) {
method testSelect (line 42) | @Test
method testInsert (line 62) | @Test
method testSelect2 (line 91) | @Test
method testInsert2 (line 111) | @Test
method testSelect3 (line 141) | @Test
method testInsert3 (line 161) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel.java
class TimeModel (line 11) | @Table(name = "test_timestamp")
method getId (line 20) | public Integer getId() {
method setId (line 24) | public void setId(Integer id) {
method getTestDate (line 28) | public Date getTestDate() {
method setTestDate (line 32) | public void setTestDate(Date testDate) {
method getTestTime (line 36) | public Date getTestTime() {
method setTestTime (line 40) | public void setTestTime(Date testTime) {
method getTestDatetime (line 44) | public Date getTestDatetime() {
method setTestDatetime (line 48) | public void setTestDatetime(Date testDatetime) {
FILE: base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel2.java
class TimeModel2 (line 12) | @Table(name = "test_timestamp")
method getId (line 21) | public Integer getId() {
method setId (line 25) | public void setId(Integer id) {
method getTestDate (line 29) | public Date getTestDate() {
method setTestDate (line 33) | public void setTestDate(Date testDate) {
method getTestDatetime (line 37) | public Timestamp getTestDatetime() {
method setTestDatetime (line 41) | public void setTestDatetime(Timestamp testDatetime) {
method getTestTime (line 45) | public Date getTestTime() {
method setTestTime (line 49) | public void setTestTime(Date testTime) {
FILE: base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel2Mapper.java
type TimeModel2Mapper (line 8) | public interface TimeModel2Mapper extends Mapper<TimeModel2> {
FILE: base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel3.java
class TimeModel3 (line 14) | @Table(name = "test_timestamp")
method getId (line 26) | public Integer getId() {
method setId (line 30) | public void setId(Integer id) {
method getTestDate (line 34) | public Date getTestDate() {
method setTestDate (line 38) | public void setTestDate(Date testDate) {
method getTestDatetime (line 42) | public Date getTestDatetime() {
method setTestDatetime (line 46) | public void setTestDatetime(Date testDatetime) {
method getTestTime (line 50) | public Date getTestTime() {
method setTestTime (line 54) | public void setTestTime(Date testTime) {
FILE: base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel3Mapper.java
type TimeModel3Mapper (line 8) | public interface TimeModel3Mapper extends Mapper<TimeModel3> {
FILE: base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModelMapper.java
type TimeModelMapper (line 8) | public interface TimeModelMapper extends Mapper<TimeModel> {
FILE: base/src/test/java/tk/mybatis/mapper/keysql/CreateDB.sql
type `user` (line 7) | CREATE TABLE `user`
type `user_auto_increment` (line 19) | CREATE TABLE `user_auto_increment`
FILE: base/src/test/java/tk/mybatis/mapper/keysql/KeySqlTest.java
class KeySqlTest (line 15) | @Ignore("这个测试需要使用 MySql 数据库")
method getConfigFileAsReader (line 18) | @Override
method getSqlFileAsReader (line 23) | @Override
method testUserAutoIncrement (line 28) | @Test
method testUserAutoIncrementIdentity (line 46) | @Test
method testUserSqlAfter (line 64) | @Test
method testUserSqlBefore (line 82) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/keysql/UserAutoIncrement.java
class UserAutoIncrement (line 12) | @Table(name = "user_auto_increment")
method getId (line 20) | public Integer getId() {
method setId (line 24) | public void setId(Integer id) {
method getName (line 28) | public String getName() {
method setName (line 32) | public void setName(String name) {
FILE: base/src/test/java/tk/mybatis/mapper/keysql/UserAutoIncrementIdentity.java
class UserAutoIncrementIdentity (line 13) | @Table(name = "user_auto_increment")
method getId (line 21) | public Integer getId() {
method setId (line 25) | public void setId(Integer id) {
method getName (line 29) | public String getName() {
method setName (line 33) | public void setName(String name) {
FILE: base/src/test/java/tk/mybatis/mapper/keysql/UserAutoIncrementIdentityMapper.java
type UserAutoIncrementIdentityMapper (line 8) | public interface UserAutoIncrementIdentityMapper extends Mapper<UserAuto...
FILE: base/src/test/java/tk/mybatis/mapper/keysql/UserAutoIncrementMapper.java
type UserAutoIncrementMapper (line 8) | public interface UserAutoIncrementMapper extends Mapper<UserAutoIncremen...
FILE: base/src/test/java/tk/mybatis/mapper/keysql/UserSqlAfter.java
class UserSqlAfter (line 13) | @Table(name = "user_auto_increment")
method getId (line 21) | public Integer getId() {
method setId (line 25) | public void setId(Integer id) {
method getName (line 29) | public String getName() {
method setName (line 33) | public void setName(String name) {
FILE: base/src/test/java/tk/mybatis/mapper/keysql/UserSqlAfterMapper.java
type UserSqlAfterMapper (line 8) | public interface UserSqlAfterMapper extends Mapper<UserSqlAfter> {
FILE: base/src/test/java/tk/mybatis/mapper/keysql/UserSqlBefore.java
class UserSqlBefore (line 12) | @Table(name = "user")
method getId (line 19) | public Integer getId() {
method setId (line 23) | public void setId(Integer id) {
method getName (line 27) | public String getName() {
method setName (line 31) | public void setName(String name) {
FILE: base/src/test/java/tk/mybatis/mapper/keysql/UserSqlBeforeMapper.java
type UserSqlBeforeMapper (line 8) | public interface UserSqlBeforeMapper extends Mapper<UserSqlBefore> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/CachedCountryMapper.java
type CachedCountryMapper (line 35) | public interface CachedCountryMapper extends Mapper<Country>, HsqldbMapp...
method selectCache (line 36) | int selectCache(int id);
FILE: base/src/test/java/tk/mybatis/mapper/mapper/Country2Mapper.java
type Country2Mapper (line 33) | public interface Country2Mapper extends Mapper<Country2> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/CountryIMapper.java
type CountryIMapper (line 33) | public interface CountryIMapper extends Mapper<CountryI> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/CountryJDBCMapper.java
type CountryJDBCMapper (line 33) | public interface CountryJDBCMapper extends SqlServerMapper<CountryJDBC> {
method insertA (line 34) | int insertA(CountryJDBC countryJDBC);
FILE: base/src/test/java/tk/mybatis/mapper/mapper/CountryMapper.java
type CountryMapper (line 36) | public interface CountryMapper extends Mapper<Country>, HsqldbMapper<Cou...
FILE: base/src/test/java/tk/mybatis/mapper/mapper/CountryMultipleMapper.java
type CountryMultipleMapper (line 8) | public interface CountryMultipleMapper
FILE: base/src/test/java/tk/mybatis/mapper/mapper/CountryTMapper.java
type CountryTMapper (line 33) | public interface CountryTMapper extends Mapper<CountryT> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/CountryVersionMapper.java
type CountryVersionMapper (line 33) | public interface CountryVersionMapper extends Mapper<CountryVersion> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/JDBCMapper.java
type JDBCMapper (line 33) | public interface JDBCMapper extends MySqlMapper<Country> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/MultipleCommonMapper.java
type MultipleCommonMapper (line 11) | @RegisterMapper
method select (line 13) | @SelectProvider(type = BaseSelectProvider.class, method = "dynamicSQL")
method insert (line 15) | @InsertProvider(type = BaseInsertProvider.class, method = "dynamicSQL")
FILE: base/src/test/java/tk/mybatis/mapper/mapper/MybatisHelper.java
class MybatisHelper (line 44) | public class MybatisHelper {
method getSqlSession (line 113) | public static SqlSession getSqlSession() {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/TbUserLogicDeleteMapper.java
type TbUserLogicDeleteMapper (line 6) | public interface TbUserLogicDeleteMapper extends Mapper<TbUserLogicDelet...
FILE: base/src/test/java/tk/mybatis/mapper/mapper/TbUserMapper.java
type TbUserMapper (line 6) | public interface TbUserMapper extends Mapper<TbUser> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/UserInfoAbleMapper.java
type UserInfoAbleMapper (line 33) | public interface UserInfoAbleMapper extends Mapper<UserInfoAble> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/UserInfoMapMapper.java
type UserInfoMapMapper (line 33) | public interface UserInfoMapMapper extends Mapper<UserInfoMap> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/UserInfoMapper.java
type UserInfoMapper (line 33) | public interface UserInfoMapper extends Mapper<UserInfo> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/UserLogin2Mapper.java
type UserLogin2Mapper (line 33) | public interface UserLogin2Mapper extends Mapper<UserLogin2> {
FILE: base/src/test/java/tk/mybatis/mapper/mapper/UserLoginMapper.java
type UserLoginMapper (line 33) | public interface UserLoginMapper extends Mapper<UserLogin> {
FILE: base/src/test/java/tk/mybatis/mapper/model/BaseLogicDelete.java
class BaseLogicDelete (line 10) | public class BaseLogicDelete {
method getId (line 20) | public Integer getId() {
method setId (line 24) | public void setId(Integer id) {
method getIsValid (line 28) | public Integer getIsValid() {
method setIsValid (line 32) | public void setIsValid(Integer isValid) {
FILE: base/src/test/java/tk/mybatis/mapper/model/Country.java
class Country (line 40) | public class Country extends Entity<Integer, String> implements Serializ...
method getCountrycode (line 50) | public String getCountrycode() {
method setCountrycode (line 54) | public void setCountrycode(String countrycode) {
method getCountryname (line 58) | public String getCountryname() {
method setCountryname (line 62) | public void setCountryname(String countryname) {
method getDynamicTableName (line 66) | @Override
method getList (line 72) | public List<Country> getList() {
method setList (line 76) | public void setList(List<Country> list) {
method setDynamicTableName123 (line 80) | public void setDynamicTableName123(String dynamicTableName) {
FILE: base/src/test/java/tk/mybatis/mapper/model/Country2.java
class Country2 (line 36) | public class Country2 {
method toString (line 43) | @Override
method getCountrycode (line 52) | public String getCountrycode() {
method setCountrycode (line 56) | public void setCountrycode(String countrycode) {
method getCountryname (line 60) | public String getCountryname() {
method setCountryname (line 64) | public void setCountryname(String countryname) {
method getId (line 68) | public Integer getId() {
method setId (line 72) | public void setId(Integer id) {
FILE: base/src/test/java/tk/mybatis/mapper/model/CountryExample.java
class CountryExample (line 30) | public class CountryExample {
method CountryExample (line 61) | public CountryExample() {
method or (line 71) | public void or(Criteria criteria) {
method or (line 81) | public Criteria or() {
method createCriteria (line 93) | public Criteria createCriteria() {
method createCriteriaInternal (line 107) | protected Criteria createCriteriaInternal() {
method clear (line 118) | public void clear() {
class GeneratedCriteria (line 130) | protected abstract static class GeneratedCriteria {
method GeneratedCriteria (line 133) | protected GeneratedCriteria() {
method addCriterion (line 138) | protected void addCriterion(String condition) {
method addCriterion (line 145) | protected void addCriterion(String condition, Object value, String p...
method addCriterion (line 152) | protected void addCriterion(String condition, Object value1, Object ...
method andIdIsNull (line 159) | public Criteria andIdIsNull() {
method andIdIsNotNull (line 164) | public Criteria andIdIsNotNull() {
method andIdEqualTo (line 169) | public Criteria andIdEqualTo(Integer value) {
method andIdNotEqualTo (line 174) | public Criteria andIdNotEqualTo(Integer value) {
method andIdGreaterThan (line 179) | public Criteria andIdGreaterThan(Integer value) {
method andIdGreaterThanOrEqualTo (line 184) | public Criteria andIdGreaterThanOrEqualTo(Integer value) {
method andIdLessThan (line 189) | public Criteria andIdLessThan(Integer value) {
method andIdLessThanOrEqualTo (line 194) | public Criteria andIdLessThanOrEqualTo(Integer value) {
method andIdIn (line 199) | public Criteria andIdIn(List<Integer> values) {
method andIdNotIn (line 204) | public Criteria andIdNotIn(List<Integer> values) {
method andIdBetween (line 209) | public Criteria andIdBetween(Integer value1, Integer value2) {
method andIdNotBetween (line 214) | public Criteria andIdNotBetween(Integer value1, Integer value2) {
method andCountrynameIsNull (line 219) | public Criteria andCountrynameIsNull() {
method andCountrynameIsNotNull (line 224) | public Criteria andCountrynameIsNotNull() {
method andCountrynameEqualTo (line 229) | public Criteria andCountrynameEqualTo(String value) {
method andCountrynameNotEqualTo (line 234) | public Criteria andCountrynameNotEqualTo(String value) {
method andCountrynameGreaterThan (line 239) | public Criteria andCountrynameGreaterThan(String value) {
method andCountrynameGreaterThanOrEqualTo (line 244) | public Criteria andCountrynameGreaterThanOrEqualTo(String value) {
method andCountrynameLessThan (line 249) | public Criteria andCountrynameLessThan(String value) {
method andCountrynameLessThanOrEqualTo (line 254) | public Criteria andCountrynameLessThanOrEqualTo(String value) {
method andCountrynameLike (line 259) | public Criteria andCountrynameLike(String value) {
method andCountrynameNotLike (line 264) | public Criteria andCountrynameNotLike(String value) {
method andCountrynameIn (line 269) | public Criteria andCountrynameIn(List<String> values) {
method andCountrynameNotIn (line 274) | public Criteria andCountrynameNotIn(List<String> values) {
method andCountrynameBetween (line 279) | public Criteria andCountrynameBetween(String value1, String value2) {
method andCountrynameNotBetween (line 284) | public Criteria andCountrynameNotBetween(String value1, String value...
method andCountrycodeIsNull (line 289) | public Criteria andCountrycodeIsNull() {
method andCountrycodeIsNotNull (line 294) | public Criteria andCountrycodeIsNotNull() {
method andCountrycodeEqualTo (line 299) | public Criteria andCountrycodeEqualTo(String value) {
method andCountrycodeNotEqualTo (line 304) | public Criteria andCountrycodeNotEqualTo(String value) {
method andCountrycodeGreaterThan (line 309) | public Criteria andCountrycodeGreaterThan(String value) {
method andCountrycodeGreaterThanOrEqualTo (line 314) | public Criteria andCountrycodeGreaterThanOrEqualTo(String value) {
method andCountrycodeLessThan (line 319) | public Criteria andCountrycodeLessThan(String value) {
method andCountrycodeLessThanOrEqualTo (line 324) | public Criteria andCountrycodeLessThanOrEqualTo(String value) {
method andCountrycodeLike (line 329) | public Criteria andCountrycodeLike(String value) {
method andCountrycodeNotLike (line 334) | public Criteria andCountrycodeNotLike(String value) {
method andCountrycodeIn (line 339) | public Criteria andCountrycodeIn(List<String> values) {
method andCountrycodeNotIn (line 344) | public Criteria andCountrycodeNotIn(List<String> values) {
method andCountrycodeBetween (line 349) | public Criteria andCountrycodeBetween(String value1, String value2) {
method andCountrycodeNotBetween (line 354) | public Criteria andCountrycodeNotBetween(String value1, String value...
method getAllCriteria (line 359) | public List<Criterion> getAllCriteria() {
method getCriteria (line 363) | public List<Criterion> getCriteria() {
method isValid (line 367) | public boolean isValid() {
class Criteria (line 378) | public static class Criteria extends GeneratedCriteria {
method Criteria (line 380) | protected Criteria() {
class Criterion (line 391) | public static class Criterion {
method Criterion (line 408) | protected Criterion(String condition) {
method Criterion (line 415) | protected Criterion(String condition, Object value, String typeHandl...
method Criterion (line 427) | protected Criterion(String condition, Object value) {
method Criterion (line 431) | protected Criterion(String condition, Object value, Object secondVal...
method Criterion (line 440) | protected Criterion(String condition, Object value, Object secondVal...
method getCondition (line 444) | public String getCondition() {
method getSecondValue (line 448) | public Object getSecondValue() {
method getTypeHandler (line 452) | public String getTypeHandler() {
method getValue (line 456) | public Object getValue() {
method isBetweenValue (line 460) | public boolean isBetweenValue() {
method isListValue (line 464) | public boolean isListValue() {
method isNoValue (line 468) | public boolean isNoValue() {
method isSingleValue (line 472) | public boolean isSingleValue() {
method getOrderByClause (line 483) | public String getOrderByClause() {
method setOrderByClause (line 493) | public void setOrderByClause(String orderByClause) {
method getOredCriteria (line 503) | public List<Criteria> getOredCriteria() {
method isDistinct (line 513) | public boolean isDistinct() {
method setDistinct (line 523) | public void setDistinct(boolean distinct) {
FILE: base/src/test/java/tk/mybatis/mapper/model/CountryI.java
class CountryI (line 39) | @NameStyle(Style.camelhump)
method toString (line 47) | @Override
method getCountrycode (line 56) | public String getCountrycode() {
method setCountrycode (line 60) | public void setCountrycode(String countrycode) {
method getCountryname (line 64) | public String getCountryname() {
method setCountryname (line 68) | public void setCountryname(String countryname) {
method getId (line 72) | public Integer getId() {
method setId (line 76) | public void setId(Integer id) {
FILE: base/src/test/java/tk/mybatis/mapper/model/CountryJDBC.java
class CountryJDBC (line 36) | @Table(name = "country")
method toString (line 46) | @Override
method getCountrycode (line 55) | public String getCountrycode() {
method setCountrycode (line 59) | public void setCountrycode(String countrycode) {
method getCountryname (line 63) | public String getCountryname() {
method setCountryname (line 67) | public void setCountryname(String countryname) {
method getId (line 71) | public Integer getId() {
method setId (line 75) | public void setId(Integer id) {
FILE: base/src/test/java/tk/mybatis/mapper/model/CountryT.java
class CountryT (line 35) | public class CountryT {
method toString (line 44) | @Override
method getCountrycode (line 53) | public String getCountrycode() {
method setCountrycode (line 57) | public void setCountrycode(String countrycode) {
method getCountryname (line 61) | public String getCountryname() {
method setCountryname (line 65) | public void setCountryname(String countryname) {
method getId (line 69) | public Integer getId() {
method setId (line 73) | public void setId(Integer id) {
FILE: base/src/test/java/tk/mybatis/mapper/model/CountryVersion.java
class CountryVersion (line 36) | @Table(name = "country")
method getVersion (line 41) | public Integer getVersion() {
method setVersion (line 45) | public void setVersion(Integer version) {
FILE: base/src/test/java/tk/mybatis/mapper/model/Entity.java
class Entity (line 37) | public class Entity<ID extends Serializable, NAME extends Serializable> {
method getId (line 47) | @Id
method setId (line 52) | public void setId(ID id) {
method getName (line 56) | public NAME getName() {
method setName (line 60) | public void setName(NAME name) {
FILE: base/src/test/java/tk/mybatis/mapper/model/TbUser.java
class TbUser (line 5) | @Table(name = "tb_user")
method toString (line 21) | @Override
method getId (line 31) | public Integer getId() {
method setId (line 35) | public void setId(Integer id) {
method getUsername (line 39) | public String getUsername() {
method setUsername (line 43) | public void setUsername(String username) {
method getPassword (line 47) | public String getPassword() {
method setPassword (line 51) | public void setPassword(String password) {
method getIsValid (line 55) | public Integer getIsValid() {
method setIsValid (line 59) | public void setIsValid(Integer isValid) {
FILE: base/src/test/java/tk/mybatis/mapper/model/TbUserLogicDelete.java
class TbUserLogicDelete (line 6) | @Table(name = "tb_user")
method toString (line 15) | @Override
method getUsername (line 25) | public String getUsername() {
method setUsername (line 29) | public void setUsername(String username) {
method getPassword (line 33) | public String getPassword() {
method setPassword (line 37) | public void setPassword(String password) {
FILE: base/src/test/java/tk/mybatis/mapper/model/UserInfo.java
class UserInfo (line 35) | public class UserInfo implements Serializable {
method toString (line 50) | @Override
method getAddress (line 65) | public String getAddress() {
method setAddress (line 69) | public void setAddress(String address) {
method getEmail (line 73) | public String getEmail() {
method setEmail (line 77) | public void setEmail(String email) {
method getId (line 81) | public Integer getId() {
method setId (line 85) | public void setId(Integer id) {
method getPassword (line 89) | public String getPassword() {
method setPassword (line 93) | public void setPassword(String password) {
method getQq (line 97) | public String getQq() {
method setQq (line 101) | public void setQq(String qq) {
method getRealname (line 105) | public String getRealname() {
method setRealname (line 109) | public void setRealname(String realname) {
method getTel (line 113) | public String getTel() {
method setTel (line 117) | public void setTel(String tel) {
method getUsername (line 121) | public String getUsername() {
method setUsername (line 125) | public void setUsername(String username) {
method getUsertype (line 129) | public String getUsertype() {
method setUsertype (line 133) | public void setUsertype(String usertype) {
FILE: base/src/test/java/tk/mybatis/mapper/model/UserInfoAble.java
class UserInfoAble (line 33) | @Table(name = "user_info")
method toString (line 48) | @Override
method getEmail (line 62) | public String getEmail() {
method setEmail (line 66) | @Column(insertable = false)
method getId (line 71) | public Integer getId() {
method setId (line 75) | public void setId(Integer id) {
method getPassword (line 79) | public String getPassword() {
method setPassword (line 83) | public void setPassword(String password) {
method getQq (line 87) | public String getQq() {
method setQq (line 91) | public void setQq(String qq) {
method getRealname (line 95) | public String getRealname() {
method setRealname (line 99) | public void setRealname(String realname) {
method getTel (line 103) | public String getTel() {
method setTel (line 107) | public void setTel(String tel) {
method getUsername (line 111) | public String getUsername() {
method setUsername (line 115) | public void setUsername(String username) {
method getUsertype (line 119) | public String getUsertype() {
method setUsertype (line 123) | public void setUsertype(String usertype) {
FILE: base/src/test/java/tk/mybatis/mapper/model/UserInfoMap.java
class UserInfoMap (line 36) | public class UserInfoMap extends HashMap<String, Object> implements Seri...
method toString (line 47) | @Override
method getId (line 59) | public Integer getId() {
method setId (line 63) | public void setId(Integer id) {
method getPassword (line 67) | public String getPassword() {
method setPassword (line 71) | public void setPassword(String password) {
method getRealName (line 75) | public String getRealName() {
method setRealName (line 79) | public void setRealName(String realName) {
method getUserName (line 83) | public String getUserName() {
method setUserName (line 87) | public void setUserName(String userName) {
method getUserType (line 91) | public String getUserType() {
method setUserType (line 95) | public void setUserType(String userType) {
FILE: base/src/test/java/tk/mybatis/mapper/model/UserLogin.java
class UserLogin (line 35) | public class UserLogin {
method toString (line 45) | @Override
method getLogid (line 55) | public Integer getLogid() {
method setLogid (line 59) | public void setLogid(Integer logid) {
method getLogindate (line 63) | public Date getLogindate() {
method setLogindate (line 67) | public void setLogindate(Date logindate) {
method getLoginip (line 71) | public String getLoginip() {
method setLoginip (line 75) | public void setLoginip(String loginip) {
method getUsername (line 79) | public String getUsername() {
method setUsername (line 83) | public void setUsername(String username) {
FILE: base/src/test/java/tk/mybatis/mapper/model/UserLogin2.java
class UserLogin2 (line 33) | @Table(name = "USER_LOGIN")
method getLogindate (line 38) | public Date getLogindate() {
method setLogindate (line 42) | public void setLogindate(Date logindate) {
method getLoginip (line 46) | public String getLoginip() {
method setLoginip (line 50) | public void setLoginip(String loginip) {
FILE: base/src/test/java/tk/mybatis/mapper/model/UserLogin2Key.java
class UserLogin2Key (line 34) | public class UserLogin2Key {
method toString (line 42) | @Override
method getLogid (line 50) | public Integer getLogid() {
method setLogid (line 54) | public void setLogid(Integer logid) {
method getUsername (line 58) | public String getUsername() {
method setUsername (line 62) | public void setUsername(String username) {
FILE: base/src/test/java/tk/mybatis/mapper/model/UserParent.java
class UserParent (line 33) | public class UserParent {
method getAddress (line 38) | public String getAddress() {
method setAddress (line 42) | public void setAddress(String address) {
FILE: base/src/test/java/tk/mybatis/mapper/rawresultmap/CreateDB.sql
type user (line 3) | create table user
FILE: base/src/test/java/tk/mybatis/mapper/rawresultmap/RawResultMapTest.java
class RawResultMapTest (line 19) | public class RawResultMapTest extends BaseTest {
method getConfig (line 21) | @Override
method getConfigFileAsReader (line 29) | @Override
method getSqlFileAsReader (line 34) | @Override
method testSelect (line 40) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/rawresultmap/User.java
class User (line 15) | @NameStyle(Style.camelhump)
method getId (line 35) | public Integer getId() {
method setId (line 39) | public void setId(Integer id) {
method getName (line 43) | public String getName() {
method setName (line 47) | public void setName(String name) {
method getUname (line 51) | public String getUname() {
method setUname (line 55) | public void setUname(String uname) {
method getAge (line 59) | public Integer getAge() {
method setAge (line 63) | public void setAge(Integer age) {
method getEmail (line 67) | public String getEmail() {
method setEmail (line 71) | public void setEmail(String email) {
method getCreateTime (line 75) | public Date getCreateTime() {
method setCreateTime (line 79) | public void setCreateTime(Date createTime) {
method toString (line 83) | @Override
FILE: base/src/test/java/tk/mybatis/mapper/rawresultmap/UserMapper.java
type UserMapper (line 12) | public interface UserMapper extends BaseMapper<User> {
method selectRawAnnotation (line 15) | @Select("SELECT * FROM user")
method fetchRawResultType (line 18) | List<User> fetchRawResultType();
method fetchRawResultMap (line 20) | List<User> fetchRawResultMap();
method getMapUser (line 22) | Map<String, Object> getMapUser();
method selectCount2 (line 24) | Integer selectCount2();
FILE: base/src/test/java/tk/mybatis/mapper/test/able/TestBasicAble.java
class TestBasicAble (line 39) | public class TestBasicAble {
method testInsert (line 44) | @Test
method testUpdateByPrimaryKey (line 71) | @Test
method testUpdateByPrimaryKeySelective (line 97) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestCache.java
class TestCache (line 38) | public class TestCache {
method testCache (line 40) | @Test
method testCache2 (line 66) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestDeleteByPrimaryKey.java
class TestDeleteByPrimaryKey (line 48) | public class TestDeleteByPrimaryKey {
method setupDB (line 50) | @Before
method testDynamicDelete (line 69) | @Test
method testDynamicDeleteZero (line 92) | @Test
method testDynamicDeleteEntity (line 110) | @Test
method testDynamicDeleteMap (line 127) | @Test
method testDynamicDeleteNotFoundKeyProperties (line 148) | @Test(expected = Exception.class)
method testDynamicDeleteException (line 163) | @Test
class Key (line 176) | class Key {
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestExistsWithPrimaryKey.java
class TestExistsWithPrimaryKey (line 39) | public class TestExistsWithPrimaryKey {
method testDynamicExistsWithPrimaryKey (line 44) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestInsert.java
class TestInsert (line 42) | public class TestInsert {
method testDynamicInsertAll (line 47) | @Test(expected = PersistenceException.class)
method testDynamicInsertAllByNull (line 61) | @Test(expected = PersistenceException.class)
method testDynamicInsert (line 75) | @Test
method testDynamicInsertNull (line 102) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestInsertSelective.java
class TestInsertSelective (line 42) | public class TestInsertSelective {
method testDynamicInsertAll (line 47) | @Test(expected = PersistenceException.class)
method testDynamicInsertSelectiveAllByNull (line 61) | @Test(expected = PersistenceException.class)
method testDynamicInsertSelective (line 75) | @Test
method testDynamicInsertSelectiveNull (line 102) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestSelect.java
class TestSelect (line 41) | public class TestSelect {
method testDynamicSelectAll (line 46) | @Test
method testDynamicSelectPage (line 70) | @Test
method testAllColumns (line 92) | @Test
method testDynamicSelectAllByNull (line 112) | @Test
method testDynamicSelect (line 126) | @Test
method testDynamicSelectZero (line 146) | @Test
method testDynamicSelectNotFoundKeyProperties (line 165) | @Test
class Key (line 182) | class Key extends Country {
method getCountrytel (line 185) | public String getCountrytel() {
method setCountrytel (line 189) | public void setCountrytel(String countrytel) {
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestSelectAll.java
class TestSelectAll (line 41) | public class TestSelectAll {
method testDynamicSelectPage (line 46) | @Test
method testDynamicSelectPage2 (line 63) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestSelectByPrimaryKey.java
class TestSelectByPrimaryKey (line 42) | public class TestSelectByPrimaryKey {
method testDynamicSelectByPrimaryKey2 (line 47) | @Test
method testDynamicSelectByPrimaryKey (line 66) | @Test
method testDynamicSelectByPrimaryKeyZero (line 86) | @Test
method testSelectByPrimaryKeyMap (line 105) | @Test
method testDynamicDeleteNotFoundKeyProperties (line 130) | @Test(expected = Exception.class)
method testDynamicDeleteException (line 144) | @Test
class Key (line 155) | class Key {
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestSelectCount.java
class TestSelectCount (line 39) | public class TestSelectCount {
method testDynamicSelectCount (line 44) | @Test
method testDynamicSelectAllByNull (line 59) | @Test
method testDynamicSelect (line 74) | @Test
method testDynamicSelectZero (line 90) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestSelectOne.java
class TestSelectOne (line 40) | public class TestSelectOne {
method testDynamicSelectAll (line 45) | @Test(expected = TooManyResultsException.class)
method testDynamicSelectAllByNull (line 59) | @Test(expected = TooManyResultsException.class)
method testDynamicSelect (line 73) | @Test
method testDynamicSelectZero (line 92) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestUpdateByPrimaryKey.java
class TestUpdateByPrimaryKey (line 41) | public class TestUpdateByPrimaryKey {
method testDynamicUpdateByPrimaryKeyAll (line 46) | @Test
method testDynamicUpdateByPrimaryKeyAllByNull (line 60) | @Test
method testDynamicUpdateByPrimaryKey (line 74) | @Test
method testDynamicUpdateByPrimaryKeyNotFoundKeyProperties (line 98) | @Test
method testUpdateByPrimaryKeyAndVersion (line 119) | @Test
class Key (line 152) | class Key extends Country {
method getCountrytel (line 155) | public String getCountrytel() {
method setCountrytel (line 159) | public void setCountrytel(String countrytel) {
FILE: base/src/test/java/tk/mybatis/mapper/test/country/TestUpdateByPrimaryKeySelective.java
class TestUpdateByPrimaryKeySelective (line 40) | public class TestUpdateByPrimaryKeySelective {
method testDynamicUpdateByPrimaryKeySelectiveAll (line 42) | @Test(expected = PersistenceException.class)
method testDynamicUpdateByPrimaryKeySelectiveAllByNull (line 53) | @Test(expected = PersistenceException.class)
method testDynamicUpdateByPrimaryKeySelective (line 67) | @Test
method testDynamicUpdateByPrimaryKeySelectiveNotFoundKeyProperties (line 91) | @Test
class Key (line 106) | class Key extends Country {
method getCountrytel (line 109) | public String getCountrytel() {
method setCountrytel (line 113) | public void setCountrytel(String countrytel) {
FILE: base/src/test/java/tk/mybatis/mapper/test/country2/TestInsert.java
class TestInsert (line 41) | public class TestInsert {
method testDynamicInsertAll (line 46) | @Test
method testDynamicInsertAllByNull (line 69) | @Test
method testDynamicInsert (line 83) | @Test
method testDynamicInsertNull (line 110) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/country2/TestInsertSelective.java
class TestInsertSelective (line 41) | public class TestInsertSelective {
method testDynamicInsertAll (line 46) | @Test
method testDynamicInsertSelectiveAllByNull (line 67) | @Test//(expected = PersistenceException.class)
method testDynamicInsertSelective (line 81) | @Test
method testDynamicInsertSelectiveNull (line 108) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/example/TestDeleteByExample.java
class TestDeleteByExample (line 39) | public class TestDeleteByExample {
method testDeleteByExample (line 41) | @Test
method testDeleteByExample2 (line 57) | @Test
method testDeleteByExample3 (line 75) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/example/TestExampleBuilder.java
class TestExampleBuilder (line 20) | public class TestExampleBuilder {
method testExampleBuilder (line 22) | @Test
method testDistinct (line 41) | @Test
method testForUpdate (line 62) | @Test
method testEqualTo (line 80) | @Test
method testBetween (line 99) | @Test
method testIn (line 123) | @Test
method testWhereCompound0 (line 151) | @Test
method testWhereCompound1 (line 188) | @Test
method testWhereAndWhereCompound (line 210) | @Test
method testWhereOrWhereCompound (line 235) | @Test
method testMultiWhereCompound (line 260) | @Test
method testOrderBy (line 298) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/example/TestSelectByExample.java
class TestSelectByExample (line 48) | public class TestSelectByExample {
method testSelectByExample (line 52) | @Test
method testSelectByExampleException (line 68) | @Test(expected = Exception.class)
method testSelectByExampleForUpdate (line 81) | @Test
method testAndExample (line 98) | @Test
method testSelectByExampleInNotIn (line 115) | @Test
method testSelectByExampleInNotIn2 (line 133) | @Test
method testSelectByExample2 (line 149) | @Test
method testSelectByExample3 (line 166) | @Test
method testSelectByExample4 (line 183) | @Test
method testSelectColumnsByExample (line 203) | @Test
method testExcludeColumnsByExample (line 222) | @Test
method testAndOr (line 239) | @Test
method testOrderBy (line 264) | @Test
method testSelectPropertisCheckCorrect (line 283) | @Test
method testSelectPropertisCheckSpellWrong (line 303) | @Test
method testSelectPropertisCheckTransient1 (line 325) | @Test
method testSelectPropertisCheckTransient2 (line 344) | @Test
method testExcludePropertisCheckWrongSpell (line 363) | @Test
method testExcludePropertisCheckTransient (line 382) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/example/TestSelectCountByExample.java
class TestSelectCountByExample (line 39) | public class TestSelectCountByExample {
method testSelectCountByExample (line 41) | @Test
method testSelectCountByExampleForUpdate (line 57) | @Test
method testSelectCountByExample2 (line 73) | @Test
method testSelectCountByExample3 (line 90) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/example/TestSelectOneByExample.java
class TestSelectOneByExample (line 39) | public class TestSelectOneByExample {
method testSelectOneByExampleException (line 41) | @Test(expected = TooManyResultsException.class)
method testSelectByExample (line 55) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/example/TestUpdateByExample.java
class TestUpdateByExample (line 41) | public class TestUpdateByExample {
method testUpdateByExample (line 43) | @Test
method testUpdateByExample2 (line 67) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/example/TestUpdateByExampleSelective.java
class TestUpdateByExampleSelective (line 39) | public class TestUpdateByExampleSelective {
method testUpdateByExampleSelective (line 41) | @Test
method testUpdateByExampleSelective2 (line 63) | @Test
method testUpdateByExampleSelective3 (line 87) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/identity/TestIndentity.java
class TestIndentity (line 39) | public class TestIndentity {
method testINDENTITYInsert (line 43) | @Test
method testINDENTITYInsert2 (line 63) | @Test
method testINDENTITYInsertSelective (line 92) | @Test
method testINDENTITYInsertSelective2 (line 116) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/ids/TestIds.java
class TestIds (line 41) | public class TestIds {
method testSelectByIds (line 43) | @Test
method testDeleteByIds (line 56) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/jdbc/TestJDBC.java
class TestJDBC (line 36) | public class TestJDBC {
method testJDBC (line 39) | public void testJDBC() {
method testJDBC2 (line 56) | public void testJDBC2() {
FILE: base/src/test/java/tk/mybatis/mapper/test/logic/TestLogicDelete.java
class TestLogicDelete (line 15) | public class TestLogicDelete {
method testLogicDeleteByPrimaryKey (line 17) | @Test
method testLogicDelete (line 40) | @Test
method testLogicDeleteByExample (line 77) | @Test
method testSelectByPrimaryKey (line 99) | @Test
method testExistsWithPrimaryKey (line 115) | @Test
method testSelectAll (line 130) | @Test
method selectCount (line 146) | @Test
method testSelect (line 170) | @Test
method testInsert (line 201) | @Test
method testInsertSelective (line 228) | @Test
method testUpdate (line 261) | @Test
method testUpdateSelective (line 280) | @Test
method testSelectByExample (line 299) | @Test
method testSelectByExample2 (line 319) | @Test
method testUpdateByExample (line 340) | @Test
method testUpdateByExampleSelective (line 366) | @Test
method testExampleWithNoCriteria (line 391) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/mysql/TestMysql.java
class TestMysql (line 41) | public class TestMysql {
method testInsertList (line 48) | public void testInsertList() {
method testInsert (line 75) | public void testInsert() {
FILE: base/src/test/java/tk/mybatis/mapper/test/othres/StyleTest.java
class StyleTest (line 36) | public class StyleTest {
method testNormal (line 46) | @Test
method testUppercase (line 53) | @Test
method testLowercase (line 60) | @Test
method testCamelhump (line 67) | @Test
method testCamelhumpUppercase (line 74) | @Test
method testCamelhumpLowercase (line 81) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/othres/TestDelimiter.java
class TestDelimiter (line 37) | public class TestDelimiter {
method test (line 41) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/rowbounds/TestSelectRowBounds.java
class TestSelectRowBounds (line 41) | public class TestSelectRowBounds {
method testSelectByExample (line 43) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/transientc/TestTransient.java
class TestTransient (line 39) | public class TestTransient {
method testDynamicInsert (line 43) | @Test
method testDynamicUpdateByPrimaryKey (line 72) | @Test
method testDynamicSelect (line 96) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/user/TestBasic.java
class TestBasic (line 43) | public class TestBasic {
method testInsert (line 49) | @Test
method testDelete (line 84) | @Test
method testSelect (line 113) | @Test
method testUpdateByPrimaryKey (line 130) | @Test
method testUpdateByPrimaryKeySelective (line 154) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/user/TestDelete.java
class TestDelete (line 41) | public class TestDelete {
method testDynamicDelete (line 46) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/user/TestMap.java
class TestMap (line 40) | public class TestMap {
method testInsert (line 47) | public void testInsert() {
method testDelete (line 71) | public void testDelete() {
method testSelect (line 97) | public void testSelect() {
method testUpdateByPrimaryKey (line 114) | public void testUpdateByPrimaryKey() {
method testUpdateByPrimaryKeySelective (line 137) | public void testUpdateByPrimaryKeySelective() {
FILE: base/src/test/java/tk/mybatis/mapper/test/user/TestUserLogin.java
class TestUserLogin (line 44) | public class TestUserLogin {
method testInsert (line 50) | @Test
method testDelete (line 75) | @Test
method testSelect (line 103) | @Test
method testUpdateByPrimaryKey (line 120) | @Test
method testUpdateByPrimaryKeySelective (line 146) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/test/user/TestUserLogin2.java
class TestUserLogin2 (line 43) | public class TestUserLogin2 {
method testInsert (line 49) | @Test
method testDelete (line 74) | @Test
method testSelect (line 102) | @Test
method testUpdateByPrimaryKey (line 119) | @Test
method testUpdateByPrimaryKeySelective (line 145) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/Address.java
class Address (line 8) | public class Address implements Serializable {
method getProvince (line 13) | public String getProvince() {
method setProvince (line 17) | public void setProvince(String province) {
method getCity (line 21) | public String getCity() {
method setCity (line 25) | public void setCity(String city) {
method toString (line 29) | @Override
method main (line 41) | public static void main(String[] args) {
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/AddressTypeHandler.java
class AddressTypeHandler (line 14) | public class AddressTypeHandler extends BaseTypeHandler<Address> {
method setNonNullParameter (line 15) | @Override
method convertToAddress (line 20) | private Address convertToAddress(String addressStr) {
method getNullableResult (line 35) | @Override
method getNullableResult (line 40) | @Override
method getNullableResult (line 45) | @Override
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/CreateDB.sql
type user (line 3) | create table user
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/StateEnum.java
type StateEnum (line 6) | public enum StateEnum {
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/StateEnumTypeHandler.java
class StateEnumTypeHandler (line 5) | public class StateEnumTypeHandler extends EnumOrdinalTypeHandler<StateEn...
method StateEnumTypeHandler (line 6) | public StateEnumTypeHandler(Class<StateEnum> type) {
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/TypeHandlerTest.java
class TypeHandlerTest (line 16) | public class TypeHandlerTest extends BaseTest {
method getConfig (line 18) | @Override
method getConfigFileAsReader (line 25) | @Override
method getSqlFileAsReader (line 30) | @Override
method testSelect (line 35) | @Test
method testInsert (line 63) | @Test
method testUpdate (line 90) | @Test
method testDelete (line 115) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/TypeHandlerTest2.java
class TypeHandlerTest2 (line 16) | public class TypeHandlerTest2 extends BaseTest {
method getConfig (line 18) | @Override
method getConfigFileAsReader (line 25) | @Override
method getSqlFileAsReader (line 30) | @Override
method testSelect (line 35) | @Test
method testInsert (line 63) | @Test
method testUpdate (line 90) | @Test
method testDelete (line 115) | @Test
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/User.java
class User (line 11) | public class User implements Serializable {
method getAddress (line 21) | public Address getAddress() {
method setAddress (line 25) | public void setAddress(Address address) {
method getId (line 29) | public Integer getId() {
method setId (line 33) | public void setId(Integer id) {
method getName (line 37) | public String getName() {
method setName (line 41) | public void setName(String name) {
method getState (line 45) | public StateEnum getState() {
method setState (line 49) | public void setState(StateEnum state) {
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/User2.java
class User2 (line 11) | @Table(name = "user")
method getAddress (line 21) | public Address getAddress() {
method setAddress (line 25) | public void setAddress(Address address) {
method getId (line 29) | public Integer getId() {
method setId (line 33) | public void setId(Integer id) {
method getName (line 37) | public String getName() {
method setName (line 41) | public void setName(String name) {
method getState (line 45) | public StateEnum getState() {
method setState (line 49) | public void setState(StateEnum state) {
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/User2Mapper.java
type User2Mapper (line 8) | public interface User2Mapper extends Mapper<User2> {
FILE: base/src/test/java/tk/mybatis/mapper/typehandler/UserMapper.java
type UserMapper (line 8) | public interface UserMapper extends Mapper<User> {
FILE: base/src/test/java/tk/mybatis/mapper/version/CreateDB.sql
type user_timestamp (line 3) | CREATE TABLE user_timestamp
type user_int (line 15) | CREATE TABLE user_int
FILE: base/src/test/java/tk/mybatis/mapper/version/UserInt.java
class UserInt (line 11) | @Table(name = "user_int")
method getId (line 19) | public Integer getId() {
method setId (line 23) | public void setId(Integer id) {
method getAge (line 27) | public Integer getAge() {
method setAge (line 31) | public void setAge(Integer age) {
FILE: base/src/test/java/tk/mybatis/mapper/version/UserIntMapper.java
type UserIntMapper (line 8) | public interface UserIntMapper extends Mapper<UserInt> {
FILE: base/src/test/java/tk/mybatis/mapper/version/UserTimestamp.java
class UserTimestamp (line 12) | @Table(name = "user_timestamp")
method getId (line 20) | public Integer getId() {
method setId (line 24) | public void setId(Integer id) {
method getJoinDate (line 28) | public Timestamp getJoinDate() {
method setJoinDate (line 32) | public void setJoinDate(Timestamp joinDate) {
FILE: base/src/test/java/tk/mybatis/mapper/version/UserTimestampMapper.java
type UserTimestampMapper (line 8) | public interface UserTimestampMapper extends Mapper<UserTimestamp> {
FILE: base/src/test/java/tk/mybatis/mapper/version/VersionTest.java
class VersionTest (line 16) | public class VersionTest extends BaseTest {
method getConfigFileAsReader (line 18) | @Override
method getSqlFileAsReader (line 23) | @Override
method testInsert (line 28) | @Test
method testUpdate (line 43) | @Test
method testUpdateByPrimaryKeySelective (line 61) | @Test
method testUpdateInt (line 79) | @Test
method testUpdateIntByPrimaryKeySelective (line 97) | @Test
FILE: base/src/test/resources/CreateDB.sql
type country (line 3) | create table country
type country2 (line 12) | create table country2
type country_t (line 20) | create table country_t
type country_jdbc (line 27) | create table country_jdbc
type country_i (line 35) | create table country_i
type user_info (line 44) | create table user_info
type user_info_map (line 60) | create table user_info_map
type user_login (line 94) | create table user_login
type tb_user (line 500) | create table tb_user
FILE: core/src/main/java/tk/mybatis/mapper/LogicDeleteException.java
class LogicDeleteException (line 3) | public class LogicDeleteException extends RuntimeException {
method LogicDeleteException (line 5) | public LogicDeleteException() {
method LogicDeleteException (line 9) | public LogicDeleteException(String message) {
method LogicDeleteException (line 13) | public LogicDeleteException(String message, Throwable cause) {
method LogicDeleteException (line 17) | public LogicDeleteException(Throwable cause) {
FILE: core/src/main/java/tk/mybatis/mapper/MapperException.java
class MapperException (line 30) | public class MapperException extends RuntimeException {
method MapperException (line 31) | public MapperException() {
method MapperException (line 35) | public MapperException(String message) {
method MapperException (line 39) | public MapperException(String message, Throwable cause) {
method MapperException (line 43) | public MapperException(Throwable cause) {
FILE: core/src/main/java/tk/mybatis/mapper/code/IdentityDialect.java
type IdentityDialect (line 30) | public enum IdentityDialect {
method IdentityDialect (line 45) | private IdentityDialect(String identityRetrievalStatement) {
method getDatabaseDialect (line 49) | public static IdentityDialect getDatabaseDialect(String database) {
method getIdentityRetrievalStatement (line 75) | public String getIdentityRetrievalStatement() {
FILE: core/src/main/java/tk/mybatis/mapper/code/ORDER.java
type ORDER (line 8) | public enum ORDER {
FILE: core/src/main/java/tk/mybatis/mapper/code/Style.java
type Style (line 30) | public enum Style {
FILE: core/src/main/java/tk/mybatis/mapper/entity/Condition.java
class Condition (line 33) | public class Condition extends Example {
method Condition (line 34) | public Condition(Class<?> entityClass) {
method Condition (line 38) | public Condition(Class<?> entityClass, boolean exists) {
method Condition (line 42) | public Condition(Class<?> entityClass, boolean exists, boolean notNull) {
FILE: core/src/main/java/tk/mybatis/mapper/entity/Config.java
class Config (line 43) | public class Config {
method getCatalog (line 104) | public String getCatalog() {
method setCatalog (line 113) | public void setCatalog(String catalog) {
method getIDENTITY (line 122) | public String getIDENTITY() {
method setIDENTITY (line 135) | public void setIDENTITY(String IDENTITY) {
method getPrefix (line 149) | public String getPrefix() {
method getSchema (line 159) | public String getSchema() {
method setSchema (line 169) | public void setSchema(String schema) {
method getSeqFormat (line 178) | public String getSeqFormat() {
method setSeqFormat (line 191) | public void setSeqFormat(String seqFormat) {
method getStyle (line 195) | public Style getStyle() {
method setStyle (line 199) | public void setStyle(Style style) {
method getWrapKeyword (line 203) | public String getWrapKeyword() {
method setWrapKeyword (line 207) | public void setWrapKeyword(String wrapKeyword) {
method isBEFORE (line 216) | public boolean isBEFORE() {
method setBEFORE (line 220) | public void setBEFORE(boolean BEFORE) {
method isCheckExampleEntityClass (line 224) | public boolean isCheckExampleEntityClass() {
method setCheckExampleEntityClass (line 228) | public void setCheckExampleEntityClass(boolean checkExampleEntityClass) {
method isEnableMethodAnnotation (line 232) | public boolean isEnableMethodAnnotation() {
method setEnableMethodAnnotation (line 236) | public void setEnableMethodAnnotation(boolean enableMethodAnnotation) {
method isEnumAsSimpleType (line 240) | public boolean isEnumAsSimpleType() {
method setEnumAsSimpleType (line 244) | public void setEnumAsSimpleType(boolean enumAsSimpleType) {
method isNotEmpty (line 248) | public boolean isNotEmpty() {
method setNotEmpty (line 252) | public void setNotEmpty(boolean notEmpty) {
method isUseSimpleType (line 256) | public boolean isUseSimpleType() {
method setUseSimpleType (line 260) | public void setUseSimpleType(boolean useSimpleType) {
method setOrder (line 269) | public void setOrder(String order) {
method getIdentity (line 273) | public String getIdentity() {
method setIdentity (line 277) | public void setIdentity(String identity) {
method getMappers (line 281) | public List<Class> getMappers() {
method setMappers (line 285) | public void setMappers(List<Class> mappers) {
method isBefore (line 289) | public boolean isBefore() {
method setBefore (line 293) | public void setBefore(boolean before) {
method getResolveClass (line 297) | public Class<? extends EntityResolve> getResolveClass() {
method setResolveClass (line 301) | public void setResolveClass(Class<? extends EntityResolve> resolveClas...
method isSafeDelete (line 305) | public boolean isSafeDelete() {
method setSafeDelete (line 309) | public void setSafeDelete(boolean safeDelete) {
method isSafeUpdate (line 313) | public boolean isSafeUpdate() {
method setSafeUpdate (line 317) | public void setSafeUpdate(boolean safeUpdate) {
method isLogicDeleteByKey (line 321) | public boolean isLogicDeleteByKey() {
method setLogicDeleteByKey (line 325) | public void setLogicDeleteByKey(boolean logicDeleteByKey) {
method isUseJavaType (line 329) | public boolean isUseJavaType() {
method setUseJavaType (line 333) | public void setUseJavaType(boolean useJavaType) {
method isEnableBaseResultMapFlag (line 337) | public boolean isEnableBaseResultMapFlag() {
method setEnableBaseResultMapFlag (line 341) | public void setEnableBaseResultMapFlag(boolean enableBaseResultMapFlag) {
method setProperties (line 350) | public void setProperties(Properties properties) {
FILE: core/src/main/java/tk/mybatis/mapper/entity/EntityColumn.java
class EntityColumn (line 37) | public class EntityColumn {
method EntityColumn (line 67) | public EntityColumn() {
method EntityColumn (line 70) | public EntityColumn(EntityTable table) {
method getColumnEqualsHolder (line 80) | public String getColumnEqualsHolder(String entityName) {
method getColumnHolder (line 90) | public String getColumnHolder(String entityName) {
method getColumnHolder (line 101) | public String getColumnHolder(String entityName, String suffix) {
method getColumnHolderWithComma (line 112) | public String getColumnHolderWithComma(String entityName, String suffi...
method getColumnHolder (line 124) | public String getColumnHolder(String entityName, String suffix, String...
method equals (line 157) | @Override
method hashCode (line 177) | @Override
method getColumn (line 192) | public String getColumn() {
method setColumn (line 196) | public void setColumn(String column) {
method getColumnEqualsHolder (line 205) | public String getColumnEqualsHolder() {
method getColumnHolder (line 214) | public String getColumnHolder() {
method getEntityField (line 218) | public EntityField getEntityField() {
method setEntityField (line 222) | public void setEntityField(EntityField entityField) {
method getGenerator (line 226) | public String getGenerator() {
method setGenerator (line 230) | public void setGenerator(String generator) {
method getJavaType (line 234) | public Class<?> getJavaType() {
method setJavaType (line 238) | public void setJavaType(Class<?> javaType) {
method getJdbcType (line 242) | public JdbcType getJdbcType() {
method setJdbcType (line 246) | public void setJdbcType(JdbcType jdbcType) {
method getOrderBy (line 250) | public String getOrderBy() {
method setOrderBy (line 254) | public void setOrderBy(String orderBy) {
method getProperty (line 258) | public String getProperty() {
method setProperty (line 262) | public void setProperty(String property) {
method getTable (line 266) | public EntityTable getTable() {
method setTable (line 270) | public void setTable(EntityTable table) {
method getTypeHandler (line 274) | public Class<?> getTypeHandler() {
method setTypeHandler (line 278) | public void setTypeHandler(Class<?> typeHandler) {
method isId (line 282) | public boolean isId() {
method setId (line 286) | public void setId(boolean id) {
method isIdentity (line 290) | public boolean isIdentity() {
method setIdentity (line 294) | public void setIdentity(boolean identity) {
method getGenIdClass (line 298) | public Class<? extends GenId> getGenIdClass() {
method setGenIdClass (line 302) | public void setGenIdClass(Class<? extends GenId> genIdClass) {
method isInsertable (line 306) | public boolean isInsertable() {
method setInsertable (line 310) | public void setInsertable(boolean insertable) {
method isUpdatable (line 314) | public boolean isUpdatable() {
method setUpdatable (line 318) | public void setUpdatable(boolean updatable) {
method getOrder (line 322) | public ORDER getOrder() {
method setOrder (line 326) | public void setOrder(ORDER order) {
method isBlob (line 330) | public boolean isBlob() {
method setBlob (line 334) | public void setBlob(boolean blob) {
method isUseJavaType (line 338) | public boolean isUseJavaType() {
method setUseJavaType (line 342) | public void setUseJavaType(boolean useJavaType) {
method getOrderPriority (line 346) | public int getOrderPriority() {
method setOrderPriority (line 350) | public void setOrderPriority(int orderPriority) {
method toString (line 354) | @Override
FILE: core/src/main/java/tk/mybatis/mapper/entity/EntityField.java
class EntityField (line 38) | public class EntityField {
method EntityField (line 51) | public EntityField(Field field, PropertyDescriptor propertyDescriptor) {
method copyFromPropertyDescriptor (line 70) | public void copyFromPropertyDescriptor(EntityField other) {
method isAnnotationPresent (line 83) | public boolean isAnnotationPresent(Class<? extends Annotation> annotat...
method getAnnotation (line 104) | public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
method getValue (line 126) | public Object getValue(Object object) throws IllegalAccessException, I...
method equals (line 139) | @Override
method hashCode (line 150) | @Override
method getJavaType (line 160) | public Class<?> getJavaType() {
method setJavaType (line 169) | public void setJavaType(Class<?> javaType) {
method getName (line 178) | public String getName() {
FILE: core/src/main/java/tk/mybatis/mapper/entity/EntityTable.java
class EntityTable (line 47) | public class EntityTable {
method EntityTable (line 68) | public EntityTable(Class<?> entityClass) {
method getResultMap (line 78) | public ResultMap getResultMap(Configuration configuration) {
method initPropertyMap (line 119) | public void initPropertyMap() {
method getInstance (line 133) | @SuppressWarnings("unchecked")
method getBaseSelect (line 153) | public String getBaseSelect() {
method setBaseSelect (line 157) | public void setBaseSelect(String baseSelect) {
method getCatalog (line 161) | public String getCatalog() {
method setCatalog (line 165) | public void setCatalog(String catalog) {
method getEntityClass (line 169) | public Class<?> getEntityClass() {
method getEntityClassColumns (line 173) | public LinkedHashSet<EntityColumn> getEntityClassColumns() {
method setEntityClassColumns (line 177) | public void setEntityClassColumns(LinkedHashSet<EntityColumn> entityCl...
method getEntityClassPKColumns (line 181) | public LinkedHashSet<EntityColumn> getEntityClassPKColumns() {
method setEntityClassPKColumns (line 185) | public void setEntityClassPKColumns(LinkedHashSet<EntityColumn> entity...
method getKeyColumns (line 189) | public String[] getKeyColumns() {
method setKeyColumns (line 196) | public void setKeyColumns(String keyColumn) {
method getKeyProperties (line 205) | public String[] getKeyProperties() {
method setKeyProperties (line 212) | public void setKeyProperties(String keyProperty) {
method getName (line 221) | public String getName() {
method setName (line 225) | public void setName(String name) {
method getOrderByClause (line 229) | public String getOrderByClause() {
method setOrderByClause (line 233) | public void setOrderByClause(String orderByClause) {
method getPrefix (line 237) | public String getPrefix() {
method getPropertyMap (line 247) | public Map<String, EntityColumn> getPropertyMap() {
method getSchema (line 251) | public String getSchema() {
method setSchema (line 255) | public void setSchema(String schema) {
method setKeyColumns (line 259) | public void setKeyColumns(List<String> keyColumns) {
method setKeyProperties (line 263) | public void setKeyProperties(List<String> keyProperties) {
method setTable (line 267) | public void setTable(Table table) {
FILE: core/src/main/java/tk/mybatis/mapper/entity/Example.java
class Example (line 41) | public class Example implements IDynamicTableName {
method Example (line 77) | public Example(Class<?> entityClass) {
method Example (line 87) | public Example(Class<?> entityClass, boolean exists) {
method Example (line 98) | public Example(Class<?> entityClass, boolean exists, boolean notNull) {
method Example (line 110) | private Example(Builder builder) {
method builder (line 128) | public static Builder builder(Class<?> entityClass) {
method orderBy (line 132) | public OrderBy orderBy(String property) {
method excludeProperties (line 143) | public Example excludeProperties(String... properties) {
method selectProperties (line 165) | public Example selectProperties(String... properties) {
method or (line 181) | public void or(Criteria criteria) {
method or (line 186) | public Criteria or() {
method and (line 193) | public void and(Criteria criteria) {
method and (line 198) | public Criteria and() {
method createCriteria (line 205) | public Criteria createCriteria() {
method createCriteriaInternal (line 214) | protected Criteria createCriteriaInternal() {
method clear (line 219) | public void clear() {
method getPropertyMap (line 225) | public Map<String, EntityColumn> getPropertyMap() {
class OrderBy (line 229) | public static class OrderBy {
method OrderBy (line 235) | public OrderBy(Example example, Map<String, EntityColumn> propertyMa...
method property (line 240) | private String property(String property) {
method orderBy (line 251) | public OrderBy orderBy(String property) {
method desc (line 266) | public OrderBy desc() {
method asc (line 274) | public OrderBy asc() {
class GeneratedCriteria (line 283) | protected abstract static class GeneratedCriteria {
method GeneratedCriteria (line 294) | protected GeneratedCriteria(Map<String, EntityColumn> propertyMap, b...
method column (line 302) | private String column(String property) {
method property (line 312) | private String property(String property) {
method addCriterion (line 322) | protected void addCriterion(String condition) {
method addCriterion (line 332) | protected void addCriterion(String condition, Object value, String p...
method addCriterion (line 346) | protected void addCriterion(String condition, Object value1, Object ...
method addOrCriterion (line 360) | protected void addOrCriterion(String condition) {
method addOrCriterion (line 370) | protected void addOrCriterion(String condition, Object value, String...
method addOrCriterion (line 384) | protected void addOrCriterion(String condition, Object value1, Objec...
method andIsNull (line 398) | public Criteria andIsNull(String property) {
method andIsNotNull (line 403) | public Criteria andIsNotNull(String property) {
method andEqualTo (line 408) | public Criteria andEqualTo(String property, Object value) {
method andNotEqualTo (line 413) | public Criteria andNotEqualTo(String property, Object value) {
method andGreaterThan (line 418) | public Criteria andGreaterThan(String property, Object value) {
method andGreaterThanOrEqualTo (line 423) | public Criteria andGreaterThanOrEqualTo(String property, Object valu...
method andLessThan (line 428) | public Criteria andLessThan(String property, Object value) {
method andLessThanOrEqualTo (line 433) | public Criteria andLessThanOrEqualTo(String property, Object value) {
method andIn (line 438) | public Criteria andIn(String property, Iterable values) {
method andNotIn (line 443) | public Criteria andNotIn(String property, Iterable values) {
method andBetween (line 448) | public Criteria andBetween(String property, Object value1, Object va...
method andNotBetween (line 453) | public Criteria andNotBetween(String property, Object value1, Object...
method andLike (line 458) | public Criteria andLike(String property, String value) {
method andNotLike (line 463) | public Criteria andNotLike(String property, String value) {
method andCondition (line 474) | public Criteria andCondition(String condition) {
method andCondition (line 486) | public Criteria andCondition(String condition, Object value) {
method andEqualTo (line 498) | public Criteria andEqualTo(Object param) {
method andAllEqualTo (line 522) | public Criteria andAllEqualTo(Object param) {
method orIsNull (line 540) | public Criteria orIsNull(String property) {
method orIsNotNull (line 545) | public Criteria orIsNotNull(String property) {
method orEqualTo (line 550) | public Criteria orEqualTo(String property, Object value) {
method orNotEqualTo (line 555) | public Criteria orNotEqualTo(String property, Object value) {
method orGreaterThan (line 560) | public Criteria orGreaterThan(String property, Object value) {
method orGreaterThanOrEqualTo (line 565) | public Criteria orGreaterThanOrEqualTo(String property, Object value) {
method orLessThan (line 570) | public Criteria orLessThan(String property, Object value) {
method orLessThanOrEqualTo (line 575) | public Criteria orLessThanOrEqualTo(String property, Object value) {
method orIn (line 580) | public Criteria orIn(String property, Iterable values) {
method orNotIn (line 585) | public Criteria orNotIn(String property, Iterable values) {
method orBetween (line 590) | public Criteria orBetween(String property, Object value1, Object val...
method orNotBetween (line 595) | public Criteria orNotBetween(String property, Object value1, Object ...
method orLike (line 600) | public Criteria orLike(String property, String value) {
method orNotLike (line 605) | public Criteria orNotLike(String property, String value) {
method orCondition (line 616) | public Criteria orCondition(String condition) {
method orCondition (line 628) | public Criteria orCondition(String condition, Object value) {
method orEqualTo (line 640) | public Criteria orEqualTo(Object param) {
method orAllEqualTo (line 661) | public Criteria orAllEqualTo(Object param) {
method getAllCriteria (line 679) | public List<Criterion> getAllCriteria() {
method getAndOr (line 683) | public String getAndOr() {
method setAndOr (line 687) | public void setAndOr(String andOr) {
method getCriteria (line 691) | public List<Criterion> getCriteria() {
method isValid (line 695) | public boolean isValid() {
class Criteria (line 711) | public static class Criteria extends GeneratedCriteria {
method Criteria (line 713) | protected Criteria(Map<String, EntityColumn> propertyMap, boolean ex...
class Criterion (line 718) | public static class Criterion {
method Criterion (line 737) | protected Criterion(String condition) {
method Criterion (line 741) | protected Criterion(String condition, Object value, String typeHandl...
method Criterion (line 745) | protected Criterion(String condition, Object value) {
method Criterion (line 749) | protected Criterion(String condition, Object value, Object secondVal...
method Criterion (line 753) | protected Criterion(String condition, Object value, Object secondVal...
method Criterion (line 757) | protected Criterion(String condition, boolean isOr) {
method Criterion (line 765) | protected Criterion(String condition, Object value, String typeHandl...
method Criterion (line 778) | protected Criterion(String condition, Object value, boolean isOr) {
method Criterion (line 782) | protected Criterion(String condition, Object value, Object secondVal...
method Criterion (line 792) | protected Criterion(String condition, Object value, Object secondVal...
method getAndOr (line 796) | public String getAndOr() {
method setAndOr (line 800) | public void setAndOr(String andOr) {
method getCondition (line 804) | public String getCondition() {
method getSecondValue (line 808) | public Object getSecondValue() {
method getTypeHandler (line 812) | public String getTypeHandler() {
method getValue (line 816) | public Object getValue() {
method isBetweenValue (line 820) | public boolean isBetweenValue() {
method isListValue (line 824) | public boolean isListValue() {
method isNoValue (line 828) | public boolean isNoValue() {
method isSingleValue (line 832) | public boolean isSingleValue() {
method isValid (line 836) | public boolean isValid() {
class Builder (line 853) | public static class Builder {
method Builder (line 874) | public Builder(Class<?> entityClass) {
method Builder (line 878) | public Builder(Class<?> entityClass, boolean exists) {
method Builder (line 882) | public Builder(Class<?> entityClass, boolean exists, boolean notNull) {
method distinct (line 892) | public Builder distinct() {
method forUpdate (line 896) | public Builder forUpdate() {
method selectDistinct (line 900) | public Builder selectDistinct(String... properties) {
method select (line 906) | public Builder select(String... properties) {
method notSelect (line 922) | public Builder notSelect(String... properties) {
method from (line 938) | public Builder from(String tableName) {
method where (line 942) | public Builder where(Sqls sqls) {
method where (line 949) | public Builder where(SqlsCriteria sqls) {
method andWhere (line 956) | public Builder andWhere(Sqls sqls) {
method andWhere (line 963) | public Builder andWhere(SqlsCriteria sqls) {
method orWhere (line 970) | public Builder orWhere(Sqls sqls) {
method orWhere (line 977) | public Builder orWhere(SqlsCriteria sqls) {
method orderBy (line 984) | public Builder orderBy(String... properties) {
method orderByAsc (line 988) | public Builder orderByAsc(String... properties) {
method orderByDesc (line 993) | public Builder orderByDesc(String... properties) {
method contactOrderByClause (line 998) | private void contactOrderByClause(String order, String... properties) {
method build (line 1012) | public Example build() {
method transformCriterion (line 1034) | private void transformCriterion(Example.Criteria exampleCriteria, St...
method column (line 1056) | private String column(String property) {
method property (line 1066) | private String property(String property) {
method propertyforOderBy (line 1076) | private String propertyforOderBy(String property) {
method setDistinct (line 1087) | public Builder setDistinct(boolean distinct) {
method setForUpdate (line 1092) | public Builder setForUpdate(boolean forUpdate) {
method setTableName (line 1097) | public Builder setTableName(String tableName) {
method getCountColumn (line 1103) | public String getCountColumn() {
method getDynamicTableName (line 1107) | @Override
method getEntityClass (line 1112) | public Class<?> getEntityClass() {
method getOrderByClause (line 1116) | public String getOrderByClause() {
method setOrderByClause (line 1120) | public void setOrderByClause(String orderByClause) {
method getOredCriteria (line 1124) | public List<Criteria> getOredCriteria() {
method getSelectColumns (line 1128) | public Set<String> getSelectColumns() {
method isDistinct (line 1143) | public boolean isDistinct() {
method setDistinct (line 1147) | public void setDistinct(boolean distinct) {
method isForUpdate (line 1151) | public boolean isForUpdate() {
method setForUpdate (line 1155) | public void setForUpdate(boolean forUpdate) {
method setCountProperty (line 1164) | public void setCountProperty(String property) {
method setTableName (line 1175) | public void setTableName(String tableName) {
FILE: core/src/main/java/tk/mybatis/mapper/entity/IDynamicTableName.java
type IDynamicTableName (line 33) | public interface IDynamicTableName {
method getDynamicTableName (line 40) | String getDynamicTableName();
FILE: core/src/main/java/tk/mybatis/mapper/entity/SqlsCriteria.java
type SqlsCriteria (line 32) | public interface SqlsCriteria {
method getCriteria (line 34) | Sqls.Criteria getCriteria();
FILE: core/src/main/java/tk/mybatis/mapper/genid/GenId.java
type GenId (line 24) | public interface GenId<T> {
method genId (line 26) | T genId(String table, String column);
class NULL (line 28) | class NULL implements GenId {
method genId (line 29) | @Override
FILE: core/src/main/java/tk/mybatis/mapper/genid/GenIdUtil.java
class GenIdUtil (line 39) | public class GenIdUtil {
method genId (line 55) | public static void genId(Object target, String property, Class<? exten...
FILE: core/src/main/java/tk/mybatis/mapper/gensql/GenSql.java
type GenSql (line 11) | public interface GenSql {
method genSql (line 13) | String genSql(EntityTable entityTable, EntityColumn entityColumn);
class NULL (line 15) | class NULL implements GenSql {
method genSql (line 16) | @Override
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/EntityHelper.java
class EntityHelper (line 46) | public class EntityHelper {
method getEntityTable (line 66) | public static EntityTable getEntityTable(Class<?> entityClass) {
method getEntityTableOrNull (line 80) | public static EntityTable getEntityTableOrNull(Class<?> entityClass) {
method getOrderByClause (line 90) | public static String getOrderByClause(Class<?> entityClass) {
method getColumns (line 127) | public static Set<EntityColumn> getColumns(Class<?> entityClass) {
method getPKColumns (line 137) | public static Set<EntityColumn> getPKColumns(Class<?> entityClass) {
method getSelectColumns (line 147) | public static String getSelectColumns(Class<?> entityClass) {
method initEntityNameMap (line 178) | public static synchronized void initEntityNameMap(Class<?> entityClass...
method setResolve (line 192) | static void setResolve(EntityResolve resolve) {
method setKeyProperties (line 202) | public static void setKeyProperties(Set<EntityColumn> pkColumns, Mappe...
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/FieldHelper.java
class FieldHelper (line 45) | public class FieldHelper {
method getFields (line 55) | public static List<EntityField> getFields(Class<?> entityClass) {
method getProperties (line 65) | public static List<EntityField> getProperties(Class<?> entityClass) {
method getAll (line 76) | public static List<EntityField> getAll(Class<?> entityClass) {
method containFiled (line 107) | private static boolean containFiled(List<EntityField> fieldList, Strin...
type IFieldHelper (line 119) | interface IFieldHelper {
method getFields (line 126) | List<EntityField> getFields(Class<?> entityClass);
method getProperties (line 134) | List<EntityField> getProperties(Class<?> entityClass);
class Jdk8FieldHelper (line 140) | static class Jdk8FieldHelper implements IFieldHelper {
method getFields (line 147) | @Override
method _getFields (line 173) | private List<EntityField> _getFields(Class<?> entityClass, List<Enti...
method getProperties (line 220) | @Override
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/MapperHelper.java
class MapperHelper (line 62) | public class MapperHelper {
method MapperHelper (line 84) | public MapperHelper() {
method MapperHelper (line 92) | public MapperHelper(Properties properties) {
method fromMapperClasses (line 104) | private Collection<MapperTemplate> fromMapperClasses(Class<?> mapperCl...
method registerMapper (line 149) | public void registerMapper(Class<?> mapperClass) {
method registerMapper (line 168) | public void registerMapper(String mapperClass) {
method isMapperMethod (line 183) | public MapperTemplate isMapperMethod(String msId) {
method getMapperTemplateByMsId (line 205) | public MapperTemplate getMapperTemplateByMsId(String msId) {
method isExtendCommonMapper (line 222) | public boolean isExtendCommonMapper(Class<?> mapperInterface) {
method hasRegisterMapper (line 238) | private boolean hasRegisterMapper(Class<?> mapperInterface) {
method processConfiguration (line 267) | public void processConfiguration(Configuration configuration) {
method processConfiguration (line 277) | public void processConfiguration(Configuration configuration, Class<?>...
method processMappedStatement (line 299) | public void processMappedStatement(MappedStatement ms) {
method getConfig (line 321) | public Config getConfig() {
method setConfig (line 330) | public void setConfig(Config config) {
method setProperties (line 354) | public void setProperties(Properties properties) {
method setSqlSource (line 392) | public void setSqlSource(MappedStatement ms, MapperTemplate mapperTemp...
method setRawSqlSourceMapper (line 407) | public void setRawSqlSourceMapper(MappedStatement ms) {
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/MapperTemplate.java
class MapperTemplate (line 60) | public abstract class MapperTemplate {
method MapperTemplate (line 67) | public MapperTemplate(Class<?> mapperClass, MapperHelper mapperHelper) {
method dynamicSQL (line 78) | public String dynamicSQL(Object record) {
method addMethodMap (line 88) | public void addMethodMap(String methodName, Method method) {
method getIDENTITY (line 98) | public String getIDENTITY(EntityColumn column) {
method supportMethod (line 108) | public boolean supportMethod(String msId) {
method setResultType (line 123) | protected void setResultType(MappedStatement ms, Class<?> entityClass) {
method setSqlSource (line 137) | protected void setSqlSource(MappedStatement ms, SqlSource sqlSource) {
method createSqlSource (line 149) | public SqlSource createSqlSource(MappedStatement ms, String xmlSql) {
method getEntityClass (line 159) | public Class<?> getEntityClass(MappedStatement ms) {
method tableName (line 199) | protected String tableName(Class<?> entityClass) {
method getConfig (line 212) | public Config getConfig() {
method getIDENTITY (line 216) | public String getIDENTITY() {
method isBEFORE (line 220) | public boolean isBEFORE() {
method isCheckExampleEntityClass (line 224) | public boolean isCheckExampleEntityClass() {
method isNotEmpty (line 228) | public boolean isNotEmpty() {
method setSqlSource (line 239) | public void setSqlSource(MappedStatement ms) throws Exception {
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/SelectKeyGenerator.java
class SelectKeyGenerator (line 42) | public class SelectKeyGenerator implements KeyGenerator {
method SelectKeyGenerator (line 48) | public SelectKeyGenerator(MappedStatement keyStatement, boolean execut...
method processBefore (line 53) | @Override
method processAfter (line 60) | @Override
method processGeneratedKeys (line 67) | private void processGeneratedKeys(Executor executor, MappedStatement m...
method handleMultipleProperties (line 105) | private void handleMultipleProperties(String[] keyProperties,
method setValue (line 124) | private void setValue(MetaObject metaParam, String property, Object va...
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/SelectKeyHelper.java
class SelectKeyHelper (line 47) | public class SelectKeyHelper {
method newSelectKeyMappedStatement (line 55) | public static void newSelectKeyMappedStatement(MappedStatement ms, Ent...
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/SqlHelper.java
class SqlHelper (line 43) | public class SqlHelper {
method isLogicDeleteByKey (line 50) | public static boolean isLogicDeleteByKey() {
method setLogicDeleteByKey (line 54) | public static void setLogicDeleteByKey(boolean logicDeleteByKey) {
method getDynamicTableName (line 65) | public static String getDynamicTableName(Class<?> entityClass, String ...
method getDynamicTableName (line 91) | public static String getDynamicTableName(Class<?> entityClass, String ...
method getBindCache (line 120) | public static String getBindCache(EntityColumn column) {
method getBindValue (line 134) | public static String getBindValue(EntityColumn column, String value) {
method getIfCacheNotNull (line 148) | public static String getIfCacheNotNull(EntityColumn column, String con...
method getIfCacheIsNull (line 162) | public static String getIfCacheIsNull(EntityColumn column, String cont...
method getIfNotNull (line 178) | public static String getIfNotNull(EntityColumn column, String contents...
method getIfIsNull (line 190) | public static String getIfIsNull(EntityColumn column, String contents,...
method getIfNotNull (line 203) | public static String getIfNotNull(String entityName, EntityColumn colu...
method getIfIsNull (line 232) | public static String getIfIsNull(String entityName, EntityColumn colum...
method getAllColumns (line 258) | public static String getAllColumns(Class<?> entityClass) {
method selectAllColumns (line 273) | public static String selectAllColumns(Class<?> entityClass) {
method selectCount (line 287) | public static String selectCount(Class<?> entityClass) {
method selectCountExists (line 305) | public static String selectCountExists(Class<?> entityClass) {
method fromTable (line 325) | public static String fromTable(Class<?> entityClass, String defaultTab...
method updateTable (line 340) | public static String updateTable(Class<?> entityClass, String defaultT...
method updateTable (line 352) | public static String updateTable(Class<?> entityClass, String defaultT...
method deleteFromTable (line 367) | public static String deleteFromTable(Class<?> entityClass, String defa...
method insertIntoTable (line 382) | public static String insertIntoTable(Class<?> entityClass, String defa...
method insertIntoTable (line 398) | public static String insertIntoTable(Class<?> entityClass, String defa...
method insertColumns (line 415) | public static String insertColumns(Class<?> entityClass, boolean skipI...
method insertValuesColumns (line 447) | public static String insertValuesColumns(Class<?> entityClass, boolean...
method updateSetColumns (line 479) | public static String updateSetColumns(Class<?> entityClass, String ent...
method updateSetColumnsIgnoreVersion (line 537) | public static String updateSetColumnsIgnoreVersion(Class<?> entityClas...
method notAllNullParameterCheck (line 578) | public static String notAllNullParameterCheck(String parameterName, Se...
method exampleHasAtLeastOneCriteriaCheck (line 600) | public static String exampleHasAtLeastOneCriteriaCheck(String paramete...
method wherePKColumns (line 613) | public static String wherePKColumns(Class<?> entityClass) {
method wherePKColumns (line 624) | public static String wherePKColumns(Class<?> entityClass, boolean useV...
method wherePKColumns (line 636) | public static String wherePKColumns(Class<?> entityClass, String entit...
method whereAllIfColumns (line 666) | public static String whereAllIfColumns(Class<?> entityClass, boolean e...
method whereAllIfColumns (line 678) | public static String whereAllIfColumns(Class<?> entityClass, boolean e...
method whereVersion (line 714) | public static String whereVersion(Class<?> entityClass){
method whereVersion (line 725) | public static String whereVersion(Class<?> entityClass,String entityNa...
method whereLogicDelete (line 750) | public static String whereLogicDelete(Class<?> entityClass, boolean is...
method logicDeleteColumnEqualsValue (line 767) | public static String logicDeleteColumnEqualsValue(Class<?> entityClass...
method logicDeleteColumnEqualsValue (line 789) | public static String logicDeleteColumnEqualsValue(EntityColumn column,...
method getLogicDeletedValue (line 809) | public static Integer getLogicDeletedValue(EntityColumn column, boolea...
method hasLogicDeleteColumn (line 826) | public static boolean hasLogicDeleteColumn(Class<?> entityClass) {
method getLogicDeleteColumn (line 836) | public static EntityColumn getLogicDeleteColumn(Class<?> entityClass) {
method orderByDefault (line 858) | public static String orderByDefault(Class<?> entityClass) {
method exampleSelectColumns (line 873) | public static String exampleSelectColumns(Class<?> entityClass) {
method exampleCountColumn (line 894) | public static String exampleCountColumn(Class<?> entityClass) {
method exampleOrderBy (line 912) | public static String exampleOrderBy(Class<?> entityClass) {
method exampleOrderBy (line 931) | public static String exampleOrderBy(String entityName, Class<?> entity...
method exampleForUpdate (line 950) | public static String exampleForUpdate() {
method exampleCheck (line 963) | public static String exampleCheck(Class<?> entityClass) {
method exampleWhereClause (line 976) | public static String exampleWhereClause() {
method updateByExampleWhereClause (line 1017) | public static String updateByExampleWhereClause() {
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/resolve/DefaultEntityResolve.java
class DefaultEntityResolve (line 34) | public class DefaultEntityResolve implements EntityResolve {
method resolveEntity (line 37) | @Override
method processField (line 102) | protected void processField(EntityTable entityTable, EntityField field...
method processOrderBy (line 171) | protected void processOrderBy(EntityTable entityTable, EntityField fie...
method processKeyGenerator (line 201) | protected void processKeyGenerator(EntityTable entityTable, EntityFiel...
method processGeneratedValue (line 218) | protected void processGeneratedValue(EntityTable entityTable, EntityCo...
method processKeySql (line 256) | protected void processKeySql(EntityTable entityTable, EntityColumn ent...
FILE: core/src/main/java/tk/mybatis/mapper/mapperhelper/resolve/EntityResolve.java
type EntityResolve (line 11) | public interface EntityResolve {
method resolveEntity (line 20) | EntityTable resolveEntity(Class<?> entityClass, Config config);
FILE: core/src/main/java/tk/mybatis/mapper/provider/EmptyProvider.java
class EmptyProvider (line 35) | public class EmptyProvider extends MapperTemplate {
method EmptyProvider (line 37) | public EmptyProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method supportMethod (line 41) | @Override
FILE: core/src/main/java/tk/mybatis/mapper/session/Configuration.java
class Configuration (line 16) | public class Configuration extends org.apache.ibatis.session.Configurati...
method setMapperHelper (line 27) | public void setMapperHelper(MapperHelper mapperHelper) {
method setMapperProperties (line 36) | public void setMapperProperties(Properties properties) {
method setConfig (line 48) | public void setConfig(Config config) {
method addMappedStatement (line 55) | @Override
FILE: core/src/main/java/tk/mybatis/mapper/util/Assert.java
class Assert (line 9) | public abstract class Assert {
method isTrue (line 11) | public static void isTrue(boolean expression, String errorMsg) throws ...
method isNull (line 17) | public static void isNull(Object object, String errorMsg) throws Illeg...
method notNull (line 23) | public static <T> T notNull(T object, String errorMsg) throws NullPoin...
method notEmpty (line 30) | public static String notEmpty(String text, String errorMsg) throws Ill...
method notEmpty (line 37) | public static Object[] notEmpty(Object[] array, String errorMsg) throw...
method notEmpty (line 44) | public static <T> Collection<T> notEmpty(Collection<T> collection, Str...
method notEmpty (line 51) | public static <K, V> Map<K, V> notEmpty(Map<K, V> map, String errorMsg...
FILE: core/src/main/java/tk/mybatis/mapper/util/MetaObjectUtil.java
class MetaObjectUtil (line 37) | public class MetaObjectUtil {
method forObject (line 55) | public static MetaObject forObject(Object object) {
FILE: core/src/main/java/tk/mybatis/mapper/util/MsUtil.java
class MsUtil (line 37) | public class MsUtil {
method getMapperClass (line 47) | public static Class<?> getMapperClass(String msId) {
method getClassLoaders (line 78) | private static ClassLoader[] getClassLoaders() {
method getMethodName (line 88) | public static String getMethodName(MappedStatement ms) {
method getMethodName (line 98) | public static String getMethodName(String msId) {
FILE: core/src/main/java/tk/mybatis/mapper/util/OGNL.java
class OGNL (line 43) | public abstract class OGNL {
method checkExampleEntityClass (line 54) | public static boolean checkExampleEntityClass(Object parameter, String...
method notAllNullParameterCheck (line 73) | public static boolean notAllNullParameterCheck(Object parameter, Strin...
method notEmptyCollectionCheck (line 100) | public static boolean notEmptyCollectionCheck(Object parameter, String...
method exampleHasAtLeastOneCriteriaCheck (line 113) | public static boolean exampleHasAtLeastOneCriteriaCheck(Object paramet...
method hasSelectColumns (line 152) | public static boolean hasSelectColumns(Object parameter) {
method hasCountColumn (line 168) | public static boolean hasCountColumn(Object parameter) {
method hasForUpdate (line 182) | public static boolean hasForUpdate(Object parameter) {
method hasNoSelectColumns (line 196) | public static boolean hasNoSelectColumns(Object parameter) {
method isDynamicParameter (line 206) | public static boolean isDynamicParameter(Object parameter) {
method isNotDynamicParameter (line 219) | public static boolean isNotDynamicParameter(Object parameter) {
method andOr (line 229) | public static String andOr(Object parameter) {
method andNotLogicDelete (line 247) | public static String andNotLogicDelete(Object parameter) {
method hasWhereCause (line 281) | private static boolean hasWhereCause(Example example) {
FILE: core/src/main/java/tk/mybatis/mapper/util/SimpleTypeUtil.java
class SimpleTypeUtil (line 39) | public class SimpleTypeUtil {
method registerSimpleType (line 84) | public static void registerSimpleType(Class<?> clazz) {
method registerPrimitiveTypes (line 91) | public static void registerPrimitiveTypes() {
method registerSimpleType (line 107) | public static void registerSimpleType(String classes) {
method registerSimpleTypeSilence (line 125) | private static void registerSimpleTypeSilence(String clazz) {
method isSimpleType (line 139) | public static boolean isSimpleType(Class<?> clazz) {
FILE: core/src/main/java/tk/mybatis/mapper/util/SqlReservedWords.java
class SqlReservedWords (line 40) | public class SqlReservedWords {
method SqlReservedWords (line 971) | private SqlReservedWords() {
method containsWord (line 974) | public static boolean containsWord(String word) {
FILE: core/src/main/java/tk/mybatis/mapper/util/Sqls.java
class Sqls (line 10) | public class Sqls {
method Sqls (line 13) | private Sqls() {
method custom (line 17) | public static Sqls custom() {
method getCriteria (line 21) | public Criteria getCriteria() {
method andIsNull (line 25) | public Sqls andIsNull(String property) {
method andIsNotNull (line 30) | public Sqls andIsNotNull(String property) {
method andEqualTo (line 35) | public Sqls andEqualTo(String property, Object value) {
method andNotEqualTo (line 40) | public Sqls andNotEqualTo(String property, Object value) {
method andGreaterThan (line 45) | public Sqls andGreaterThan(String property, Object value) {
method andGreaterThanOrEqualTo (line 50) | public Sqls andGreaterThanOrEqualTo(String property, Object value) {
method andLessThan (line 56) | public Sqls andLessThan(String property, Object value) {
method andLessThanOrEqualTo (line 61) | public Sqls andLessThanOrEqualTo(String property, Object value) {
method andIn (line 66) | public Sqls andIn(String property, Iterable values) {
method andNotIn (line 71) | public Sqls andNotIn(String property, Iterable values) {
method andBetween (line 76) | public Sqls andBetween(String property, Object value1, Object value2) {
method andNotBetween (line 81) | public Sqls andNotBetween(String property, Object value1, Object value...
method andLike (line 86) | public Sqls andLike(String property, String value) {
method andNotLike (line 91) | public Sqls andNotLike(String property, String value) {
method orIsNull (line 97) | public Sqls orIsNull(String property) {
method orIsNotNull (line 102) | public Sqls orIsNotNull(String property) {
method orEqualTo (line 108) | public Sqls orEqualTo(String property, Object value) {
method orNotEqualTo (line 113) | public Sqls orNotEqualTo(String property, Object value) {
method orGreaterThan (line 118) | public Sqls orGreaterThan(String property, Object value) {
method orGreaterThanOrEqualTo (line 123) | public Sqls orGreaterThanOrEqualTo(String property, Object value) {
method orLessThan (line 128) | public Sqls orLessThan(String property, Object value) {
method orLessThanOrEqualTo (line 133) | public Sqls orLessThanOrEqualTo(String property, Object value) {
method orIn (line 138) | public Sqls orIn(String property, Iterable values) {
method orNotIn (line 143) | public Sqls orNotIn(String property, Iterable values) {
method orBetween (line 148) | public Sqls orBetween(String property, Object value1, Object value2) {
method orNotBetween (line 153) | public Sqls orNotBetween(String property, Object value1, Object value2) {
method orLike (line 158) | public Sqls orLike(String property, String value) {
method orNotLike (line 163) | public Sqls orNotLike(String property, String value) {
class Criteria (line 168) | public static class Criteria {
method Criteria (line 172) | public Criteria() {
method getCriterions (line 176) | public List<Criterion> getCriterions() {
method getAndOr (line 180) | public String getAndOr() {
method setAndOr (line 184) | public void setAndOr(String andOr) {
class Criterion (line 189) | public static class Criterion {
method Criterion (line 196) | public Criterion(String property, String condition, String andOr) {
method Criterion (line 203) | public Criterion(String property, Object value, String condition, St...
method Criterion (line 210) | public Criterion(String property, Object value1, Object value2, Stri...
method getProperty (line 218) | public String getProperty() {
method getValue (line 222) | public Object getValue() {
method getSecondValue (line 226) | public Object getSecondValue() {
method getValues (line 230) | public Object[] getValues() {
method getCondition (line 242) | public String getCondition() {
method getAndOr (line 246) | public String getAndOr() {
FILE: core/src/main/java/tk/mybatis/mapper/util/StringUtil.java
class StringUtil (line 35) | public class StringUtil {
method isEmpty (line 44) | public static boolean isEmpty(String str) {
method isNotEmpty (line 54) | public static boolean isNotEmpty(String str) {
method convertByStyle (line 66) | public static String convertByStyle(String str, Style style) {
method camelhumpToUnderline (line 87) | public static String camelhumpToUnderline(String str) {
method underlineToCamelhump (line 107) | public static String underlineToCamelhump(String str) {
method isUppercaseAlpha (line 119) | public static boolean isUppercaseAlpha(char c) {
method isLowercaseAlpha (line 123) | public static boolean isLowercaseAlpha(char c) {
method toUpperAscii (line 127) | public static char toUpperAscii(char c) {
method toLowerAscii (line 134) | public static char toLowerAscii(char c) {
FILE: core/src/main/java/tk/mybatis/mapper/version/DefaultNextVersion.java
class DefaultNextVersion (line 33) | public class DefaultNextVersion implements NextVersion {
method nextVersion (line 35) | @Override
FILE: core/src/main/java/tk/mybatis/mapper/version/NextVersion.java
type NextVersion (line 31) | public interface NextVersion<T> {
method nextVersion (line 39) | T nextVersion(T current) throws VersionException;
FILE: core/src/main/java/tk/mybatis/mapper/version/VersionException.java
class VersionException (line 31) | public class VersionException extends RuntimeException {
method VersionException (line 32) | public VersionException() {
method VersionException (line 36) | public VersionException(String message) {
method VersionException (line 40) | public VersionException(String message, Throwable cause) {
method VersionException (line 44) | public VersionException(Throwable cause) {
FILE: core/src/main/java/tk/mybatis/mapper/version/VersionUtil.java
class VersionUtil (line 35) | public class VersionUtil {
method nextVersion (line 49) | public static Object nextVersion(Class<? extends NextVersion> nextVers...
FILE: core/src/test/java/tk/mybatis/mapper/annotation/ColumnTest.java
class ColumnTest (line 22) | public class ColumnTest {
method beforeTest (line 28) | @Before
class UserColumn (line 36) | class UserColumn {
method testColumn (line 41) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/annotation/ColumnTypeTest.java
class ColumnTypeTest (line 24) | public class ColumnTypeTest {
method beforeTest (line 30) | @Before
class UserColumn (line 38) | class UserColumn {
method testColumn (line 43) | @Test
class UserJdbcTypeVarchar (line 77) | class UserJdbcTypeVarchar {
method testJdbcTypeVarchar (line 82) | @Test
class UserJdbcTypeBlob (line 117) | class UserJdbcTypeBlob {
method testJdbcTypeBlob (line 122) | @Test
class UserTypehandler (line 157) | class UserTypehandler {
method testTypehandler (line 162) | @Test
type UserEnum (line 196) | enum UserEnum {
class UserEnumOrdinalTypeHandler (line 200) | class UserEnumOrdinalTypeHandler {
method testEnumOrdinalTypeHandler (line 205) | @Test
class UserAll (line 240) | class UserAll {
method testAll (line 245) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/annotation/IdTest.java
class IdTest (line 22) | public class IdTest {
method beforeTest (line 28) | @Before
class UserSingleId (line 36) | class UserSingleId {
method testSingleId (line 41) | @Test
class UserCompositeKeys (line 61) | class UserCompositeKeys {
method testCompositeKeys (line 69) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/annotation/KeySqlTest.java
class KeySqlTest (line 20) | public class KeySqlTest {
method beforeTest (line 26) | @Before
class UserJDBC (line 34) | class UserJDBC {
method testUseGeneratedKeys (line 39) | @Test
class UserDialect (line 54) | class UserDialect {
method testDialect (line 59) | @Test
class UserSql (line 75) | class UserSql {
method testSql (line 80) | @Test
class UserAll (line 96) | class UserAll {
method testAll (line 101) | @Test
class UserAll2 (line 116) | class UserAll2 {
method testAll2 (line 121) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/annotation/NameStyleTest.java
class NameStyleTest (line 21) | public class NameStyleTest {
method beforeTest (line 27) | @Before
class UserCamelhump (line 35) | @NameStyle(Style.camelhump)
method testCamelhump (line 40) | @Test
class UserCamelhumpAndUppercase (line 75) | @NameStyle(Style.camelhumpAndUppercase)
method testCamelhumpAndUppercase (line 80) | @Test
class UserCamelhumpAndLowercase (line 115) | @NameStyle(Style.camelhumpAndLowercase)
method testCamelhumpAndLowercase (line 120) | @Test
class UserNormal (line 155) | @NameStyle(Style.normal)
method testNormal (line 160) | @Test
class UserUppercase (line 195) | @NameStyle(Style.uppercase)
method testUppercase (line 200) | @Test
class UserLowercase (line 235) | @NameStyle(Style.lowercase)
method testLowercase (line 240) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/annotation/RegisterMapperTest.java
class RegisterMapperTest (line 14) | public class RegisterMapperTest {
method beforeTest (line 20) | @Before
type MapperHashRegisterMapper (line 28) | @RegisterMapper
type UserMapper (line 33) | interface UserMapper extends MapperHashRegisterMapper {
method testHashRegisterMapper (line 37) | @Test
type RoleMapper (line 43) | interface RoleMapper {
method testRoleMapper (line 47) | @Test
type RoleMapper2 (line 53) | @RegisterMapper
method testRoleMapper2 (line 58) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/annotation/TableTest.java
class TableTest (line 16) | public class TableTest {
method beforeTest (line 20) | @Before
class User (line 26) | @Table(name = "sys_user")
method testColumn (line 31) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/annotation/VersionTest.java
class VersionTest (line 20) | public class VersionTest {
method beforeTest (line 26) | @Before
class UserVersion (line 34) | class UserVersion {
method testVersion (line 39) | @Test
class UserVersionError (line 56) | class UserVersionError {
method testVersionError (line 64) | @Test(expected = VersionException.class)
FILE: core/src/test/java/tk/mybatis/mapper/mapperhelper/ComplexEntityTest.java
class ComplexEntityTest (line 29) | public class ComplexEntityTest {
method beforeTest (line 35) | @Before
class Address (line 43) | static class Address {
method getStreet (line 47) | public String getStreet() {
method setStreet (line 51) | public void setStreet(String street) {
method getZipCode (line 55) | public String getZipCode() {
method setZipCode (line 59) | public void setZipCode(String zipCode) {
type State (line 64) | static enum State {
class AddressHandler (line 69) | public static class AddressHandler implements TypeHandler<Address> {
method AddressHandler (line 70) | public AddressHandler() {
method setParameter (line 74) | @Override
method getResult (line 79) | @Override
method getResult (line 87) | @Override
method getResult (line 95) | @Override
class User (line 101) | static class User {
method getId (line 112) | public Long getId() {
method setId (line 116) | public void setId(Long id) {
method getUserName (line 120) | public String getUserName() {
method setUserName (line 124) | public void setUserName(String userName) {
method getAddress (line 128) | public Address getAddress() {
method setAddress (line 132) | public void setAddress(Address address) {
method getState (line 136) | public State getState() {
method setState (line 140) | public void setState(State state) {
method test (line 145) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/mapperhelper/FieldHelperTest.java
class FieldHelperTest (line 12) | public class FieldHelperTest {
class User (line 14) | static class User {
method testUser (line 21) | @Test
class Admin (line 29) | static class Admin {
method testComplex (line 34) | @Test
FILE: core/src/test/java/tk/mybatis/mapper/mapperhelper/SqlHelperTest.java
class SqlHelperTest (line 12) | public class SqlHelperTest {
method beforeTest (line 16) | @Before
method testLogicDeleteSql (line 23) | @Test
class User (line 43) | @Table(name = "tb_user")
method toString (line 57) | @Override
method getId (line 66) | public Integer getId() {
method setId (line 70) | public void setId(Integer id) {
method getUsername (line 74) | public String getUsername() {
method setUsername (line 78) | public void setUsername(String username) {
method getIsValid (line 82) | public Integer getIsValid() {
method setIsValid (line 86) | public void setIsValid(Integer isValid) {
FILE: core/src/test/java/tk/mybatis/mapper/util/StringUtilTest.java
class StringUtilTest (line 31) | public class StringUtilTest {
method testIsEmpty (line 33) | @Test
method testIsNotEmpty (line 42) | @Test
method testConvertByStyle (line 51) | @Test
method testCamelhumpToUnderline (line 67) | @Test
method testUnderlineToCamelhump (line 73) | @Test
method testIsUppercaseAlpha (line 79) | @Test
method testIsLowercaseAlpha (line 86) | @Test
method testToUpperAscii (line 93) | @Test
method testToLowerAscii (line 99) | @Test
FILE: extra/src/main/java/tk/mybatis/mapper/additional/aggregation/AggregateCondition.java
class AggregateCondition (line 17) | public class AggregateCondition implements Serializable {
method AggregateCondition (line 27) | public AggregateCondition() {
method AggregateCondition (line 36) | public AggregateCondition(String aggregateProperty) {
method AggregateCondition (line 46) | public AggregateCondition(String aggregateProperty, String[] groupByPr...
method AggregateCondition (line 56) | public AggregateCondition(String aggregateProperty, AggregateType aggr...
method AggregateCondition (line 65) | public AggregateCondition(String aggregateProperty, AggregateType aggr...
method builder (line 76) | public static AggregateCondition builder() {
method groupBy (line 80) | public AggregateCondition groupBy(String... groupByProperties) {
method aggregateBy (line 87) | public AggregateCondition aggregateBy(String aggregateProperty) {
method aliasName (line 94) | public AggregateCondition aliasName(String aggregateAliasName) {
method aggregateType (line 99) | public AggregateCondition aggregateType(AggregateType aggregateType) {
method getAggregateProperty (line 106) | public String getAggregateProperty() {
method getAggregateAliasName (line 110) | public String getAggregateAliasName() {
method getGroupByProperties (line 114) | public List<String> getGroupByProperties() {
method getAggregateType (line 118) | public AggregateType getAggregateType() {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/aggregation/AggregateType.java
type AggregateType (line 8) | public enum AggregateType {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/aggregation/AggregationMapper.java
type AggregationMapper (line 13) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectAggregationByExample (line 24) | @SelectProvider(type = AggregationProvider.class, method = "dynamicSQL")
FILE: extra/src/main/java/tk/mybatis/mapper/additional/aggregation/AggregationProvider.java
class AggregationProvider (line 21) | public class AggregationProvider extends MapperTemplate {
method AggregationProvider (line 23) | public AggregationProvider(Class<?> mapperClass, MapperHelper mapperHe...
method aggregationSelectClause (line 27) | public static String aggregationSelectClause(Class<?> entityClass, Str...
method wrapKeyword (line 52) | private static String wrapKeyword(String wrapKeyword, String columnNam...
method aggregationGroupBy (line 59) | public static String aggregationGroupBy(Class<?> entityClass, String w...
method selectAggregationByExample (line 83) | public String selectAggregationByExample(MappedStatement ms) {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/delete/DeleteByPropertyMapper.java
type DeleteByPropertyMapper (line 14) | @RegisterMapper
method deleteByProperty (line 24) | @DeleteProvider(type = DeletePropertyProvider.class, method = "dynamic...
method deleteInByProperty (line 34) | @DeleteProvider(type = DeletePropertyProvider.class, method = "dynamic...
method deleteBetweenByProperty (line 45) | @SelectProvider(type = DeletePropertyProvider.class, method = "dynamic...
FILE: extra/src/main/java/tk/mybatis/mapper/additional/delete/DeletePropertyProvider.java
class DeletePropertyProvider (line 18) | public class DeletePropertyProvider extends MapperTemplate {
method DeletePropertyProvider (line 20) | public DeletePropertyProvider(Class<?> mapperClass, MapperHelper mappe...
method deleteByProperty (line 30) | public String deleteByProperty(MappedStatement ms) {
method deleteInByProperty (line 71) | public String deleteInByProperty(MappedStatement ms) {
method deleteBetweenByProperty (line 106) | public String deleteBetweenByProperty(MappedStatement ms) {
method getColumnByProperty (line 140) | public static String getColumnByProperty(Class<?> entityClass, String ...
method isNull (line 146) | public static boolean isNull(Object value, boolean safeDelete) {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/dialect/oracle/InsertListMapper.java
type InsertListMapper (line 40) | @tk.mybatis.mapper.annotation.RegisterMapper
method insertList (line 54) | @InsertProvider(type = OracleProvider.class, method = "dynamicSQL")
FILE: extra/src/main/java/tk/mybatis/mapper/additional/dialect/oracle/OracleMapper.java
type OracleMapper (line 8) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: extra/src/main/java/tk/mybatis/mapper/additional/dialect/oracle/OracleProvider.java
class OracleProvider (line 17) | public class OracleProvider extends MapperTemplate {
method OracleProvider (line 19) | public OracleProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method insertList (line 40) | public String insertList(MappedStatement ms) {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/idlist/DeleteByIdListMapper.java
type DeleteByIdListMapper (line 38) | @tk.mybatis.mapper.annotation.RegisterMapper
method deleteByIdList (line 47) | @DeleteProvider(type = IdListProvider.class, method = "dynamicSQL")
FILE: extra/src/main/java/tk/mybatis/mapper/additional/idlist/IdListMapper.java
type IdListMapper (line 33) | @tk.mybatis.mapper.annotation.RegisterMapper
FILE: extra/src/main/java/tk/mybatis/mapper/additional/idlist/IdListProvider.java
class IdListProvider (line 45) | public class IdListProvider extends MapperTemplate {
method IdListProvider (line 47) | public IdListProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method notEmpty (line 57) | public static void notEmpty(List<?> list, String errorMsg) {
method deleteByIdList (line 69) | public String deleteByIdList(MappedStatement ms) {
method selectByIdList (line 83) | public String selectByIdList(MappedStatement ms) {
method appendWhereIdList (line 100) | private void appendWhereIdList(StringBuilder sql, Class<?> entityClass...
FILE: extra/src/main/java/tk/mybatis/mapper/additional/idlist/SelectByIdListMapper.java
type SelectByIdListMapper (line 38) | @tk.mybatis.mapper.annotation.RegisterMapper
method selectByIdList (line 47) | @SelectProvider(type = IdListProvider.class, method = "dynamicSQL")
FILE: extra/src/main/java/tk/mybatis/mapper/additional/insert/InsertListMapper.java
type InsertListMapper (line 39) | @RegisterMapper
method insertList (line 52) | @InsertProvider(type = InsertListProvider.class, method = "dynamicSQL")
FILE: extra/src/main/java/tk/mybatis/mapper/additional/insert/InsertListProvider.java
class InsertListProvider (line 39) | public class InsertListProvider extends MapperTemplate {
method InsertListProvider (line 41) | public InsertListProvider(Class<?> mapperClass, MapperHelper mapperHel...
method insertList (line 50) | public String insertList(MappedStatement ms) {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/select/SelectByPropertyMapper.java
type SelectByPropertyMapper (line 17) | @RegisterMapper
method selectOneByProperty (line 27) | @SelectProvider(type = SelectPropertyProvider.class, method = "dynamic...
method selectByProperty (line 37) | @SelectProvider(type = SelectPropertyProvider.class, method = "dynamic...
method selectInByProperty (line 47) | @SelectProvider(type = SelectPropertyProvider.class, method = "dynamic...
method selectBetweenByProperty (line 58) | @SelectProvider(type = SelectPropertyProvider.class, method = "dynamic...
method existsWithProperty (line 68) | @SelectProvider(type = SelectPropertyProvider.class, method = "dynamic...
method selectCountByProperty (line 78) | @SelectProvider(type = SelectPropertyProvider.class, method = "dynamic...
FILE: extra/src/main/java/tk/mybatis/mapper/additional/select/SelectPropertyProvider.java
class SelectPropertyProvider (line 20) | public class SelectPropertyProvider extends MapperTemplate {
method SelectPropertyProvider (line 24) | public SelectPropertyProvider(Class<?> mapperClass, MapperHelper mappe...
method selectOneByProperty (line 35) | public String selectOneByProperty(MappedStatement ms) {
method selectByProperty (line 71) | public String selectByProperty(MappedStatement ms) {
method selectInByProperty (line 107) | public String selectInByProperty(MappedStatement ms) {
method selectBetweenByProperty (line 136) | public String selectBetweenByProperty(MappedStatement ms) {
method existsWithProperty (line 163) | public String existsWithProperty(MappedStatement ms) {
method selectCountByProperty (line 198) | public String selectCountByProperty(MappedStatement ms) {
method getColumnByProperty (line 234) | public static String getColumnByProperty(Class<?> entityClass, String ...
method existsWhereCondition (line 247) | public static boolean existsWhereCondition(Object value, boolean notEm...
FILE: extra/src/main/java/tk/mybatis/mapper/additional/select/SelectSpecifyColumnsMapper.java
type SelectSpecifyColumnsMapper (line 18) | @RegisterMapper
method selectByColumns (line 28) | @SelectProvider(
method selectByPropertys (line 41) | @SelectProvider(
FILE: extra/src/main/java/tk/mybatis/mapper/additional/select/SelectSpecifyColumnsProvider.java
class SelectSpecifyColumnsProvider (line 19) | public class SelectSpecifyColumnsProvider extends MapperTemplate {
method SelectSpecifyColumnsProvider (line 21) | public SelectSpecifyColumnsProvider(Class<?> mapperClass, MapperHelper...
method selectByColumns (line 25) | public String selectByColumns(MappedStatement ms) {
method selectByPropertys (line 41) | public String selectByPropertys(MappedStatement ms) {
method whereAllIfColumns (line 64) | public static String whereAllIfColumns(Class<?> entityClass, boolean e...
method getIfNotNull (line 89) | public static String getIfNotNull(EntityColumn column, String contents...
method getColumnEqualsHolder (line 104) | public static String getColumnEqualsHolder(EntityColumn column) {
method getColumnHolder (line 109) | public static String getColumnHolder(EntityColumn column) {
method getColumnByProperty (line 141) | public static String getColumnByProperty(Class<?> entityClass, String ...
FILE: extra/src/main/java/tk/mybatis/mapper/additional/update/batch/BatchUpdateMapper.java
type BatchUpdateMapper (line 9) | @RegisterMapper
method batchUpdate (line 12) | @UpdateProvider(
FILE: extra/src/main/java/tk/mybatis/mapper/additional/update/batch/BatchUpdateProvider.java
class BatchUpdateProvider (line 8) | public class BatchUpdateProvider extends MapperTemplate {
method BatchUpdateProvider (line 10) | public BatchUpdateProvider(Class<?> mapperClass, MapperHelper mapperHe...
method batchUpdate (line 14) | public String batchUpdate(MappedStatement ms) {
method batchUpdateSelective (line 25) | public String batchUpdateSelective(MappedStatement ms) {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/update/batch/BatchUpdateSelectiveMapper.java
type BatchUpdateSelectiveMapper (line 9) | @RegisterMapper
method batchUpdateSelective (line 12) | @UpdateProvider(
FILE: extra/src/main/java/tk/mybatis/mapper/additional/update/differ/UpdateByDifferMapper.java
type UpdateByDifferMapper (line 14) | @RegisterMapper
method updateByDiffer (line 24) | @UpdateProvider(type = UpdateByDifferProvider.class, method = "dynamic...
FILE: extra/src/main/java/tk/mybatis/mapper/additional/update/differ/UpdateByDifferProvider.java
class UpdateByDifferProvider (line 41) | public class UpdateByDifferProvider extends MapperTemplate {
method UpdateByDifferProvider (line 45) | public UpdateByDifferProvider(Class<?> mapperClass, MapperHelper mappe...
method updateByDiffer (line 54) | public String updateByDiffer(MappedStatement ms) {
method wherePKColumns (line 69) | public String wherePKColumns(Class<?> entityClass, boolean useVersion) {
method whereVersion (line 92) | public String whereVersion(Class<?> entityClass) {
method updateSetColumnsByDiffer (line 114) | public String updateSetColumnsByDiffer(Class<?> entityClass) {
method getIfNotEqual (line 155) | public String getIfNotEqual(EntityColumn column, String contents) {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/update/force/UpdateByPrimaryKeySelectiveForceMapper.java
type UpdateByPrimaryKeySelectiveForceMapper (line 14) | @RegisterMapper
method updateByPrimaryKeySelectiveForce (line 24) | @UpdateProvider(type = UpdateByPrimaryKeySelectiveForceProvider.class,...
FILE: extra/src/main/java/tk/mybatis/mapper/additional/update/force/UpdateByPrimaryKeySelectiveForceProvider.java
class UpdateByPrimaryKeySelectiveForceProvider (line 44) | public class UpdateByPrimaryKeySelectiveForceProvider extends MapperTemp...
method UpdateByPrimaryKeySelectiveForceProvider (line 48) | public UpdateByPrimaryKeySelectiveForceProvider(Class<?> mapperClass, ...
method updateByPrimaryKeySelectiveForce (line 53) | public String updateByPrimaryKeySelectiveForce(MappedStatement ms) {
method updateSetColumnsForce (line 72) | public String updateSetColumnsForce(Class<?> entityClass, String entit...
method getIfNotNull (line 123) | public String getIfNotNull(String entityName, EntityColumn column, Str...
FILE: extra/src/main/java/tk/mybatis/mapper/additional/upsert/BatchUpsertMapper.java
type BatchUpsertMapper (line 9) | @RegisterMapper
method batchUpsert (line 12) | @UpdateProvider(
FILE: extra/src/main/java/tk/mybatis/mapper/additional/upsert/BatchUpsertProvider.java
class BatchUpsertProvider (line 12) | public class BatchUpsertProvider extends MapperTemplate {
method BatchUpsertProvider (line 14) | public BatchUpsertProvider(Class<?> mapperClass, MapperHelper mapperHe...
method batchUpsert (line 18) | public String batchUpsert(MappedStatement ms) {
FILE: extra/src/main/java/tk/mybatis/mapper/additional/upsert/UpsertMapper.java
type UpsertMapper (line 6) | @RegisterMapper
method upsert (line 9) | @UpdateProvider(
FILE: extra/src/main/java/tk/mybatis/mapper/additional/upsert/UpsertProvider.java
class UpsertProvider (line 12) | public class UpsertProvider extends MapperTemplate {
method UpsertProvider (line 14) | public UpsertProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
method upsert (line 18) | public String upsert(MappedStatement ms) {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/BaseTest.java
class BaseTest (line 46) | public abstract class BaseTest {
method init (line 49) | @Before
method configMapperHelper (line 67) | protected void configMapperHelper() {
method runSql (line 86) | protected void runSql(Reader reader) {
method getConfig (line 110) | protected Config getConfig() {
method getConfigFileAsReader (line 119) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 131) | protected Reader getSqlFileAsReader() throws IOException {
method toReader (line 145) | protected Reader toReader(URL url) throws IOException {
method getSqlSession (line 154) | protected SqlSession getSqlSession() {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/Country.java
class Country (line 33) | public class Country implements Serializable {
method getId (line 40) | public Long getId() {
method setId (line 44) | public void setId(Long id) {
method getCountryname (line 48) | public String getCountryname() {
method setCountryname (line 52) | public void setCountryname(String countryname) {
method getCountrycode (line 56) | public String getCountrycode() {
method setCountrycode (line 60) | public void setCountrycode(String countrycode) {
method toString (line 64) | @Override
FILE: extra/src/test/java/tk/mybatis/mapper/additional/CountryMapper.java
type CountryMapper (line 6) | public interface CountryMapper extends IdListMapper<Country, Long> {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/CreateDB.sql
type country (line 3) | create table country
FILE: extra/src/test/java/tk/mybatis/mapper/additional/aggregation/AggregationHumpTest.java
class AggregationHumpTest (line 16) | public class AggregationHumpTest extends BaseTest {
method getConfigFileAsReader (line 23) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 33) | protected Reader getSqlFileAsReader() throws IOException {
method getConfig (line 38) | @Override
method testAggregationWithCamelHump (line 46) | @Test
method testAggregationValueWithCamelHump (line 83) | @Test
FILE: extra/src/test/java/tk/mybatis/mapper/additional/aggregation/AggregationMapperTest.java
class AggregationMapperTest (line 14) | public class AggregationMapperTest extends BaseTest {
method getConfigFileAsReader (line 21) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 33) | protected Reader getSqlFileAsReader() throws IOException {
method testCount (line 40) | @Test
method testAvg (line 55) | @Test
method testSum (line 71) | @Test
method testMax (line 87) | @Test
method testMin (line 105) | @Test
FILE: extra/src/test/java/tk/mybatis/mapper/additional/aggregation/CreateDB.sql
type user (line 3) | create table user
type user_hump (line 25) | create table user_hump (
FILE: extra/src/test/java/tk/mybatis/mapper/additional/aggregation/User.java
class User (line 34) | public class User implements Serializable {
method getId (line 44) | public Long getId() {
method setId (line 48) | public void setId(Long id) {
method getName (line 52) | public String getName() {
method setName (line 56) | public void setName(String name) {
method getRole (line 60) | public String getRole() {
method setRole (line 64) | public void setRole(String role) {
method getAggregation (line 68) | public Long getAggregation() {
method setAggregation (line 72) | public void setAggregation(Long aggregation) {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/aggregation/UserHump.java
class UserHump (line 9) | @Table(name = "user_hump")
method getId (line 20) | public Long getId() {
method setId (line 24) | public void setId(Long id) {
method getUserName (line 28) | public String getUserName() {
method setUserName (line 32) | public void setUserName(String userName) {
method getUserRole (line 36) | public String getUserRole() {
method setUserRole (line 40) | public void setUserRole(String userRole) {
method getAggregation (line 44) | public Long getAggregation() {
method setAggregation (line 48) | public void setAggregation(Long aggregation) {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/aggregation/UserHumpMapper.java
type UserHumpMapper (line 5) | public interface UserHumpMapper extends Mapper<UserHump>, AggregationMap...
FILE: extra/src/test/java/tk/mybatis/mapper/additional/aggregation/UserMapper.java
type UserMapper (line 3) | public interface UserMapper extends AggregationMapper<User> {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/delete/Course.java
class Course (line 13) | public class Course {
method getId (line 28) | public Integer getId() {
method setId (line 32) | public void setId(Integer id) {
method getName (line 36) | public String getName() {
method setName (line 40) | public void setName(String name) {
method getPrice (line 44) | public Integer getPrice() {
method setPrice (line 48) | public void setPrice(Integer price) {
method getPublished (line 52) | public LocalDate getPublished() {
method setPublished (line 56) | public void setPublished(LocalDate published) {
method getDeleted (line 60) | public Boolean getDeleted() {
method setDeleted (line 64) | public void setDeleted(Boolean deleted) {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/delete/CourseMapper.java
type CourseMapper (line 9) | public interface CourseMapper extends BaseSelectMapper<Course>, DeleteBy...
FILE: extra/src/test/java/tk/mybatis/mapper/additional/delete/CreateDB.sql
type course (line 3) | create table course
FILE: extra/src/test/java/tk/mybatis/mapper/additional/delete/DeleteByPropertyMapperTest.java
class DeleteByPropertyMapperTest (line 14) | public class DeleteByPropertyMapperTest extends BaseTest {
method getConfigFileAsReader (line 21) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 31) | protected Reader getSqlFileAsReader() throws IOException {
method deleteByPropertyTest (line 36) | @Test
method deleteInByPropertyTest (line 56) | @Test
method deleteBetweenByPropertyTest (line 76) | @Test
FILE: extra/src/test/java/tk/mybatis/mapper/additional/dialect/oracle/CreateDB.sql
type demo_country (line 2) | create table demo_country
FILE: extra/src/test/java/tk/mybatis/mapper/additional/dialect/oracle/DemoCountry.java
class DemoCountry (line 13) | public class DemoCountry {
method DemoCountry (line 23) | public DemoCountry(String countryId, String countryName, String countr...
method getCountryId (line 29) | public String getCountryId() {
method setCountryId (line 33) | public void setCountryId(String countryId) {
method getCountryName (line 37) | public String getCountryName() {
method setCountryName (line 41) | public void setCountryName(String countryName) {
method getCountryCode (line 45) | public String getCountryCode() {
method setCountryCode (line 49) | public void setCountryCode(String countryCode) {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/dialect/oracle/DemoCountryMapper.java
type DemoCountryMapper (line 10) | public interface DemoCountryMapper extends BaseSelectMapper<DemoCountry>...
FILE: extra/src/test/java/tk/mybatis/mapper/additional/dialect/oracle/OracleTest.java
class OracleTest (line 42) | @Ignore("需要Oracle数据源")
method getConfigFileAsReader (line 50) | protected Reader getConfigFileAsReader() throws IOException {
method runSql (line 57) | @Override
method testSelect (line 61) | @Test
method testInsertList (line 73) | @Test
FILE: extra/src/test/java/tk/mybatis/mapper/additional/idlist/ABaseMapper.java
type ABaseMapper (line 6) | public interface ABaseMapper<T> extends IdListMapper<T, Long> {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/idlist/CountryMapper.java
type CountryMapper (line 6) | public interface CountryMapper extends ABaseMapper<Country> {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/idlist/IdListMapperTest.java
class IdListMapperTest (line 17) | public class IdListMapperTest extends BaseTest {
method getConfig (line 19) | @Override
method getConfigFileAsReader (line 32) | protected Reader getConfigFileAsReader() throws IOException {
method testByIdList (line 37) | @Test
method testDeleteByEmptyIdList (line 57) | @Test(expected = Exception.class)
method testSelectByEmptyIdList (line 68) | @Test
FILE: extra/src/test/java/tk/mybatis/mapper/additional/insertlist/CreateDB.sql
type user (line 3) | create table user
FILE: extra/src/test/java/tk/mybatis/mapper/additional/insertlist/InsertListMapperTest.java
class InsertListMapperTest (line 14) | public class InsertListMapperTest extends BaseTest {
method getConfigFileAsReader (line 59) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 71) | protected Reader getSqlFileAsReader() throws IOException {
method testInsertList (line 78) | @Test
FILE: extra/src/test/java/tk/mybatis/mapper/additional/insertlist/UUIdGenId.java
class UUIdGenId (line 10) | public class UUIdGenId implements GenId<String> {
method genId (line 11) | @Override
FILE: extra/src/test/java/tk/mybatis/mapper/additional/insertlist/User.java
class User (line 35) | public class User implements Serializable {
method User (line 43) | public User() {
method User (line 46) | public User(String name, String role) {
method getId (line 51) | public String getId() {
method setId (line 55) | public void setId(String id) {
method getName (line 59) | public String getName() {
method setName (line 63) | public void setName(String name) {
method getRole (line 67) | public String getRole() {
method setRole (line 71) | public void setRole(String role) {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/insertlist/UserMapper.java
type UserMapper (line 5) | public interface UserMapper extends InsertListMapper<User> {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/select/Book.java
class Book (line 10) | public class Book {
method getId (line 21) | public Integer getId() {
method setId (line 25) | public void setId(Integer id) {
method getName (line 29) | public String getName() {
method setName (line 33) | public void setName(String name) {
method getPrice (line 37) | public Integer getPrice() {
method setPrice (line 41) | public void setPrice(Integer price) {
method getPublished (line 45) | public LocalDate getPublished() {
method setPublished (line 49) | public void setPublished(LocalDate published) {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/select/BookMapper.java
type BookMapper (line 7) | public interface BookMapper extends SelectByPropertyMapper<Book> {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/select/CreateDB.sql
type book (line 3) | create table book
FILE: extra/src/test/java/tk/mybatis/mapper/additional/select/SelectByPropertyMapperTest.java
class SelectByPropertyMapperTest (line 15) | public class SelectByPropertyMapperTest extends BaseTest {
method getConfigFileAsReader (line 22) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 32) | protected Reader getSqlFileAsReader() throws IOException {
method selectOneByPropertyTest (line 37) | @Test
method selectByPropertyTest (line 50) | @Test
method selectInByPropertyTest (line 62) | @Test
method selectBetweenByPropertyTest (line 74) | @Test
method selectCountByPropertyTest (line 87) | @Test
method existsWithPropertyTest (line 99) | @Test
FILE: extra/src/test/java/tk/mybatis/mapper/additional/update/differ/CountryMapper.java
type CountryMapper (line 7) | public interface CountryMapper extends UpdateByDifferMapper<Country> {
method selectByPrimaryKey (line 9) | @Select("select * from country where id = #{id}")
FILE: extra/src/test/java/tk/mybatis/mapper/additional/update/differ/UpdateByDifferMapperTest.java
class UpdateByDifferMapperTest (line 13) | public class UpdateByDifferMapperTest extends BaseTest {
method getConfigFileAsReader (line 20) | protected Reader getConfigFileAsReader() throws IOException {
method testUpdateByDiffer (line 28) | @Test
FILE: extra/src/test/java/tk/mybatis/mapper/additional/update/force/CountryInt.java
class CountryInt (line 35) | public class CountryInt implements Serializable {
method getId (line 43) | public Integer getId() {
method setId (line 47) | public void setId(Integer id) {
method getCountrycode (line 51) | public Integer getCountrycode() {
method setCountrycode (line 55) | public void setCountrycode(Integer countrycode) {
method getCountryname (line 59) | public String getCountryname() {
method setCountryname (line 63) | public void setCountryname(String countryname) {
FILE: extra/src/test/java/tk/mybatis/mapper/additional/update/force/CountryIntMapper.java
type CountryIntMapper (line 34) | public interface CountryIntMapper extends BaseSelectMapper<CountryInt>, ...
FILE: extra/src/test/java/tk/mybatis/mapper/additional/update/force/CreateDB.sql
type country_int (line 4) | create table country_int
FILE: extra/src/test/java/tk/mybatis/mapper/additional/update/force/UpdateByPrimaryKeySelectiveForceTest.java
class UpdateByPrimaryKeySelectiveForceTest (line 42) | public class UpdateByPrimaryKeySelectiveForceTest extends BaseTest {
method getConfigFileAsReader (line 49) | protected Reader getConfigFileAsReader() throws IOException {
method getSqlFileAsReader (line 61) | protected Reader getSqlFileAsReader() throws IOException {
method testUpdateByPrimaryKeySelectiveForceByNull (line 66) | @Test
method testUpdateByPrimaryKeySelectiveForce (line 83) | @Test
FILE: generator/src/main/java/tk/mybatis/mapper/generator/FalseMethodPlugin.java
class FalseMethodPlugin (line 41) | public class FalseMethodPlugin extends PluginAdapter {
method validate (line 43) | @Override
method clientDeleteByPrimaryKeyMethodGenerated (line 50) | @Override
method clientInsertMethodGenerated (line 55) | @Override
method clientInsertSelectiveMethodGenerated (line 60) | @Override
method clientSelectAllMethodGenerated (line 65) | @Override
method clientSelectByPrimaryKeyMethodGenerated (line 70) | @Override
method clientUpdateByPrimaryKeySelectiveMethodGenerated (line 75) | @Override
method clientUpdateByPrimaryKeyWithBLOBsMethodGenerated (line 80) | @Override
method clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated (line 85) | @Override
method sqlMapDeleteByPrimaryKeyElementGenerated (line 90) | @Override
method sqlMapInsertElementGenerated (line 95) | @Override
method sqlMapInsertSelectiveElementGenerated (line 100) | @Override
method sqlMapSelectAllElementGenerated (line 105) | @Override
method sqlMapSelectByPrimaryKeyElementGenerated (line 110) | @Override
method sqlMapUpdateByPrimaryKeySelectiveElementGenerated (line 115) | @Override
method sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated (line 120) | @Override
method sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated (line 125) | @Override
method providerGenerated (line 130) | @Override
method providerApplyWhereMethodGenerated (line 135) | @Override
method providerInsertSelectiveMethodGenerated (line 140) | @Override
method providerUpdateByPrimaryKeySelectiveMethodGenerated (line 145) | @Override
FILE: generator/src/main/java/tk/mybatis/mapper/generator/MapperCommentGenerator.java
class MapperCommentGenerator (line 40) | public class MapperCommentGenerator implements CommentGenerator {
method MapperCommentGenerator (line 55) | public MapperCommentGenerator() {
method addJavaFileComment (line 59) | @Override
method addComment (line 69) | @Override
method addRootComment (line 79) | @Override
method addConfigurationProperties (line 84) | @Override
method getDelimiterName (line 112) | public String getDelimiterName(String name) {
method addJavadocTag (line 126) | protected void addJavadocTag(JavaElement javaElement, boolean markAsDo...
method addClassComment (line 142) | @Override
method addEnumComment (line 146) | @Override
method addFieldComment (line 157) | @Override
method addFieldComment (line 231) | @Override
method addModelClassComment (line 235) | @Override
method addGeneralMethodComment (line 244) | @Override
method addGetterComment (line 255) | @Override
method addSetterComment (line 283) | @Override
method addClassComment (line 312) | @Override
method addGeneralMethodAnnotation (line 319) | @Override
method addGeneralMethodAnnotation (line 327) | @Override
method addFieldAnnotation (line 335) | @Override
method addFieldAnnotation (line 343) | @Override
method addClassAnnotation (line 351) | @Override
FILE: generator/src/main/java/tk/mybatis/mapper/generator/MapperPlugin.java
class MapperPlugin (line 42) | public class MapperPlugin extends FalseMethodPlugin {
method getDelimiterName (line 89) | public String getDelimiterName(String name) {
method clientGenerated (line 108) | @Override
method processEntityClass (line 128) | private void processEntityClass(TopLevelClass topLevelClass, Introspec...
method modelGetterMethodGenerated (line 336) | @Override
method modelSetterMethodGenerated (line 348) | @Override
method modelBaseRecordClassGenerated (line 363) | @Override
method modelPrimaryKeyClassGenerated (line 376) | @Override
method modelRecordWithBLOBsClassGenerated (line 389) | @Override
method setContext (line 396) | @Override
method setProperties (line 422) | @Override
method getProperty (line 481) | protected String getProperty(String key) {
method getProperty (line 485) | protected String getProperty(String key, String defaultValue) {
method getPropertyAsBoolean (line 489) | protected Boolean getPropertyAsBoolean(String key) {
FILE: generator/src/main/java/tk/mybatis/mapper/generator/TemplateFilePlugin.java
class TemplateFilePlugin (line 66) | public class TemplateFilePlugin extends PluginAdapter {
method convertToJavaBeansField (line 113) | public static Field convertToJavaBeansField(IntrospectedColumn introsp...
method read (line 128) | protected String read(InputStream inputStream) throws IOException {
method validate (line 142) | @Override
method contextGenerateAdditionalJavaFiles (line 201) | @Override
method contextGenerateAdditionalJavaFiles (line 213) | @Override
method setProperties (line 222) | @Override
FILE: generator/src/main/java/tk/mybatis/mapper/generator/TkMyBatis3Impl.java
class TkMyBatis3Impl (line 47) | public class TkMyBatis3Impl extends IntrospectedTableMyBatis3Impl {
method calculateMyBatis3XmlMapperFileName (line 49) | @Override
method calculateJavaClientAttributes (line 68) | @Override
FILE: generator/src/main/java/tk/mybatis/mapper/generator/TkMyBatis3SimpleImpl.java
class TkMyBatis3SimpleImpl (line 47) | public class TkMyBatis3SimpleImpl extends IntrospectedTableMyBatis3Simpl...
method calculateMyBatis3XmlMapperFileName (line 49) | @Override
method calculateJavaClientAttributes (line 68) | @Override
FILE: generator/src/main/java/tk/mybatis/mapper/generator/file/GenerateByListTemplateFile.java
class GenerateByListTemplateFile (line 39) | public class GenerateByListTemplateFile extends GeneratedJavaFile {
method GenerateByListTemplateFile (line 54) | public GenerateByListTemplateFile(Set<TableClass> tableClassSet, ListT...
method getCompilationUnit (line 64) | @Override
method getFileName (line 69) | @Override
method getFormattedContent (line 74) | @Override
method getTargetPackage (line 79) | @Override
method isMergeable (line 84) | @Override
FILE: generator/src/main/java/tk/mybatis/mapper/generator/file/GenerateByTemplateFile.java
class GenerateByTemplateFile (line 38) | public class GenerateByTemplateFile extends GeneratedJavaFile {
method GenerateByTemplateFile (line 53) | public GenerateByTemplateFile(TableClass tableClass, TemplateFormatter...
method getCompilationUnit (line 63) | @Override
method getFileName (line 68) | @Override
method getFormattedContent (line 73) | @Override
method getTargetPackage (line 78) | @Override
method isMergeable (line 83) | @Override
FILE: generator/src/main/java/tk/mybatis/mapper/generator/formatter/FreemarkerTemplateFormatter.java
class FreemarkerTemplateFormatter (line 44) | public class FreemarkerTemplateFormatter implements TemplateFormatter, L...
method FreemarkerTemplateFormatter (line 48) | public FreemarkerTemplateFormatter() {
method process (line 63) | public String process(String templateName, String templateSource, Map<...
method getFormattedContent (line 74) | @Override
method getFormattedContent (line 86) | @Override
FILE: generator/src/main/java/tk/mybatis/mapper/generator/formatter/ListTemplateFormatter.java
type ListTemplateFormatter (line 36) | public interface ListTemplateFormatter {
method getFormattedContent (line 47) | String getFormattedContent(Set<TableClass> tableClassSet, Properties p...
FILE: generator/src/main/java/tk/mybatis/mapper/generator/formatter/TemplateFormatter.java
type TemplateFormatter (line 35) | public interface TemplateFormatter {
method getFormattedContent (line 46) | String getFormattedContent(TableClass tableClass, Properties propertie...
FILE: generator/src/main/java/tk/mybatis/mapper/generator/model/ColumnField.java
class ColumnField (line 35) | public class ColumnField implements Serializable {
method getColumnName (line 58) | public String getColumnName() {
method setColumnName (line 62) | public void setColumnName(String columnName) {
method getFieldName (line 66) | public String getFieldName() {
method setFieldName (line 70) | public void setFieldName(String fieldName) {
method getFullTypeName (line 74) | public String getFullTypeName() {
method setFullTypeName (line 78) | public void setFullTypeName(String fullTypeName) {
method getJdbcType (line 82) | public String getJdbcType() {
method setJdbcType (line 86) | public void setJdbcType(String jdbcType) {
method getLength (line 90) | public int getLength() {
method setLength (line 94) | public void setLength(int length) {
method getRemarks (line 98) | public String getRemarks() {
method setRemarks (line 102) | public void setRemarks(String remarks) {
method getScale (line 106) | public int getScale() {
method setScale (line 110) | public void setScale(int scale) {
method getShortTypeName (line 114) | public String getShortTypeName() {
method setShortTypeName (line 118) | public void setShortTypeName(String shortTypeName) {
method getTableClass (line 122) | public TableClass getTableClass() {
method setTableClass (line 126) | public void setTableClass(TableClass tableClass) {
method getType (line 130) | public FullyQualifiedJavaType getType() {
method setType (line 134) | public void setType(FullyQualifiedJavaType type) {
method getTypePackage (line 138) | public String getTypePackage() {
method setTypePackage (line 142) | public void setTypePackage(String typePackage) {
method isBlobColumn (line 146) | public boolean isBlobColumn() {
method setBlobColumn (line 150) | public void setBlobColumn(boolean blobColumn) {
method isIdentity (line 154) | public boolean isIdentity() {
method setIdentity (line 158) | public void setIdentity(boolean identity) {
method isJdbcCharacterColumn (line 162) | public boolean isJdbcCharacterColumn() {
method setJdbcCharacterColumn (line 166) | public void setJdbcCharacterColumn(boolean jdbcCharacterColumn) {
method isJdbcDateColumn (line 170) | public boolean isJdbcDateColumn() {
method setJdbcDateColumn (line 174) | public void setJdbcDateColumn(boolean jdbcDateColumn) {
method isJdbcTimeColumn (line 178) | public boolean isJdbcTimeColumn() {
method setJdbcTimeColumn (line 182) | public void setJdbcTimeColumn(boolean jdbcTimeColumn) {
method isNullable (line 186) | public boolean isNullable() {
method setNullable (line 190) | public void setNullable(boolean nullable) {
method isSequenceColumn (line 194) | public boolean isSequenceColumn() {
method setSequenceColumn (line 198) | public void setSequenceColumn(boolean sequenceColumn) {
method isStringColumn (line 202) | public boolean isStringColumn() {
method setStringColumn (line 206) | public void setStringColumn(boolean stringColumn) {
FILE: generator/src/main/java/tk/mybatis/mapper/generator/model/TableClass.java
class TableClass (line 37) | public class TableClass implements Serializable {
method getAllFields (line 56) | public List<ColumnField> getAllFields() {
method setAllFields (line 60) | public void setAllFields(List<ColumnField> allFields) {
method getBaseFields (line 64) | public List<ColumnField> getBaseFields() {
method setBaseFields (line 68) | public void setBaseFields(List<ColumnField> baseFields) {
method getBlobFields (line 72) | public List<ColumnField> getBlobFields() {
method setBlobFields (line 76) | public void setBlobFields(List<ColumnField> blobFields) {
method getFullClassName (line 80) | public String getFullClassName() {
method setFullClassName (line 84) | public void setFullClassName(String fullClassName) {
method getIntrospectedTable (line 88) | public IntrospectedTable getIntrospectedTable() {
method setIntrospectedTable (line 92) | public void setIntrospectedTable(IntrospectedTable introspectedTable) {
method getLowerCaseName (line 96) | public String getLowerCaseName() {
method setLowerCaseName (line 100) | public void setLowerCaseName(String lowerCaseName) {
method getPackageName (line 104) | public String getPackageName() {
method setPackageName (line 108) | public void setPackageName(String packageName) {
method getPkFields (line 112) | public List<ColumnField> getPkFields() {
method setPkFields (line 116) | public void setPkFields(List<ColumnField> pkFields) {
method getShortClassName (line 120) | public String getShortClassName() {
method setShortClassName (line 124) | public void setShortClassName(String shortClassName) {
method getTableName (line 128) | public String getTableName() {
method setTableName (line 132) | public void setTableName(String tableName) {
method getType (line 136) | public FullyQualifiedJavaType getType() {
method setType (line 140) | public void setType(FullyQualifiedJavaType type) {
method getVariableName (line 144) | public String getVariableName() {
method setVariableName (line 148) | public void setVariableName(String variableName) {
method getRemarks (line 152) | public String getRemarks() {
method setRemarks (line 156) | public void setRemarks(String remarks) {
FILE: generator/src/main/java/tk/mybatis/mapper/generator/model/TableColumnBuilder.java
class TableColumnBuilder (line 40) | public class TableColumnBuilder {
method build (line 48) | public static TableClass build(IntrospectedTable introspectedTable) {
method build (line 100) | public static ColumnField build(IntrospectedColumn column) {
FILE: generator/src/test/java/tk/mybatis/mapper/generator/Generator.java
class Generator (line 44) | public class Generator {
method startDB (line 46) | public static void startDB() {
method getResourceAsStream (line 69) | public static InputStream getResourceAsStream(String path) {
method main (line 73) | public static void main(String[] args) throws Exception {
FILE: generator/src/test/resources/CreateDB.sql
type country (line 3) | create table country
type user_info (line 15) | create table user_info
FILE: solon-plugin/src/main/java/tk/mybatis/solon/TkMapperAdapterFactory.java
class TkMapperAdapterFactory (line 14) | public class TkMapperAdapterFactory implements MybatisAdapterFactory {
method create (line 15) | @Override
method create (line 20) | @Override
FILE: solon-plugin/src/main/java/tk/mybatis/solon/TkMapperMybatisAdapter.java
class TkMapperMybatisAdapter (line 20) | public class TkMapperMybatisAdapter extends MybatisAdapterDefault {
method TkMapperMybatisAdapter (line 26) | protected TkMapperMybatisAdapter(BeanWrap dsWrap) {
method TkMapperMybatisAdapter (line 38) | protected TkMapperMybatisAdapter(BeanWrap dsWrap, Props dsProps) {
method initConfiguration (line 50) | @Override
method getFactory (line 61) | @Override
method injectTo (line 70) | @Override
method builderMapperHelper (line 95) | private void builderMapperHelper() {
FILE: solon-plugin/src/main/java/tk/mybatis/solon/XPluginImpl.java
class XPluginImpl (line 13) | public class XPluginImpl implements Plugin {
method start (line 16) | @Override
FILE: solon-plugin/src/test/java/tk/mybatis/solon/test/TkMapperTest.java
class TkMapperTest (line 10) | public class TkMapperTest {
method main (line 12) | public static void main(String[] args) {
FILE: solon-plugin/src/test/java/tk/mybatis/solon/test/conf/TestConfig.java
class TestConfig (line 19) | @Configuration
method db1 (line 24) | @Bean(name = "db1", typed = true)
FILE: solon-plugin/src/test/java/tk/mybatis/solon/test/entity/User.java
class User (line 12) | @Table(name = "`user`")
method getId (line 35) | public Long getId() {
method setId (line 42) | public void setId(Long id) {
method getName (line 49) | public String getName() {
method setName (line 56) | public void setName(String name) {
method getAge (line 63) | public Integer getAge() {
method setAge (line 70) | public void setAge(Integer age) {
method getCreateTime (line 77) | public Date getCreateTime() {
method setCreateTime (line 84) | public void setCreateTime(Date createTime) {
method getIsDel (line 91) | public Boolean getIsDel() {
method setIsDel (line 98) | public void setIsDel(Boolean isDel) {
method toString (line 102) | @Override
FILE: solon-plugin/src/test/java/tk/mybatis/solon/test/mapper/UserMapper.java
type UserMapper (line 11) | public interface UserMapper extends Mapper<User> {
method findByGTAge (line 13) | @ResultMap("tk.mybatis.solon.test.mapper.UserMapper.BaseResultMap")
method findByName (line 17) | List<User> findByName(@Param("name") String name);
FILE: solon-plugin/src/test/java/tk/mybatis/solon/test/service/TkMapperServiceTest.java
class TkMapperServiceTest (line 25) | @SolonTest(TkMapperTest.class)
method all (line 34) | @Test
method byId (line 43) | @Test
method exampleQuery (line 53) | @Test
method rawMybatisQuery (line 63) | @Test
method logicDelInsert (line 72) | @Test
FILE: spring-boot-starter/mapper-spring-boot-autoconfigure/src/main/java/tk/mybatis/mapper/autoconfigure/ConfigurationCustomizer.java
type ConfigurationCustomizer (line 26) | public interface ConfigurationCustomizer {
method customize (line 33) | void customize(Configuration configuration);
FILE: spring-boot-starter/mapper-spring-boot-autoconfigure/src/main/java/tk/mybatis/mapper/autoconfigure/MapperAutoConfiguration.java
class MapperAutoConfiguration (line 89) | @org.springframework.context.annotation.Configuration(proxyBeanMethods =...
method MapperAutoConfiguration (line 115) | public MapperAutoConfiguration(MybatisProperties properties, ObjectPro...
method afterPropertiesSet (line 130) | @Override
method checkConfigFileExists (line 135) | private void checkConfigFileExists() {
method sqlSessionFactory (line 143) | @Bean
method applyConfiguration (line 199) | private void applyConfiguration(SqlSessionFactoryBean factory) {
method applySqlSessionFactoryBeanCustomizers (line 216) | private void applySqlSessionFactoryBeanCustomizers(SqlSessionFactoryBe...
method sqlSessionTemplate (line 224) | @Bean
class AutoConfiguredMapperScannerRegistrar (line 240) | public static class AutoConfiguredMapperScannerRegistrar
method registerBeanDefinitions (line 247) | @Override
method setBeanFactory (line 310) | @Override
method setResourceLoader (line 315) | @Override
method setEnvironment (line 320) | @Override
method getBeanNameForType (line 325) | private String getBeanNameForType(Class<?> type, ListableBeanFactory...
class MapperScannerRegistrarNotFoundConfiguration (line 336) | @org.springframework.context.annotation.Configuration(proxyBeanMethods...
method afterPropertiesSet (line 341) | @Override
class RestartConfiguration (line 352) | @org.springframework.context.annotation.Configuration
method mapperCacheDisabler (line 356) | @Bean
FILE: spring-boot-starter/mapper-spring-boot-autoconfigure/src/main/java/tk/mybatis/mapper/autoconfigure/MapperCacheDisabler.java
class MapperCacheDisabler (line 19) | public class MapperCacheDisabler implements InitializingBean {
method afterPropertiesSet (line 23) | @Override
method disableCaching (line 28) | private void disableCaching() {
method removeStaticCache (line 42) | private void removeStaticCache(Class<?> utilClass) {
method removeStaticCache (line 46) | private void removeStaticCache(Class<?> utilClass, String fieldName) {
method removeEntityHelperCache (line 68) | private void removeEntityHelperCache(Class<?> entityHelper) {
FILE: spring-boot-starter/mapper-spring-boot-autoconfigure/src/main/java/tk/mybatis/mapper/autoconfigure/MapperProperties.java
class MapperProperties (line 37) | @ConfigurationProperties(prefix = MapperProperties.PREFIX)
FILE: spring-boot-starter/mapper-spring-boot-autoconfigure/src/main/java/tk/mybatis/mapper/autoconfigure/MybatisDependsOnDatabaseInitializationDetector.java
class MybatisDependsOnDatabaseInitializationDetector (line 16) | class MybatisDependsOnDatabaseInitializationDetector
method getDependsOnDatabaseInitializationBeanTypes (line 19) | @Override
FILE: spring-boot-starter/mapper-spring-boot-autoconfigure/src/main/java/tk/mybatis/mapper/autoconfigure/MybatisLanguageDriverAutoConfiguration.java
class MybatisLanguageDriverAutoConfiguration (line 24) | @Configuration(proxyBeanMethods = false)
class LegacyFreeMarkerConfiguration (line 33) | @Configuration(proxyBeanMethods = false)
method freeMarkerLanguageDriver (line 37) | @Bean
class FreeMarkerConfiguration (line 47) | @Configuration(proxyBeanMethods = false)
method freeMarkerLanguageDriver (line 50) | @Bean
method freeMarkerLanguageDriverConfig (line 56) | @Bean
class LegacyVelocityConfiguration (line 67) | @Configuration(proxyBeanMethods = false)
method velocityLanguageDriver (line 72) | @Bean
class VelocityConfiguration (line 82) | @Configuration(proxyBeanMethods = false)
method velocityLanguageDriver (line 85) | @Bean
method velocityLanguageDriverConfig (line 91) | @Bean
class ThymeleafConfiguration (line 99) | @Configuration(proxyBeanMethods = false)
method thymeleafLanguageDriver (line 102) | @Bean
method thymeleafLanguageDriverConfig (line 108) | @Bean
class MetadataThymeleafLanguageDriverConfig (line 116) | @SuppressWarnings("unused")
method getDialect (line 119) | @ConfigurationProperties(CONFIGURATION_PROPERTY_PREFIX + ".thymele...
method getTemplateFile (line 125) | @ConfigurationProperties(CONFIGURATION_PROPERTY_PREFIX + ".thymele...
FILE: spring-boot-starter/mapper-spring-boot-autoconfigure/src/main/java/tk/mybatis/mapper/autoconfigure/MybatisProperties.java
class MybatisProperties (line 48) | @ConfigurationProperties(prefix = BaseProperties.MYBATIS_PREFIX)
method getConfigLocation (line 108) | public String getConfigLocation() {
method setConfigLocation (line 115) | public void setConfigLocation(String configLocation) {
method getMapperLocations (line 119) | public String[] getMapperLocations() {
method setMapperLocations (line 123) | public void setMapperLocations(String[] mapperLocations) {
method getTypeHandlersPackage (line 127) | public String getTypeHandlersPackage() {
method setTypeHandlersPackage (line 131) | public void setTypeHandlersPackage(String typeHandlersPackage) {
method getTypeAliasesPackage (line 135) | public String getTypeAliasesPackage() {
method setTypeAliasesPackage (line 139) | public void setTypeAliasesPackage(String typeAliasesPackage) {
method getTypeAliasesSuperType (line 146) | public Class<?> getType
Condensed preview — 502 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,761K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 749,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": ".github/workflows/release.yml",
"chars": 992,
"preview": "name: Publish package to the Maven Central Repository\non:\n push:\n tags: [ \"*\" ]\npermissions:\n contents: read\n\njobs:"
},
{
"path": ".github/workflows/test.yml",
"chars": 493,
"preview": "name: Maven test\non:\n pull_request:\n types: [ opened, reopened, edited ]\n push:\n branches: [ develop, master ]\np"
},
{
"path": ".gitignore",
"chars": 103,
"preview": "# Maven #\ntarget/\n.flattened-pom.xml\n\n# IDEA #\n.idea/\n*.iml\n\n# Eclipse #\n.settings/\n.classpath\n.project"
},
{
"path": ".gitmodules",
"chars": 82,
"preview": "[submodule \"wiki\"]\n\tpath = wiki\n\turl = https://github.com/abel533/Mapper.wiki.git\n"
},
{
"path": "LICENSE",
"chars": 1088,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2014-2017 abel533@gmail.com\n\nPermission is hereby granted, free of charge, to any p"
},
{
"path": "README.md",
"chars": 2958,
"preview": "# MyBatis 通用 Mapper6 来了🎉🎉🎉\n\n[\n ~\n ~ Copyright (c) 2018 abel533@gmail.com\n ~\n ~ Permission is hereby granted, free o"
},
{
"path": "all/mapper/README.md",
"chars": 459,
"preview": "# Mybatis 通用 Mapper Jar 集成\n\n[\n ~\n ~ Copyright (c) 2018 abel533@gmail.com\n ~\n ~ Permission is hereby granted, free o"
},
{
"path": "all/mapper/src/main/java/tk/mybatis/mapper/ApiInfo.java",
"chars": 109,
"preview": "package tk.mybatis.mapper;\n\n/**\n * Java Doc 内容请通过各个独立项目进行查看\n *\n * @author liuzh\n */\npublic class ApiInfo {\n}\n"
},
{
"path": "all/pom.xml",
"chars": 4456,
"preview": "<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2018 abel533@gmail.com\n ~\n ~ Permission is hereby granted, free o"
},
{
"path": "base/README.md",
"chars": 204,
"preview": "# Mybatis 通用 Mapper 基础方法实现\n\n[\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com\n ~\n ~ Permission is hereby granted, f"
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/BaseMapper.java",
"chars": 1846,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/ConditionMapper.java",
"chars": 1597,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/ExampleMapper.java",
"chars": 1617,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/IdsMapper.java",
"chars": 1502,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/Mapper.java",
"chars": 1621,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/Marker.java",
"chars": 1341,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/MySqlMapper.java",
"chars": 1552,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/RowBoundsMapper.java",
"chars": 1684,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/SaveMapper.java",
"chars": 554,
"preview": "package tk.mybatis.mapper.common;\n\nimport org.apache.ibatis.annotations.InsertProvider;\nimport tk.mybatis.mapper.provide"
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/SqlServerMapper.java",
"chars": 1549,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/BaseDeleteMapper.java",
"chars": 1569,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/BaseInsertMapper.java",
"chars": 1563,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/BaseSelectMapper.java",
"chars": 1613,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/BaseUpdateMapper.java",
"chars": 1611,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/delete/DeleteByPrimaryKeyMapper.java",
"chars": 1704,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/delete/DeleteMapper.java",
"chars": 1678,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/insert/InsertMapper.java",
"chars": 1684,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/insert/InsertSelectiveMapper.java",
"chars": 1701,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/select/ExistsWithPrimaryKeyMapper.java",
"chars": 1721,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/select/SelectAllMapper.java",
"chars": 1627,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/select/SelectByPrimaryKeyMapper.java",
"chars": 1949,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/select/SelectCountMapper.java",
"chars": 1686,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/select/SelectMapper.java",
"chars": 1705,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/select/SelectOneMapper.java",
"chars": 1700,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/update/UpdateByPrimaryKeyMapper.java",
"chars": 1701,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/base/update/UpdateByPrimaryKeySelectiveMapper.java",
"chars": 1713,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/condition/DeleteByConditionMapper.java",
"chars": 1705,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/condition/SelectByConditionMapper.java",
"chars": 1710,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/condition/SelectCountByConditionMapper.java",
"chars": 1694,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/condition/UpdateByConditionMapper.java",
"chars": 1817,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/condition/UpdateByConditionSelectiveMapper.java",
"chars": 1831,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/example/DeleteByExampleMapper.java",
"chars": 1664,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/example/SelectByExampleMapper.java",
"chars": 1692,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/example/SelectCountByExampleMapper.java",
"chars": 1676,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/example/SelectOneByExampleMapper.java",
"chars": 1668,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/example/UpdateByExampleMapper.java",
"chars": 1799,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/example/UpdateByExampleSelectiveMapper.java",
"chars": 1813,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/ids/DeleteByIdsMapper.java",
"chars": 1662,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/ids/SelectByIdsMapper.java",
"chars": 1690,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/progressive/ProgressiveMapper.java",
"chars": 5101,
"preview": "package tk.mybatis.mapper.common.progressive;\n\nimport org.apache.ibatis.session.RowBounds;\nimport tk.mybatis.mapper.anno"
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectByConditionRowBoundsMapper.java",
"chars": 1883,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectByExampleRowBoundsMapper.java",
"chars": 1809,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/rowbounds/SelectRowBoundsMapper.java",
"chars": 1789,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/special/InsertListMapper.java",
"chars": 1849,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/special/InsertUseGeneratedKeysMapper.java",
"chars": 1806,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/sqlserver/InsertMapper.java",
"chars": 1734,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/common/sqlserver/InsertSelectiveMapper.java",
"chars": 1658,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/ConditionProvider.java",
"chars": 2923,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/ExampleProvider.java",
"chars": 6297,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/IdsProvider.java",
"chars": 3568,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/SaveProvider.java",
"chars": 5272,
"preview": "package tk.mybatis.mapper.provider;\n\nimport org.apache.ibatis.mapping.MappedStatement;\nimport tk.mybatis.mapper.MapperEx"
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/SpecialProvider.java",
"chars": 3739,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/SqlServerProvider.java",
"chars": 2972,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/base/BaseDeleteProvider.java",
"chars": 3691,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/base/BaseInsertProvider.java",
"chars": 7574,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/base/BaseSelectProvider.java",
"chars": 5065,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/main/java/tk/mybatis/mapper/provider/base/BaseUpdateProvider.java",
"chars": 2651,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/BaseTest.java",
"chars": 4223,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/Country.java",
"chars": 1928,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/CountryMapper.java",
"chars": 134,
"preview": "package tk.mybatis.mapper.base;\n\nimport tk.mybatis.mapper.common.Mapper;\n\npublic interface CountryMapper extends Mapper<"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/CreateDB.sql",
"chars": 17543,
"preview": "drop table country if exists;\n\ncreate table country\n(\n id integer NOT NULL PRIMARY KEY,\n cou"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/delete/DeleteByPrimaryKeyMapperTest.java",
"chars": 1141,
"preview": "package tk.mybatis.mapper.base.delete;\n\nimport org.apache.ibatis.session.SqlSession;\nimport org.junit.Assert;\nimport org"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/delete/SafeDeleteByFieldTest.java",
"chars": 1970,
"preview": "package tk.mybatis.mapper.base.delete;\n\nimport org.apache.ibatis.exceptions.PersistenceException;\nimport org.apache.ibat"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/delete/SafeDeleteByMethodTest.java",
"chars": 2609,
"preview": "package tk.mybatis.mapper.base.delete;\n\nimport org.apache.ibatis.exceptions.PersistenceException;\nimport org.apache.ibat"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/Country.java",
"chars": 2196,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/CountryMapper.java",
"chars": 165,
"preview": "package tk.mybatis.mapper.base.genid;\n\nimport tk.mybatis.mapper.common.base.BaseInsertMapper;\n\npublic interface CountryM"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/CreateDB.sql",
"chars": 296,
"preview": "drop table country if exists;\ndrop table user if exists;\n\ncreate table country\n(\n id bigint NOT NULL PRIMARY"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/InsertGenIdTest.java",
"chars": 3660,
"preview": "package tk.mybatis.mapper.base.genid;\n\nimport org.apache.ibatis.session.SqlSession;\nimport org.junit.Assert;\nimport org."
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/SimpleGenId.java",
"chars": 572,
"preview": "package tk.mybatis.mapper.base.genid;\n\nimport tk.mybatis.mapper.genid.GenId;\n\n/**\n * 一个简单的实现,不考虑任何特殊情况,不要用于生产环境\n *\n * @a"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/UUIdGenId.java",
"chars": 299,
"preview": "package tk.mybatis.mapper.base.genid;\n\nimport tk.mybatis.mapper.genid.GenId;\n\nimport java.util.UUID;\n\n/**\n * @author liu"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/User.java",
"chars": 789,
"preview": "package tk.mybatis.mapper.base.genid;\n\nimport tk.mybatis.mapper.annotation.KeySql;\n\nimport jakarta.persistence.Id;\n\n/**\n"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/UserMapper.java",
"chars": 159,
"preview": "package tk.mybatis.mapper.base.genid;\n\nimport tk.mybatis.mapper.common.base.BaseInsertMapper;\n\npublic interface UserMapp"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/genid/mybatis-config.xml",
"chars": 2100,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/mybatis-config.xml",
"chars": 2028,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/update/SafeUpdateByFieldTest.java",
"chars": 2426,
"preview": "package tk.mybatis.mapper.base.update;\n\nimport org.apache.ibatis.exceptions.PersistenceException;\nimport org.apache.ibat"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/base/update/SafeUpdateByMethodTest.java",
"chars": 2566,
"preview": "package tk.mybatis.mapper.base.update;\n\nimport org.apache.ibatis.exceptions.PersistenceException;\nimport org.apache.ibat"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/cache/CacheTest.java",
"chars": 8728,
"preview": "package tk.mybatis.mapper.cache;\n\nimport org.apache.ibatis.session.SqlSession;\nimport org.junit.Assert;\nimport org.junit"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/cache/CountryCacheMapper.java",
"chars": 274,
"preview": "package tk.mybatis.mapper.cache;\n\nimport org.apache.ibatis.annotations.CacheNamespace;\nimport tk.mybatis.mapper.base.Cou"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/cache/CountryCacheRefMapper.java",
"chars": 560,
"preview": "package tk.mybatis.mapper.cache;\n\nimport org.apache.ibatis.annotations.CacheNamespaceRef;\nimport tk.mybatis.mapper.base."
},
{
"path": "base/src/test/java/tk/mybatis/mapper/cache/CountryCacheRefMapper.xml",
"chars": 1631,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com\n"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/cache/CountryCacheWithXmlMapper.java",
"chars": 447,
"preview": "package tk.mybatis.mapper.cache;\n\nimport org.apache.ibatis.annotations.CacheNamespace;\nimport tk.mybatis.mapper.base.Cou"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/cache/CountryCacheWithXmlMapper.xml",
"chars": 1699,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com\n"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/cache/mybatis-config-cache.xml",
"chars": 2545,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/CreateDB.sql",
"chars": 291,
"preview": "drop table user if exists;\n\ncreate table user\n(\n id integer NOT NULL PRIMARY KEY,\n name varchar(32),\n lock "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/DefaultEnumTypeHandlerTest.java",
"chars": 4559,
"preview": "package tk.mybatis.mapper.defaultenumtypehandler;\n\nimport org.apache.ibatis.session.SqlSession;\nimport org.junit.Assert;"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/Dict.java",
"chars": 147,
"preview": "package tk.mybatis.mapper.defaultenumtypehandler;\n\n/**\n * @author liuzh\n */\npublic interface Dict {\n\n int getValue();"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/DictTypeHandler.java",
"chars": 2073,
"preview": "package tk.mybatis.mapper.defaultenumtypehandler;\n\nimport org.apache.ibatis.type.BaseTypeHandler;\nimport org.apache.ibat"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/LockDictEnum.java",
"chars": 396,
"preview": "package tk.mybatis.mapper.defaultenumtypehandler;\n\n/**\n * @author liuzh\n */\npublic enum LockDictEnum implements Dict {\n "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/StateDictEnum.java",
"chars": 399,
"preview": "package tk.mybatis.mapper.defaultenumtypehandler;\n\n/**\n * @author liuzh\n */\npublic enum StateDictEnum implements Dict {\n"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/User.java",
"chars": 899,
"preview": "package tk.mybatis.mapper.defaultenumtypehandler;\n\nimport jakarta.persistence.Id;\nimport java.io.Serializable;\n\n/**\n * @"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/UserMapper.java",
"chars": 171,
"preview": "package tk.mybatis.mapper.defaultenumtypehandler;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npub"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/defaultenumtypehandler/mybatis-config-defaultenumtypehandler.xml",
"chars": 2171,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/entity/model/CountryExample.java",
"chars": 13138,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/CreateDB.sql",
"chars": 663,
"preview": "SET FOREIGN_KEY_CHECKS = 0;\n\n-- ----------------------------\n-- Table structure for user\n-- ----------------------------"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/GeneratedValueTest.java",
"chars": 2713,
"preview": "package tk.mybatis.mapper.generatedvalue;\n\nimport org.apache.ibatis.session.SqlSession;\nimport org.junit.Assert;\nimport "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/UserAutoIncrement.java",
"chars": 663,
"preview": "package tk.mybatis.mapper.generatedvalue;\n\nimport jakarta.persistence.Column;\nimport jakarta.persistence.GeneratedValue;"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/UserAutoIncrementIdentity.java",
"chars": 574,
"preview": "package tk.mybatis.mapper.generatedvalue;\n\nimport jakarta.persistence.*;\n\n/**\n * @author liuzh\n */\n@Table(name = \"user_a"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/UserAutoIncrementIdentityMapper.java",
"chars": 205,
"preview": "package tk.mybatis.mapper.generatedvalue;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npublic inte"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/UserAutoIncrementMapper.java",
"chars": 189,
"preview": "package tk.mybatis.mapper.generatedvalue;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npublic inte"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/UserSqlAfter.java",
"chars": 625,
"preview": "package tk.mybatis.mapper.generatedvalue;\n\nimport jakarta.persistence.*;\n\n/**\n * @author liuzh\n */\n@Table(name = \"user_a"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/UserSqlAfterMapper.java",
"chars": 179,
"preview": "package tk.mybatis.mapper.generatedvalue;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npublic inte"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/generatedvalue/mybatis-config-keysql-mysql.xml",
"chars": 2278,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/helper/CamelCaseTest.java",
"chars": 1786,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/helper/FieldHelperTest.java",
"chars": 3151,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/helper/FieldTest.java",
"chars": 7941,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/helper/MultipleMapperProviderTest.java",
"chars": 1211,
"preview": "package tk.mybatis.mapper.helper;\n\nimport org.apache.ibatis.annotations.InsertProvider;\nimport org.apache.ibatis.annotat"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/hsqldb/HsqldbMapper.java",
"chars": 1747,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/hsqldb/HsqldbProvider.java",
"chars": 3647,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/CreateDB.sql",
"chars": 512,
"preview": "drop table test_timestamp if exists;\n\ncreate table test_timestamp\n(\n id integer NOT NULL PRIMARY KEY,\n "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/DateTimeTest.java",
"chars": 7603,
"preview": "package tk.mybatis.mapper.issues._216_datetime;\n\nimport org.apache.ibatis.session.SqlSession;\nimport org.junit.Assert;\ni"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel.java",
"chars": 1039,
"preview": "package tk.mybatis.mapper.issues._216_datetime;\n\nimport jakarta.persistence.Id;\nimport jakarta.persistence.Table;\nimport"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel2.java",
"chars": 1082,
"preview": "package tk.mybatis.mapper.issues._216_datetime;\n\nimport jakarta.persistence.Id;\nimport jakarta.persistence.Table;\nimport"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel2Mapper.java",
"chars": 181,
"preview": "package tk.mybatis.mapper.issues._216_datetime;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npubli"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel3.java",
"chars": 1260,
"preview": "package tk.mybatis.mapper.issues._216_datetime;\n\nimport org.apache.ibatis.type.JdbcType;\nimport tk.mybatis.mapper.annota"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModel3Mapper.java",
"chars": 181,
"preview": "package tk.mybatis.mapper.issues._216_datetime;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npubli"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/TimeModelMapper.java",
"chars": 179,
"preview": "package tk.mybatis.mapper.issues._216_datetime;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npubli"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/_216_datetime/mybatis-config-timestamp.xml",
"chars": 2263,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/issues/package-info.java",
"chars": 60,
"preview": "/**\n * 通过 issues 提交的问题\n */\npackage tk.mybatis.mapper.issues;"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/CreateDB.sql",
"chars": 663,
"preview": "SET FOREIGN_KEY_CHECKS = 0;\n\n-- ----------------------------\n-- Table structure for user\n-- ----------------------------"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/KeySqlTest.java",
"chars": 3052,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport org.apache.ibatis.session.SqlSession;\nimport org.junit.Assert;\nimport org.juni"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/UserAutoIncrement.java",
"chars": 654,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport tk.mybatis.mapper.annotation.KeySql;\n\nimport jakarta.persistence.Column;\nimpor"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/UserAutoIncrementIdentity.java",
"chars": 717,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport tk.mybatis.mapper.annotation.KeySql;\nimport tk.mybatis.mapper.code.IdentityDia"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/UserAutoIncrementIdentityMapper.java",
"chars": 197,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npublic interface Us"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/UserAutoIncrementMapper.java",
"chars": 181,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npublic interface Us"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/UserSqlAfter.java",
"chars": 715,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport tk.mybatis.mapper.annotation.KeySql;\nimport tk.mybatis.mapper.code.ORDER;\n\nimp"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/UserSqlAfterMapper.java",
"chars": 171,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npublic interface Us"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/UserSqlBefore.java",
"chars": 624,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport tk.mybatis.mapper.annotation.KeySql;\nimport tk.mybatis.mapper.code.ORDER;\n\nimp"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/UserSqlBeforeMapper.java",
"chars": 173,
"preview": "package tk.mybatis.mapper.keysql;\n\nimport tk.mybatis.mapper.common.Mapper;\n\n/**\n * @author liuzh\n */\npublic interface Us"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/keysql/mybatis-config-keysql-mysql.xml",
"chars": 2270,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!--\n ~ The MIT License (MIT)\n ~\n ~ Copyright (c) 2014-2017 abel533@gmail.com"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/CachedCountryMapper.java",
"chars": 1496,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/Country2Mapper.java",
"chars": 1377,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/CountryIMapper.java",
"chars": 1377,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/CountryJDBCMapper.java",
"chars": 1446,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/CountryMapper.java",
"chars": 1573,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/CountryMultipleMapper.java",
"chars": 321,
"preview": "package tk.mybatis.mapper.mapper;\n\nimport tk.mybatis.mapper.common.Mapper;\nimport tk.mybatis.mapper.common.base.insert.I"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/CountryTMapper.java",
"chars": 1377,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/CountryVersionMapper.java",
"chars": 1395,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/JDBCMapper.java",
"chars": 1388,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/MultipleCommonMapper.java",
"chars": 605,
"preview": "package tk.mybatis.mapper.mapper;\n\nimport org.apache.ibatis.annotations.InsertProvider;\nimport org.apache.ibatis.annotat"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/MybatisHelper.java",
"chars": 4449,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/TbUserLogicDeleteMapper.java",
"chars": 206,
"preview": "package tk.mybatis.mapper.mapper;\n\nimport tk.mybatis.mapper.common.Mapper;\nimport tk.mybatis.mapper.model.TbUserLogicDel"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/TbUserMapper.java",
"chars": 173,
"preview": "package tk.mybatis.mapper.mapper;\n\nimport tk.mybatis.mapper.common.Mapper;\nimport tk.mybatis.mapper.model.TbUser;\n\npubli"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/UserInfoAbleMapper.java",
"chars": 1389,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/UserInfoMapMapper.java",
"chars": 1386,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/UserInfoMapper.java",
"chars": 1377,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/UserLogin2Mapper.java",
"chars": 1383,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/mapper/UserLoginMapper.java",
"chars": 1380,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/BaseLogicDelete.java",
"chars": 752,
"preview": "package tk.mybatis.mapper.model;\n\nimport tk.mybatis.mapper.annotation.LogicDelete;\n\nimport jakarta.persistence.Column;\ni"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/Country.java",
"chars": 2591,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/Country2.java",
"chars": 2278,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/CountryExample.java",
"chars": 16359,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/CountryI.java",
"chars": 2391,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/CountryJDBC.java",
"chars": 2283,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/CountryT.java",
"chars": 2191,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/CountryVersion.java",
"chars": 1621,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/Entity.java",
"chars": 1890,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/TbUser.java",
"chars": 1236,
"preview": "package tk.mybatis.mapper.model;\n\nimport jakarta.persistence.*;\n\n@Table(name = \"tb_user\")\npublic class TbUser {\n\n @Id"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/TbUserLogicDelete.java",
"chars": 891,
"preview": "package tk.mybatis.mapper.model;\n\nimport jakarta.persistence.Column;\nimport jakarta.persistence.Table;\n\n@Table(name = \"t"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/UserInfo.java",
"chars": 3579,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/UserInfoAble.java",
"chars": 3349,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/UserInfoMap.java",
"chars": 3211,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/UserLogin.java",
"chars": 2465,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/UserLogin2.java",
"chars": 1729,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/UserLogin2Key.java",
"chars": 1996,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/model/UserParent.java",
"chars": 1522,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/rawresultmap/CreateDB.sql",
"chars": 475,
"preview": "drop table user if exists;\n\ncreate table user\n(\n id integer NOT NULL PRIMARY KEY,\n name varchar(32),\n user_n"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/rawresultmap/RawResultMapTest.java",
"chars": 3421,
"preview": "package tk.mybatis.mapper.rawresultmap;\n\nimport org.apache.ibatis.session.SqlSession;\nimport org.junit.Assert;\nimport or"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/rawresultmap/User.java",
"chars": 1786,
"preview": "package tk.mybatis.mapper.rawresultmap;\n\nimport tk.mybatis.mapper.annotation.NameStyle;\nimport tk.mybatis.mapper.code.St"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/rawresultmap/UserMapper.java",
"chars": 476,
"preview": "package tk.mybatis.mapper.rawresultmap;\n\nimport org.apache.ibatis.annotations.Select;\nimport tk.mybatis.mapper.common.Ba"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/rawresultmap/UserMapper.xml",
"chars": 1205,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper\n PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\"\n \"htt"
},
{
"path": "base/src/test/java/tk/mybatis/mapper/rawresultmap/mybatis-config-rawresultmap.xml",
"chars": 931,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE configuration\n PUBLIC \"-//mybatis.org//DTD Config 3.0//EN\"\n "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/able/TestBasicAble.java",
"chars": 4299,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestCache.java",
"chars": 2982,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestDeleteByPrimaryKey.java",
"chars": 5548,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestExistsWithPrimaryKey.java",
"chars": 2085,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestInsert.java",
"chars": 4074,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestInsertSelective.java",
"chars": 4237,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestSelect.java",
"chars": 6013,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestSelectAll.java",
"chars": 2507,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestSelectByPrimaryKey.java",
"chars": 5197,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestSelectCount.java",
"chars": 3271,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestSelectOne.java",
"chars": 3487,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestUpdateByPrimaryKey.java",
"chars": 5473,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
},
{
"path": "base/src/test/java/tk/mybatis/mapper/test/country/TestUpdateByPrimaryKeySelective.java",
"chars": 4131,
"preview": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2017 abel533@gmail.com\n *\n * Permission is hereby granted, free of "
}
]
// ... and 302 more files (download for full content)
About this extraction
This page contains the full source code of the abel533/Mapper GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 502 files (1.6 MB), approximately 400.3k tokens, and a symbol index with 2745 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.