jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: query improvements: downcasting

From: Rainer Kwesi Schweigkoffer <kwesi_at_sap.com>
Date: Thu, 17 Mar 2011 15:44:13 +0100

Hi Gordon, all,

Gordon Yorke, am 14 Mar 2011 hast Du um 14:47 zum Thema "[jsr338-experts] Re: query improvements: downcast" geschrieben :

> My concern with IS or INSTANCEOF is those keywords already have an
> associated meaning and the TREAT functionality is more complex. It is a
> combination of an instanceof and a cast. IS or INSTANCEOF implies that
> it is an equality expression (ie "TYPE(p) = SmallProject") and fails to
> indicate that the type of p has changed in the expression. If the type
> is not changed then the expression becomes confusing and difficult to
> read. Parsing and validation becomes more challenging and far too much
> emphasis is place on the location of round brackets which will greatly
> impact readability.
>
> I do not think there is any concerns using TREAT as users are aware that
> this JPQL and JPQL has its own semantics.

Well, I am not an English native, but I was thinking in terms of
something like FEATURES or FEATURING.

Best regards
Rainer

---
Rainer Schweigkoffer                      SAP AG Walldorf
Business Solution & Technology            TD Core JS&I
Technology Development                    Dietmar-Hopp-Allee 16
Java Server Core                          D-69190 Walldorf
JEE Implementation Group           phone: +49 6227 7 45305
Building 3, I.3.14                 fax:   +49 6227 7 821177
rainer.schweigkoffer_at_sap.com
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Werner Brandt, Angelika Dammann,
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.