The Ujorm (original name was UJO Framework) is an open source Java small library which provides non-traditional objects based on the key‑value architecture to open up new exciting opportunities for writing efficient code.
The Ujorm have got special ORM module designed for rapid Java development with great performance and a small footprint. The key features are type safe queries, relation mapping by Java code, no entity states, and a memory overloading protection cache.
I would like to introduce a guide to the key-value architecture of domain objects where their attributes are provided using objects called Keys only. The Key-value approach simplifies and accelerates the development of
applications. Practical use is demonstrated in the Demo-Hotels project linked at the end of the original article. The chapter list follows:
there is available a new version Ujorm in Maven repositories with a long-awaited support for creating hierarchical queries for a database relations to itself. Previously it was necessary to use a native SQL commands, however it can be modeled using Ujorm key type by an extended alias name for relation now. The next example shows a query for all Customers with a surename "Brown" and grandparent called "Smith":
The java library Ujorm was introduced in 2008 under the old name UJO Framework. Since then, five years have passed
and the source code has been modified many times but the basic idea - accessing
to the properties by constants called keys - remains.
I would like to present a small web project for hotel booking to show an interesting features of the Ujorm library. Graphical interface is
rendered by the Apache Wicket framework.
See the next screenshot of the form dialog including a source code:
The new release of Ujorm framework is released with two major features:
the new validators are available for checking a consistency of the input values.
The Ujorm validators have got a similar meaning for Ujo object how the
Bean Validation (JSR 303) implementation for the JavaBeans. For more information see the the documentation or a jUnit tests.
the ORM supports reading a related database tables by the one SQL
request using an extended implementation of the Query object. More
information are described in ORM user guide.