Hey I like that @Transactional feature. Perhaps I can do something similar with Guice method interceptors.

On 8 Mar 2010, at 19:14, Nacho Coloma wrote:

SimpleDS provides a simple persistence framework for Google AppEngine
that gets as little in the way as possible. It is barely a wrapper
around Datastore APIs, providing mapping between Entity and Java
classes.

This version includes small modifications to existing features and
some new ones:

Maven and javadoc
=================

This release includes a maven artifact and online javadoc [1].

Transactions
============

We are now supporting transactions [2] as included in GAE:

try {
       Transaction tx = entityManager.beginTransaction();
       entityManager.put(tx, instance);
       tx.commit();
} catch (RuntimeException e) {
       tx.rollback();
       throw e;
}

Since this is cumbersome, we are also including a @Transactional
annotation and aspect interceptor (thanks to John Patterson for
pointing out a much simpler implementation):

@Transactional(noRollbackFor=MailException.class)
public void save(FooBar foobar, Baz baz) {
       entityManager.put(entityManager.beginTransaction(),
ImmutableList.of(foobar, baz));
       mailService.sendConfirmation("Operation completed
successfully");
}

PagedQuery
==========

There is a new PagedQuery.transform() method that uses the Google
Collections API [3]:

PagedQuery query = entityManager.createPagedQuery(UserData.class):
PagedList<UserData> list = entityManager.findPaged(query);
PagedList<String> userNames = list.transform(new Function<UserData,
String> {

       public String apply(UserData from) {
               return from.getName();
       }

});

Spring JavaConfig example
=========================

We have added an example using Spring JavaConfig [1] instead of Spring
XML. A Guice example would nice to have, if anyone would like to step
up to it :)

Next on the roadmap: @Cacheable and schema migration.

Best regards,

Nacho.
[1] http://code.google.com/p/simpleds/wiki/GettingStarted
[2] http://code.google.com/p/simpleds/wiki/Transactions
[3] http://code.google.com/p/simpleds/wiki/PagedQuery

--
You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected] . To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en .


--
You received this message because you are subscribed to the Google Groups "Google 
App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to