Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Mohammed Amine TAZI is a Sun Certified Enterprise Architect and J2EE developer. He's passionate about J2EE technology and learning foreign languages. Mohammed Amine is a DZone MVB and is not an employee of DZone and has posted 4 posts at DZone. View Full User Profile

Cayenne in a Minute

09.08.2010
Email
Views: 2994
  • submit to reddit

Cayenne is a powerful Java Object Relational Mapping framework. It’s open source and completely free. One of the main Cayenne distinctions is that it comes with cross-platform modeling GUI tools. This places Cayenne in the league of its own, making it a very attractive choice over both closed source commerical products and traditional “edit your own XML” open source solutions.

Cayenne supports numerous other features, including caching, a complete object query syntax, relationship pre-fetching, on-demand object and relationship faulting, object inheritance, database auto-detection, and generic persisted objects. Most importantly, Cayenne can scale up or down to virtually any project size. With a mature, 100% open source framework, an energetic user community, and a track record of solid performance in high-volume environments, Cayenne is an exceptional choice for persistence services.

Cayenne is distributed with CayenneModeler – a complete GUI mapping tool that supports reverse-engineering of RDBMS schemas, working with database mappings and generation of Java source code for the persistent objects.

Persistent Java classes are generated and synchronized with the mapping using the Modeler or alternatively with an Ant task. A database SQL schema can be generated from the Modeler and also with simple API calls.

A partial list of Cayenne features includes:

  • “Lazy” relationships and incremental fetching of data.
  • Object queries, including in-memory sorting and filtering of objects with Cayenne expression language.
  • Isolation of object graph changes between user sessions.
  • Committing all created, modified or deleted objects with a single method call.
  • Distributed cache.
  • Automatic ordering of DML operations to satisfy database integrity constraints.
  • Combining multiple physical data sources into a single virtual data source.
  • Database independence with adapters for all major databases.
  • Multiple strategies for automated primary key generation.
  • … and many more

Enjoy using Cayenne framework for your enterprise solution. Have Fun !!

From http://www.misterj2ee.com/2010/09/cayenne-in-a-minute/

Published at DZone with permission of Mohammed Amine Tazi, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Ashwin Jayaprakash replied on Sat, 2010/09/18 - 9:56pm

How is this different from JPA and JDO? Seems like there already are way too many ORM solutions.

Mohammed Amine Tazi replied on Mon, 2010/09/20 - 4:55am

Cayenne is now made JPA compliant, so you can work with JPA with Cayenne implementation but it will not include all cayenne features. I'm OK with you for the fact that we are overloaded with such many ORM frameworks, but I think JPA has made a good step forward to unify java persistence.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.