I just stumbled upon Arid POJOs, and I must say I don't understand why
I never heard about it in the last 2.5 years (and that I am writing
the first message on this forum). GORM dynamic finders are a great
idea, and I thought everyone would love to see something like that in
Java. I thought by now, everyone should be using it.
That said, Arid POJOs is now 2.5 years old, and I think it would be
useful to bring it up to date with the latest technologies and
development approaches. In particular, Java Persistence 2.0 now has
the vast majority of Hibernate features (and Hibernate will be JPA 2
compliant soon), so it would be useful to be able to use Arid POJOs
with JPA.
Next, I think the configuration code could be further simplified/
eliminated via annotations. For example, I can imagine that with
Lombok (http://projectlombok.org/), it would be feasible to just write
the following:
@Finders(resultClass=Account.class, finders={"findByAccountId",
"findByBalanceGreaterThan", "findByBalanceBetween"})
public class AccountRepository implements GenericDao<Account, Integer>
{
}
With things like this now possible:
@javax.persistence.PersistenceContext private EntityManager em;
Lombok could generate the appropriate finders including
implementations (using JPA 2 criteria API), it would automatically
figure out the arguments and return types for the finder methods etc.
There would be no XML at all, just the simple @Finders annotation.
So, I am looking at Arid POJOs, and thinking it would be worthwhile to
bring it up to date with the latest specifications such as JPA 2, JSR
299/330, EJB 3.1, and take advantages of innovative approaches such as
Lombok.
(BTW, I also looked at the Spring Roo project, which effectively
implements dynamic finders, but I must say one thing I don't like
about Roo is that the finder implementation still lives in your source
(in an auto-generated aspect). It should be hidden in a library/
framework, not in my source.)
What do you think?
--
You received this message because you are subscribed to the Google Groups "Arid POJOs" group.
To post to this group, send email to arid-...@googlegroups.com.
To unsubscribe from this group, send email to arid-pojos+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/arid-pojos?hl=en.
Are you interested in doing the work?
I'll look at Lombok.
Chris