2012-11-27

Instructions for migration to Ujorm 1.30

If you are considering migrating to Ujorm 1.30, I recommend to use three simple steps:
  1. upgrade Maven dependendecies to: groupId=org.ujorm + version=1.30
  2. replace all texts "UjoProperty" for the targets "Key" in your project and
  3. fix deprecated methods

Optionally, you can use the KeyFactory class to create new keys instead of original static factory methods.

2012-11-04

Module Ujo-Wicket dependency

In the last release 1.30 I have found a small bug in dependency on the artifact ujo-wicket. Fortunately there is a simple solution using a small hack. See the next dependecies solution to fix it:
<dependency>
    <groupId>org.ujorm</groupId>
    <artifactId>ujo-wicket</artifactId>
    <version>1.30</version>
    <exclusions>
        <exclusion>
            <groupId>org.ujorm</groupId>
            <artifactId>ujo-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.ujorm</groupId>
    <artifactId>ujo-core</artifactId>
    <version>1.30</version>
</dependency>

2012-10-27

Ujorm 1.30 released

After a long pause I would like to introduce a new version, Ujorm 1.30, with several important changes in the API - in the first place I should mention that the original interface called UjoProperty was renamed to Key. The original interface is kept as @Deprecated now, however, its implementation classes remain. The reasons for the change are the following:
  • the original interface name UjoProperty was a little confusing due his immutable features and it was sometimes difficult to explain its meaning. The new name reflects the parameter names of the common interface java.util.Map.
  • the original name was too long and therefore the source code was difficult to read
  • several new classes have been created recently and it was useful to make the decision quickly. Particularly there are two new classes, KeyRing and KeyFactory.

The new KeyRing object is a serializable collection of Keys. Know that any instance of the Key is not serializable directly because it must have a unique instance in the class-loader. Yet sometimes we need to serialize some Keys, and the KeyRing can be the right solution. An example of this real use can be a use with the Wicket framework.

The second class is called KeyFactory and is used to create new instances Keys. An advantage of the factory is that it can also be used to create static Keys in an interface. The factory can create the Key name according to its field name, optionally the name can be converted to camel-case. Now there is no need to send the key’s data type as a parameter when creating it because this framework can obtain the value from the meta-model of the field when the factory is locked (or when the getKeys() method is called for the first time). Each Key contains a new attribute with its domain class now. An example of the use:

public class Person extends AbstractUjo {
private static final KeyFactory f = newFactory(Person.class);
   
public static final Key<Person,String > NAME = f.newKey();
public static final Key<Person,Boolean> MALE = f.newKey();
public static final Key<Person,Double > CASH = f.newKey();
   
@Override public KeyList<?> readKeys() {
    return f.getKeys();
}
}

The Ujorm framework offers a new, simplified key called WeakKey, which does not have a generic domain parameter. It can be used instead of constants for working with Map, List objects, or for reading parameters from the HttpRequest object, where it converts to the desired data type. The instance is created using the WeakKeyFactory class.

Ujorm can be connected with a Maven project using:

<dependency>
    <groupId>org.ujorm</groupId>
    <artifactId>ujo-core</artifactId>
    <version>1.30</version>
</dependency>


in case of use of the ORM module use:

<dependency>
    <groupId>org.ujorm</groupId>
    <artifactId>ujo-orm</artifactId>
    <version>1.30</version>
</dependency>


To use UJO objects in Wicket framework, an implementation of the KeyModel class is necessary. The KeyModel class is similar to the standard implementation of a Wicket class called PropertyModel. The class can be joined using the following depenency:

<dependency>
    <groupId>org.ujorm</groupId>
    <artifactId>ujo-wicket/artifactId>
    <version>1.30</version>
</dependency>

The Wicket-support module does not contain a wide range of services, yet I am enclosing a simple example of creating a simple table for inspiration:

List<ICellPopulator> columns = KeyPopulator.list
    ( Employee.ID
    , Employee.FIRSTNAME
    , Employee.LASTNAME
    , Employee.ADDRESS.add(Address.CITY)
    );

final WebMarkupContainer table = new WebMarkupContainer("table");
final DataGridView grid = new DataGridView("gridPanel", columns,
     new  InnerPeopleProvicer());
table.setOutputMarkupId(true);
grid.setItemsPerPage(20);
add(table);
table.add(grid);
add(new AjaxPagingNavigator("tableNavigator", grid));


I apologize for significant API changes to all users of the Ujorm framework, however, all the chages are necessary for further development of this library.

Further information can be found in:

2011-11-06

Ujorm 1.21 released

The release notes:
  • Java 7.0 is supported now
  • native SQL query can be used in the run-time on demanding requirements
  • direct support for the Slf4J Logger framework
  • slightly extended API for an easier use
  • new special interface to store binary content to a BLOB
  • new abstract class (OrmTableSynchronized) is available for the safe use in a multi-thread environment
  • many other extensions is implemented and
  • small bug fixing for some dialects and some minor other bugs are fixed

More information can be found on the Release notes.

2011-06-14

Ujorm 1.20 released

The release notes:
  • the project have changed a domain to the new: http://ujorm.org/
  • batch features are implemented for the SQL statements INSERT and UPDATE
  • there is possible to require only selected columns on the SELECT statement for better performance
  • the SELECT statement supports the key word: DISTINCT
  • each table can be marked to a READ-ONLY by a new parameter in the annotation @Table
  • the documentation Ujorm User Guide is extended and new samples are done
  • new reverential projects are published on the home page
More information can be found on the Release notes.

2011-02-06

Ujorm 1.10 released

The release notes:
  • dialect for the database MS-SQL is implemented thanks to Tomas Hampl from company Effectiva
  • new Native Criterion is implemented with an SQL expression to use on Ujorm query
  • new annotation @Comment can be used to describe database tables or columns
  • documentation Ujorm User Guide is extended
  • new performance test with the database H2 is published
  • no major bug was discovered
More information can be found on the Release notes.

2010-10-20

Ujorm 1.00 released

I would like to announce that the ORM framework Ujorm 1.00 has been released. The open-source framework was designed for the rapid Java development based on a relation database and the framework provides a type-safe API for database queries so the most of typing errors are detected before running the application. Developer can take an advantage of a code-completion in their favorite IDE at coding time.

The Ujorm has implemented a lot of changes that have been designed on the desire of developers of real applications in the last year. Important features include:
  • session and transaction management by the Spring framework
  • optimized performance and extended API
  • new documentation
  • positive feedback from the production deployment

A development of several new projects based on Ujorm is on the way. The message from the developers added: "We have gained a good experience with the Ujorm and we plan other projects with it!"

Related links: