jeudi 25 novembre 2010

Upgrading from GraniteDS 2.1 to GraniteDS 2.2

GraniteDS 2.2 GA has just been released. There have been a few minor changes in APIs and configurations that require some work when upgrading from GDS 2.1 to GDS 2.2 :

API for PagedQuery

PagedQuery now supports sorting on multiple fields, so the API for server-side components has been changed accordingly and expects arrays for order and desc.
public Map find(Map filter, int first, int max, String[] order, boolean[] desc) {
...
}

Configuration property of server-side validator

The property name in services-config.xml has changed from validator-class-name to validatorClassName for consistency with other properties :
<destination id="seam">
<properties>
<validator-class-name>org.granite.tide.hibernate.HibernateValidator</validator-class-name>
</properties>
</destination>
With Spring, it's also possible to define a validator-name that is the name of a bean that implements org.granite.tide.validators.EntityValidator, the default name expected being "tideValidator".
<bean id="tideValidator" class="com.myapp.MyValidator"/>

1 commentaire:

Unknown a dit…

It is actually
public Map find(TEntity filter, int first, int max,
String[] order, boolean[] desc)

TEntity - not Map

http://groups.google.com/group/graniteds/browse_thread/thread/c3eea85281be177e