Re: svn commit: r729697 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/select: EntitySegmentBuilder.java EntityTreeSegmentBuilder.java

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Dec 28 2008 - 07:08:13 EST


Consider that in the most general case a select result in Cayenne 3.0
is List<Object[]>, with each element in the Object[] being either a
persistent object or a scalar value, with a special (most common) case
of List<Object>, where Object is again either a persistent or a scalar.

With this in mind, a "segment" is a descriptor of all elements in the
Object[] at a given index, as seen by the user. Internally a segment
may be quite complex, containing pieces (subsegments?) related to the
main table, joined tables, discriminator columns, etc.

Hope this makes sense.

BTW, I have a local branch where SelectQuery processing is completely
switched to the new "org.apache.cayenne.access.select" package. Not
ready to commit it yet, as there are still many important cases that
don't work (such as prefetching).

Andrus

On Dec 28, 2008, at 4:47 AM, Aristedes Maniatis wrote:

>
> On 28/12/2008, at 11:11 AM, aadamchi..pache.org wrote:
>
>> +++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/
>> main/java/org/apache/cayenne/access/select/
>> EntitySegmentBuilder.java Sat Dec 27 16:10:59 2008
>>.. -30,7 +30,7 @@
>> import org.apache.cayenne.query.QueryMetadata;
>>
>> /**
>> - * Builder of the leaf entity segment that has no persistent
>> subclasses or superclasses.
>> + * Builder of an entity segment that has no persistent subclasses
>> or superclasses.
>> *
>> *..ince 3.0
>> */
>>
>
> What does an EntitySegment represent? Is it one database table, such
> when inheritance is not used, there is only one EntitySegment per
> query, and when it is used there is one EntitySegment per table
> which is JOINed in the query?
>
> Ari
>
>
>
> -------------------------->
> Aristedes Maniatis
> phone +61 2 9660 9700
> PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8
>
>
>



This archive was generated by hypermail 2.0.0 : Sun Dec 28 2008 - 07:08:47 EST