Skip to content

Spring-JDBC-ROMA 2.0 - Byte Code Generation Based ORM Like Row Mapper Framework [DATAJDBC-58] #310

Closed
@spring-projects-issues

Description

@spring-projects-issues

Serkan ÖZAL opened DATAJDBC-58 and commented

Hi all,

I share my open-source project on Spring JDBC RowMapper. Maybe it can be published under Spring-Data-JDBC distribution. It's URL is https://github.com/serkan-ozal/spring-jdbc-roma-impl.

There are other lots of interesting features and these features can be customized with developer's extended classes. It has some new and unique features like conditional lazy, conditional lazy object loading and conditional field ignoring. In addition, it has custom expression language named RXEL (ROMA Expression Language).
Spring-JDBC-ROMA is a rowmapper extension for Spring-JDBC module. There is already a rowmapper named org.springframework.jdbc.core.BeanPropertyRowMappe r for binding resultset attributes to object. But it is reflection based and can cause performance problems as Spring developers said. However Spring-JDBC-ROMA is not reflection based and it is byte code generation (with CGLib and Javassist) based rowmapper. It generates rowmapper on the fly like implementing as manual so it has no performance overhead. It also supports object relations as lazy and eager. There are other lots of interesting features and these features can be customized with developer's extended classes.

Features:

  • All primitive types, strings, enums, dates, clob, blob, collections and complex objects are supported.

  • Writing your custom class (or type) based field generator factory, object creater, object processor, table name resolver, column name resolver implementations and customizable data source, schema, table names are supported.

  • Writing your custom field based mapper, SQL based binder, expression language based binder and custom binder implementations are supported.
    Lazy or eager field accessing is supported. Lazy support can be configured as conditional and conditions can be provided as expression language or as custom lazy condition provider implementations. If lazy condition is not enable, specified field is not handled as lazy and set as eager while creating root entity.

  • Loading lazy fields can be enable or disable at runtime dynamically by using key based, expression based and custom implementation based approaches. If lazy-load condition is not enable, specified lazy field is not loaded no matter field is configured as lazy.

  • Ignoring fields can be enable or disable at runtime dynamically by using key based, expression based and custom implementation based approaches. This feature is very useful in some use-cases. For example, this feature can be used to ignore some fields while serializing to JSON at your specified controller and this behaviour doesn't effect other controllers.
    Writing field access definitions as REXL (ROMA Expression Language) or as compilable Java code in annotation. XML and properties file configuration support will be added soon


Reference URL: https://github.com/serkan-ozal/spring-jdbc-roma-impl

Metadata

Metadata

Assignees

Labels

in: repositoryRepositories abstractionstatus: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions