首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 轻量级框架的产生和处理基于元数据的类型安全的JPA标准

轻量级框架的产生和处理基于元数据的类型安全的JPA标准

  • 资源大小:3.58 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: java framework dao jpa easyjpa

资 源 简 介

Tired of writing SQL in Java? Afraid with fragility of named queries? Want to write metadata based type-safe queries, but lost in verbose JPA api? Then this is the framework for you. Now you can write metadata based, type-safe, debugable, readable, and maintainable queries in Object Oriented way. No prior knowledge of SQL or JPA required. Example 1: For SQL : select person.name, sum(course.unit) from person inner join course_session inner join course group by person.name You need to do this using this framework: CriteriaComposer forStudentUnitCount = CriteriaComposer.createComposer(Person.class).select(Person_.name).groupBy(Person_.name); forStudentUnitCount.join(Person_.courseSessions).join(CourseSession_.course).select(AggregateFunction.SUM, Course_.unit); List result = criteriaProcessor.findAllTuple(forStudentUnitCount); --- Example 2: FOR SQL: select * from course where course.last_upda

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP