Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-262
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CAY-262
Summary: POJO Support in Cayenne
Type: Task
Status: Assigned
Priority: Major
Project: Cayenne
Components:
Cayenne Core Library
Versions:
1.2 [DEV]
AFTER 1.2
Assignee: Andrus Adamchik
Reporter: Andrus Adamchik
Created: Tue, 18 Jan 2005 8:45 PM
Updated: Tue, 18 Jan 2005 8:45 PM
Description:
The most often qouted "limitation" of Cayenne is its lack of support for persisting arbitrary Java beans (Plain Old Java Object = POJO) instead of just DataObjects (which essentially requires subclassing of CayenneDataObject).
I finally got some motivation to play around and see what's involved. Looks like the implementation will be pretty straight-forward, though still lots of routine work is involved. No changes to Cayenne stack are required from DataDomain and down to the DataNode. DataContext and ObjectStore are the two pieces that are affected.
It is probably not practical to do incremental refactoring, as it will hinder the rest of 1.2 development, however it is entirely possible to do this as a parallel Cayenne extention (see CAY-248 - custom DataContext will become easy soon).
I starated a little mockup with two main classes being POJODataContext extends DataContext and POJOObjectStore extends ObjectStore. The add new API that does not use DataObject at all. To avoid rewriting some of the underlying algorithms (e.g. snapshot merging), methods that are not expsoed publically can continue using DataObject for the time being ... Cayenne will wrap a POJO with some POJOAdapter that implements DataObject for these cases. This would allow "new" Cayenne to coexist with "old".
I'll post some code once I have at least a simple prototype working but this is very doable within current Cayenne design.
Andrus
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://objectstyle.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Tue Jan 18 2005 - 20:46:31 EST