Hi, Java Friends

I'm a software engineer from China(I apologize for my ugly English), I used my spare time to develop an open source framework since 2008, after 7 years, it's has been finished and the first version is pulibshed on github. Its name is "BabyFish"

Please view


to know more(The framework is also uploaded to the Maven Central Repository, but demo projects and document can only be accessed from github).


This framework is an Object Association Management framework(Let's call it OAM), it can be split to 2 parts

(1) Java Part
(a) Event combiner: support .NET style event notification mechanism.
(b) Typed-18N: support strong type "18N" which can report the I18N errors at compilation time.
(c) X-Collection-Framework: Enhance the Java Collection Framework. The most important functionality is "Unstable Collection Elements", element/key can be modified after it has been added into set(map) because the corresponding sets/maps will be adjusted automatically when it's changed.
(d) MA-Collection-Framework: Enhance the X-Collection-Framework to let collections support modification notification like the trigger of database. The most important functionality is "Bubbled Event", If the modification event has been triggered by iterator of view(eg: List.subList, SortedMap.subMap), it will bubbled to its parent view, util the original root collection triggered the event.
(e) ObjectModel4Java: ObjectModel(Both ObjectModel4Java and ObjectModel4JPA) is the most important functionality of this framework, a powerful API to create
Java model classes, it supports the smart bidirectional association between objects. When one side bidirectional association is changed, the other side will be
notified and adjusted automatically. User only need to declare some annotations and all the functionalities will be implemented by the byte-code generated dynamically in runtime.

(2) JPA/Hibernate Part
(a) ObjectMode4JPA: Enhance ObjectModel4Java. let ObjectModel support JPA entity classes.
(i) Replace the lazy proxy and lazy collection of Hibernate to support ObjectModel with laziness management.
(ii) Support Maven plugin to change the byte-code of entity class at compilation time, programmer only need to write the simple JPA entity classes, and complex code for the ObjectMode4JPA can be injected into entity classes automatically during compilation.
(b) BabyFish-JPA-Criteria: A smarter implementation of JPA Criteria, it supports more functionalities, and it can optimize the generated JPQL.
(c) QueryPath: A functionality learned from "ADO.NET Entity Framework", for dynamic fetch and sort, query path can be used to to fetch the lazy properties with unlimited depath and breadth, sort query result and sort object collection associations. It can be decided by UI Layer dynamically, then dispatched to Business Logic Layer, and finally dispatched to the Data Access Layer.
(d) DistinctLimiQuery: Enhance the Oracle Dialect of Hibernate to resolve a problem of Hibernate, In hibernate, when paging query(with firstResult/maxResults) contains collection fetches, hibernate has to query all the data and do the paging filter in memory. This functionality can resolve this problem when database is oracle.