cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Senecal <sene...@apple.com>
Subject Re: Is there a canonical method of invoking aggregate functions
Date Mon, 14 Sep 2015 20:41:57 GMT
> 
> Can you give us a short summary of what features Wonder would bring to a Cayenne developer?

My favorite Project Wonder extension for EOF would be the automatically generated ERXKeys.

The Project Wonder template would generate a base class with all the getters and setters for
a class (business logic would be in the super class). In addition to the getters and setters,
these base classes included fetch methods that returned a List of that class type instead
of an untyped list. Also they included an ERXKey for each field or relation in the class.


ERXKeys could be used to easily generate qualifiers (Queries) or sort orderings. These could
easily be combined to generate more complex queries. In addition, ERXKeys could be used to
fetch a particular field out of every record in a list of DB objects, returning a list of
values. And since the ERXKey was defined with the field type, the returned list was correctly
typed.

Example:
List<Foobar> data = Foobar.fetch(Foobar.FOO.eq(10).and(Foobar.BAR.eq(“NOW”)));
List<String> fieldData = Foobar.FOO_BAR.arrayValueInObject(data);

Joe
Mime
View raw message