You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2009/11/24 12:53:24 UTC
Accessing object metadata and other utilities
[As suggested in the parent thread, forking a new thread]
On Nov 24, 2009, at 1:41 PM, Robert Zeigler wrote:
> I'll second that. I ran into a very similar use case yesterday in a
> hibernate project... I was wanting to get at hibernate's version of
> ClassDescription, and it took me forever to track down the right way
> to do it; once I knew how, it was simple enough, and just a few
> lines of code, but I fear the above would cause a new Cayenne user
> the same level of frustration I experienced yesterday with
> Hibernate. ;)
I wouldn't mind if we add methods for ClassDescriptor lookups to the
DataObjectUtils. BTW PersistentObject defines 'getObjEntity' method.
I'd say we replace that with 'getClassDescriptor' and move it to a
utility class.
While we are at it, maybe rename DataObjectUtils to something more
appropriate and shorter. CayenneUtil? Cayenne? ("Util" is already
taken, and I'd rather it identify the origin of the framework).
I sort of like calling it just "Cayenne" (for the same reasons of user
simplicity), but then it implies this is a central class in the
framework, and has more than just lookup-by-pk or give-me-metadata
methods.
Andrus
Re: Accessing object metadata and other utilities
Posted by Michael Gentry <mg...@masslight.net>.
I tend to not like abbreviations for the most part (a little peeve of
mine -- I fall into the "software is meant to be read, not written"
camp), so I'd vote for something more like "Cayenne" in the current
org.apache.cayenne.util package. Simple, direct, and to the point.
mrg
On Tue, Nov 24, 2009 at 6:53 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
> [As suggested in the parent thread, forking a new thread]
>
> On Nov 24, 2009, at 1:41 PM, Robert Zeigler wrote:
>
>> I'll second that. I ran into a very similar use case yesterday in a
>> hibernate project... I was wanting to get at hibernate's version of
>> ClassDescription, and it took me forever to track down the right way to do
>> it; once I knew how, it was simple enough, and just a few lines of code, but
>> I fear the above would cause a new Cayenne user the same level of
>> frustration I experienced yesterday with Hibernate. ;)
>
> I wouldn't mind if we add methods for ClassDescriptor lookups to the
> DataObjectUtils. BTW PersistentObject defines 'getObjEntity' method. I'd say
> we replace that with 'getClassDescriptor' and move it to a utility class.
>
> While we are at it, maybe rename DataObjectUtils to something more
> appropriate and shorter. CayenneUtil? Cayenne? ("Util" is already taken, and
> I'd rather it identify the origin of the framework).
>
> I sort of like calling it just "Cayenne" (for the same reasons of user
> simplicity), but then it implies this is a central class in the framework,
> and has more than just lookup-by-pk or give-me-metadata methods.
>
> Andrus
>
>
>
Re: Accessing object metadata and other utilities
Posted by Lachlan Deck <la...@gmail.com>.
On 24/11/2009, at 11:13 PM, Andrey Razumovsky wrote:
> or maybe PersistentUtils
+1 makes the most sense (to me at least) given it reflects the flavour of the interface to which these objects belong whether server-side or not.
> - because it will work with all types of
> classes (or at least those that implement Persistent).
with regards,
--
Lachlan Deck
Re: Accessing object metadata and other utilities
Posted by Andrey Razumovsky <ra...@gmail.com>.
Cayenne or maybe PersistentUtils - because it will work with all types of
classes (or at least those that implement Persistent).
Re: Accessing object metadata and other utilities
Posted by Robert Zeigler <ro...@roxanemy.com>.
CayUtils? I'm good with Cayenne, too.
Robert
On Nov 24, 2009, at 11/245:53 AM , Andrus Adamchik wrote:
> [As suggested in the parent thread, forking a new thread]
>
> On Nov 24, 2009, at 1:41 PM, Robert Zeigler wrote:
>
>> I'll second that. I ran into a very similar use case yesterday in a
>> hibernate project... I was wanting to get at hibernate's version of
>> ClassDescription, and it took me forever to track down the right
>> way to do it; once I knew how, it was simple enough, and just a few
>> lines of code, but I fear the above would cause a new Cayenne user
>> the same level of frustration I experienced yesterday with
>> Hibernate. ;)
>
> I wouldn't mind if we add methods for ClassDescriptor lookups to the
> DataObjectUtils. BTW PersistentObject defines 'getObjEntity' method.
> I'd say we replace that with 'getClassDescriptor' and move it to a
> utility class.
>
> While we are at it, maybe rename DataObjectUtils to something more
> appropriate and shorter. CayenneUtil? Cayenne? ("Util" is already
> taken, and I'd rather it identify the origin of the framework).
>
> I sort of like calling it just "Cayenne" (for the same reasons of
> user simplicity), but then it implies this is a central class in the
> framework, and has more than just lookup-by-pk or give-me-metadata
> methods.
>
> Andrus
>
>