没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > dreamsource-orm |
dreamsource-orm
|
0 | 0 | 0 |
贡献者 | 讨论 | 代码提交 |
Eclipse plugin - Dreamsource ORM code generator. See a manual from www.leeonsoft.com. Dreamsource ORM
It abstracts a database table metadata into a com.leeonsoft.jdbc.crud.Table so it can programatically and concisely be used to construct a dynamic query SQL as indicated by the following code:
Compared to JPA 2.0, there are some following advantages: No annotations about column mapping in entity. No Metamodel classes are generated by means of an annotation processor or the application developer. com.leeonsoft.jdbc.crud.Table defines column mappings, table relationships and their join conditions. No lazy loading. Eager loading is implemented so n + 1 queries are prevented. Queries can be defined through Select or Query with support of built-in Converters: Select can be constructed based on objects Table, Column, And. Column can be obtained from Table and it has a lot of methods such as greaterThan(), betweenAnd(), which can be used to define predicates. Select supports pagination control. Query can be constructed from a string SQL statement. It supports parameter binding. Dreamsource ORM has a built-in com.leeonsoft.orm.converter.Converter type of converter that can be used by com.leeonsoft.jdbc.EntityManager or application to convert a Java Object into a frontend String or a frontend String into a backend Java Object. The converter prevents data conversion from scattering different pages and layers.
Dreamsource ORM has a built-in com.leeonsoft.orm.validation.Validatable type of validation that can be used by com.leeonsoft.jdbc.EntityManager or application to validate an input POJO object before it is saved or updated. The validation prevents invalid data from being persisted.
Each database table needs the following objects:
an entity object which extends POJO. a primary key object which extends TablePK if there is a composite primary key. a table object which extends Table. a converter which extends Converter (optional). a validator which extends Validatable (optional). The above code can be generated using Dreamsource ORM Code Generator which is an Eclipse plugin. Dreamsource ORM depends on ASM and AspectJ. You can find more documentation from Leeonsoft web site. Integration of Dreamsource ORM with Spring and examples can also be found in Leeonsoft web site
The following databases are supported:
Oracle DB2 SQL Server MySQL HSQLDB Usage for GWT: Download the dreamsource2_0_1_04202009_GWT_src file from the downloads linked on the right of this page and add it to your project's classpath. Add the following inherits to your .gwt.xml: Use any classes under com.leeonsoft.jdbc.orm and com.leeonsoft.jdbc.exception as well as your domain objects that extend com.leeonsoft.jdbc.orm.POJO as you normally would.