Refactored APIs look like the attached. Please let me know if
you see any issues.
-Linda
On 7/5/2012 11:56 AM, Steve Ebersole wrote:
> I like the deprecation idea.
>
> Just a suggestion though that CommonAbstractQuery be CommonAbstractCriteria instead, since you already use "Query" (as
> in CriteriaQuery) for selection queries specifically.
>
>
> On Thu 05 Jul 2012 01:41:17 PM CDT, Linda DeMichiel wrote:
>> Hi Rainer, all
>>
>> On 7/3/2012 8:07 AM, Rainer Kwesi Schweigkoffer wrote:
>>> Hi Linda, all,
>>>
>>> Linda DeMichiel, am 29 Jun 2012 hast Du um 12:31 zum Thema "[jsr338-
>>> experts] Re: CriteriaUpdate/CriteriaDelet" geschrieben :
>>>
>>>> Hi Steve, all,
>>>>
>>>> My concern here is that this is a backwards incompatible change with
>>>> regard to Subquery#getParent().
>>>>
>>>> I'm not sure what the best thing to do here is. I've attached
>>>> revisions
>>>> of CriteriaUpdate and CriteriaDelete that try to work around the
>>>> problem,
>>>> but I'm really not happy about how these abuse the typing.
>>>>
>>>> Suggestions appreciated.
>>>
>>
>> Thanks for the suggestions!
>>
>>>
>>> another - also not very nice - possibility is to
>>>
>>> o factor out all methods from Subquery into AbstractSubquery apart from
>>> the getParent method
>>>
>>
>> When you say 'factor out' did you mean duplicate or move the methods that
>> currently return Subquery? If that latter, that is a
>> backwards-incompatible
>> change, which we can't make.
>>
>>> o have Subquery extend AbstractSubquery, additionally providing its
>>> getParent method
>>>
>>> o create a ModificationSubquery interface extending AbstractSubquery
>>> and providing AbstractModification<?> getParent()
>>>
>>> where AbstractModification is an interface extended by both
>>> CriteriaUpdate and CriteriaDelete (as proposed in my mail message of
>>> April 1st, 2011)
>>>
>>> o have CriteriaUpdate/CriteriaDelete's subquery() method return
>>> ModificationSubquery.
>>>
>>> It's a patch, of course.
>>>
>>
>> Yes.
>>
>> Another approach is that we effectively "deprecate" Subquery#getParent
>> and add
>> a Subquery#getContainingQuery method, which would return a
>> CommonAbstractQuery
>> from which AbstractQuery, CriteriaUpdate, and CriteriaDelete would all
>> inherit
>> (i.e., back to the CommonAbstractQuery idea).
>>
>> More opinions??
>>
>> best regards,
>>
>> -Linda
>>
>>
>>
>>
>>> Best regards
>>> Rainer
>>>
>>>
>>>
>>> ---
>>> Rainer Schweigkoffer SAP AG Walldorf
>>> Java Persistence TIP Core JI
>>> Core Java Infrastructure Dietmar-Hopp-Allee 16
>>> Technology& Innovation Platform D-69190 Walldorf
>>> Building 3, I.3.14 phone: +49 6227 7 45305
>>> rainer.schweigkoffer_at_sap.com fax: +49 6227 7 821177
>>>
>>> Sitz der Gesellschaft/Registered Office: Walldorf, Germany
>>> Vorstand/SAP Executive Board: Werner Brandt, Bill
>>> McDermott (Co-CEO), Gerhard Oswald, Vishal Sikka,
>>> Jim Hagemann Snabe (Co-CEO)
>>> Vorsitzender des Aufsichtsrats/Chairperson of the SAP
>>> Supervisory
>>> Board: Hasso Plattner
>>> Registergericht/Commercial Register Mannheim No HRB 350269
>>>
>>> Diese E-Mail kann Betriebs- oder Geschaeftsgeheimnisse
>>> oder sonstige vertrauliche Informationen enthalten.
>>> Sollten Sie diese E-Mail irrtuemlich erhalten haben, ist
>>> Ihnen eine Verwertung des Inhalts, eine Vervielfaeltigung
>>> oder Weitergabe der E-Mail ausdruecklich untersagt. Bitte
>>> benachrichtigen Sie uns und vernichten Sie die empfangene
>>> E-Mail. Vielen Dank.
>>>
>>> This e-mail may contain trade secrets or privileged,
>>> undisclosed, or otherwise confidential information. If you
>>> have received this e-mail in error, you are hereby
>>> notified that any review, copying, or distribution of it
>>> is strictly prohibited. Please inform us immediately and
>>> destroy the original transmittal. Thank you for your
>>> cooperation.
>>>
>>>