Search in sources :

Example 1 with CountAllBuilder

use of com.mendmix.mybatis.crud.builder.CountAllBuilder in project jeesuite-libs by vakinge.

the class GeneralSqlGenerator method generate.

public void generate() {
    if (languageDriver == null)
        languageDriver = configuration.getDefaultScriptingLanguageInstance();
    List<MapperMetadata> mappers = MybatisMapperParser.getMapperMetadatas(group);
    for (MapperMetadata entity : mappers) {
        entity.setGroup(group);
        new InsertBuilder().build(configuration, languageDriver, entity);
        new InsertListBuilder().build(configuration, languageDriver, entity);
        new DeleteByPrimaryKeyBuilder().build(configuration, languageDriver, entity);
        new UpdateBuilder().build(configuration, languageDriver, entity);
        new SelectAllBuilder().build(configuration, languageDriver, entity);
        new SelectByPrimaryKeyBuilder().build(configuration, languageDriver, entity);
        new SelectByPrimaryKeysBuilder().build(configuration, languageDriver, entity);
        new CountAllBuilder().build(configuration, languageDriver, entity);
        log.info(" >> generate autoCrud for:[{}] finish", entity.getEntityClass().getName());
    }
}
Also used : InsertBuilder(com.mendmix.mybatis.crud.builder.InsertBuilder) SelectAllBuilder(com.mendmix.mybatis.crud.builder.SelectAllBuilder) DeleteByPrimaryKeyBuilder(com.mendmix.mybatis.crud.builder.DeleteByPrimaryKeyBuilder) CountAllBuilder(com.mendmix.mybatis.crud.builder.CountAllBuilder) InsertListBuilder(com.mendmix.mybatis.crud.builder.InsertListBuilder) SelectByPrimaryKeyBuilder(com.mendmix.mybatis.crud.builder.SelectByPrimaryKeyBuilder) SelectByPrimaryKeysBuilder(com.mendmix.mybatis.crud.builder.SelectByPrimaryKeysBuilder) UpdateBuilder(com.mendmix.mybatis.crud.builder.UpdateBuilder) MapperMetadata(com.mendmix.mybatis.metadata.MapperMetadata)

Aggregations

CountAllBuilder (com.mendmix.mybatis.crud.builder.CountAllBuilder)1 DeleteByPrimaryKeyBuilder (com.mendmix.mybatis.crud.builder.DeleteByPrimaryKeyBuilder)1 InsertBuilder (com.mendmix.mybatis.crud.builder.InsertBuilder)1 InsertListBuilder (com.mendmix.mybatis.crud.builder.InsertListBuilder)1 SelectAllBuilder (com.mendmix.mybatis.crud.builder.SelectAllBuilder)1 SelectByPrimaryKeyBuilder (com.mendmix.mybatis.crud.builder.SelectByPrimaryKeyBuilder)1 SelectByPrimaryKeysBuilder (com.mendmix.mybatis.crud.builder.SelectByPrimaryKeysBuilder)1 UpdateBuilder (com.mendmix.mybatis.crud.builder.UpdateBuilder)1 MapperMetadata (com.mendmix.mybatis.metadata.MapperMetadata)1