Minidao_1.6.2 released, ultra-lightweight Java persistence framework

Minidao_1.6.2 version released, ultra-lightweight Java persistence framework

Introduction to MiniDao

   MiniDao is a super lightweight JAVA persistence layer framework with the same logical tags and SQL flexibility as Mybatis. The biggest advantage: It can seamlessly integrate Hibernate projects, support unified transaction management, effectively solve the problem of Hibernate projects, and support flexible SQL separation.

 

Features of MiniDao

  • 1. O/R mapping does not need to set xml, zero configuration is easy to maintain
  • 2. No knowledge of JDBC is required
  • 3. Separation of SQL statement and java code
  • 4. SQL supports scripting language
  • 5. Support automatic transaction processing and manual transaction processing
  • 6. Supports lightweight and seamless integration with hibernate
  • 7. Only interface definition is required, no interface implementation is required
 

upgrade log

  • 1. Expand new tag @param 
  • 2. Support interceptor Interceptor
  • 3. Improve paging efficiency and deal with SqlServer compatibility issues
  • 4, upgrade spring4

Source code download

       

Source code interpretation

  Interface definition:
  
  1. @MiniDao  
  2. public interface EmployeeDao {  
  3.   
  4.  public List<Map> getAllEmployees(@Param("employee") Employee employee);  
  5.   
  6.  Employee getEmployee(@Param("empno") String empno);  
  7.   
  8.  Map getMap(@Param("empno")String empno,@Param("name")String name);  
  9.   
  10.  @Sql("SELECT count(*) FROM employee")  
  11.  Integer getCount();  
  12.   
  13.  int update(@Param("employee") Employee employee);  
  14.   
  15.  void insert(@Param("employee") Employee employee);  
  16. }  
SQL定义:
  1. SELECT * FROM employee where 1=1   
  2. <#if employee.age ?exists>  
  3. and age = :employee.age  
  4. </#if>  
  5. <#if employee.name ?exists>  
  6. and name = :employee.name  
  7. </#if>  
  8. <#if employee.empno ?exists>  
  9. and empno = :employee.empno  
  10. </#if>  
 

Minidao_1.6.2版本发布,超轻量Java持久化框架

MiniDao 简介

   MiniDao 是一款超级轻量的JAVA持久层框架,具备Mybatis一样的逻辑标签和SQL灵活性。最大优点:可无缝集成Hibernate项目,支持事务统一管理,有效解决Hibernate项目,支持灵活的SQL分离的问题。

 

MiniDao 功能特性

  • 1. O/R mapping不用设置xml,零配置便于维护
  • 2. 不需要了解JDBC的知识
  • 3. SQL语句和java代码的分离
  • 4. SQL支持脚本语言
  • 5. 支持自动事务处理和手动事务处理
  • 6. 支持与hibernate轻量级无缝集成
  • 7. 只需接口定义,无需接口实现
 

升级日志

  • 1,扩展新标签@param 
  • 2,支持拦截器 Interceptor
  • 3,提高分页效率,SqlServer兼容问题处理
  • 4,升级spring4

源码下载

       

源码解读

  接口定义:
  
  1. @MiniDao  
  2. public interface EmployeeDao {  
  3.   
  4.  public List<Map> getAllEmployees(@Param("employee") Employee employee);  
  5.   
  6.  Employee getEmployee(@Param("empno") String empno);  
  7.   
  8.  Map getMap(@Param("empno")String empno,@Param("name")String name);  
  9.   
  10.  @Sql("SELECT count(*) FROM employee")  
  11.  Integer getCount();  
  12.   
  13.  int update(@Param("employee") Employee employee);  
  14.   
  15.  void insert(@Param("employee") Employee employee);  
  16. }  
SQL定义:
  1. SELECT * FROM employee where 1=1   
  2. <#if employee.age ?exists>  
  3. and age = :employee.age  
  4. </#if>  
  5. <#if employee.name ?exists>  
  6. and name = :employee.name  
  7. </#if>  
  8. <#if employee.empno ?exists>  
  9. and empno = :employee.empno  
  10. </#if>  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326224544&siteId=291194637