[ 
https://issues.apache.org/jira/browse/JDO-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16547654#comment-16547654
 ] 

Andy Jefferson edited comment on JDO-652 at 7/18/18 10:18 AM:
--------------------------------------------------------------

Tried to apply some updates but cannot access "svn.apache.org" (via command 
line, or browser),

svn: E170013: Unable to connect to a repository at URL 
'[http://svn.apache.org/repos/asf/db/jdo']

svn: E120108: Error running context: The server unexpectedly closed the 
connection.

 

I can use svn to other sites, I can use Git to other sites. So presumably 
someone at Apache knows what those error codes mean; nothing in my logs. 
Blocked my IP ?

 

Tried to upload a patch here (Firefox, also tried Chrome) and JIRA says

"JIRA could not attach the file as there was a missing token. Please try 
attaching the file again."

WTF? Glad we dumped JIRA from the DataNucleus project.

 

I attach the proposed updates to the api project here in text form, since have 
no other way. The aim of this is to sort out some of the generics 
specifications of (some of) the JDOQLTyped expressions. Thx

 

Index: src/main/java/javax/jdo/query/ComparableExpression.java
 ===================================================================
 — src/main/java/javax/jdo/query/ComparableExpression.java (revision 1834479)
 +++ src/main/java/javax/jdo/query/ComparableExpression.java (working copy)
 @@ -28,7 +28,7 @@
 * @param expr Other expression
 * @return Whether this is less than the other
 */

 - BooleanExpression lt(ComparableExpression expr);
 + BooleanExpression lt(ComparableExpression<T> expr);

/**
 * Method returning whether this expression is less than the literal.
 @@ -42,7 +42,7 @@
 * @param expr Other expression
 * @return Whether this is less than or equal the other
 */

 - BooleanExpression lteq(ComparableExpression expr);
 + BooleanExpression lteq(ComparableExpression<T> expr);

/**
 * Method returning whether this expression is less than or equal the literal.
 @@ -56,7 +56,7 @@
 * @param expr Other expression
 * @return Whether this is greater than the other
 */

 - BooleanExpression gt(ComparableExpression expr);
 + BooleanExpression gt(ComparableExpression<T> expr);

/**
 * Method returning whether this expression is greater than the literal.
 @@ -70,7 +70,7 @@
 * @param expr Other expression
 * @return Whether this is greater than or equal to the other
 */

 - BooleanExpression gteq(ComparableExpression expr);
 + BooleanExpression gteq(ComparableExpression<T> expr);

/**
 * Method returning whether this expression is greater than or equal the 
literal.
 @@ -83,23 +83,23 @@
 * Method to return a numeric expression representing the aggregated minimum of 
this expression.
 * @return Numeric expression for the minimum
 */

 - NumericExpression min();
 + NumericExpression<T> min();

/**
 * Method to return a numeric expression representing the aggregated maximum of 
this expression.
 * @return Numeric expression for the maximum
 */

 - NumericExpression max();
 + NumericExpression<T> max();

/**
 * Method to return an order expression for this expression in ascending order.
 * @return The order expression
 */

 - OrderExpression asc();
 + OrderExpression<T> asc();

/**
 * Method to return an order expression for this expression in descending order.
 * @return The order expression
 */

 - OrderExpression desc();
 -}

\ No newline at end of file
 + OrderExpression<T> desc();
 +}
 Index: src/main/java/javax/jdo/query/NumericExpression.java
 ===================================================================
 — src/main/java/javax/jdo/query/NumericExpression.java (revision 1834479)
 +++ src/main/java/javax/jdo/query/NumericExpression.java (working copy)
 @@ -109,7 +109,7 @@
 * Method to return a numeric expression representing the aggregated average of 
this expression.
 * @return Numeric expression for the average
 */

 - NumericExpression avg();
 + NumericExpression<Double> avg();

/**
 * Method to return a numeric expression representing the aggregated sum of 
this expression.
 @@ -209,4 +209,4 @@
 * @return Bitwise XOR expression
 */
 NumericExpression bXor(NumericExpression bitExpr);
 -}
 \ No newline at end of file
 +}


was (Author: andy):
Tried to upload a patch since cannot access "svn.apache.org" (via command line, 
or browser),

svn: E170013: Unable to connect to a repository at URL 
'[http://svn.apache.org/repos/asf/db/jdo']

svn: E120108: Error running context: The server unexpectedly closed the 
connection.

 

I can use svn to other sites, I can use Git to other sites. So presumably 
someone at Apache knows what those error codes mean; nothing in my logs. 
Blocked my IP ?

 

Tried to upload a patch here (Firefox, also tried Chrome) and JIRA says

"JIRA could not attach the file as there was a missing token. Please try 
attaching the file again."

WTF? Glad we dumped JIRA from the DataNucleus project.

 

I attach the proposed updates to the api project here in text form, since have 
no other way. The aim of this is to sort out some of the generics 
specifications of (some of) the JDOQLTyped expressions. Thx

 

Index: src/main/java/javax/jdo/query/ComparableExpression.java
===================================================================
--- src/main/java/javax/jdo/query/ComparableExpression.java (revision 1834479)
+++ src/main/java/javax/jdo/query/ComparableExpression.java (working copy)
@@ -28,7 +28,7 @@
 * @param expr Other expression
 * @return Whether this is less than the other
 */
- BooleanExpression lt(ComparableExpression expr);
+ BooleanExpression lt(ComparableExpression<T> expr);
 
 /**
 * Method returning whether this expression is less than the literal.
@@ -42,7 +42,7 @@
 * @param expr Other expression
 * @return Whether this is less than or equal the other
 */
- BooleanExpression lteq(ComparableExpression expr);
+ BooleanExpression lteq(ComparableExpression<T> expr);
 
 /**
 * Method returning whether this expression is less than or equal the literal.
@@ -56,7 +56,7 @@
 * @param expr Other expression
 * @return Whether this is greater than the other
 */
- BooleanExpression gt(ComparableExpression expr);
+ BooleanExpression gt(ComparableExpression<T> expr);
 
 /**
 * Method returning whether this expression is greater than the literal.
@@ -70,7 +70,7 @@
 * @param expr Other expression
 * @return Whether this is greater than or equal to the other
 */
- BooleanExpression gteq(ComparableExpression expr);
+ BooleanExpression gteq(ComparableExpression<T> expr);
 
 /**
 * Method returning whether this expression is greater than or equal the 
literal.
@@ -83,23 +83,23 @@
 * Method to return a numeric expression representing the aggregated minimum of 
this expression.
 * @return Numeric expression for the minimum
 */
- NumericExpression min();
+ NumericExpression<T> min();
 
 /**
 * Method to return a numeric expression representing the aggregated maximum of 
this expression.
 * @return Numeric expression for the maximum
 */
- NumericExpression max();
+ NumericExpression<T> max();
 
 /**
 * Method to return an order expression for this expression in ascending order.
 * @return The order expression
 */
- OrderExpression asc();
+ OrderExpression<T> asc();
 
 /**
 * Method to return an order expression for this expression in descending order.
 * @return The order expression
 */
- OrderExpression desc();
-}

\ No newline at end of file
+ OrderExpression<T> desc();
+}
Index: src/main/java/javax/jdo/query/NumericExpression.java
===================================================================
--- src/main/java/javax/jdo/query/NumericExpression.java (revision 1834479)
+++ src/main/java/javax/jdo/query/NumericExpression.java (working copy)
@@ -109,7 +109,7 @@
 * Method to return a numeric expression representing the aggregated average of 
this expression.
 * @return Numeric expression for the average
 */
- NumericExpression avg();
+ NumericExpression<Double> avg();
 
 /**
 * Method to return a numeric expression representing the aggregated sum of 
this expression.
@@ -209,4 +209,4 @@
 * @return Bitwise XOR expression
 */
 NumericExpression bXor(NumericExpression bitExpr);
-}
\ No newline at end of file
+}

> Provision of a typesafe refactor-friendly query capability for JDOQL
> --------------------------------------------------------------------
>
>                 Key: JDO-652
>                 URL: https://issues.apache.org/jira/browse/JDO-652
>             Project: JDO
>          Issue Type: New Feature
>          Components: api, specification, tck
>            Reporter: Andy Jefferson
>            Assignee: Michael Bouschen
>            Priority: Major
>             Fix For: JDO 3.2
>
>         Attachments: JDO-652-patch.txt, typesafe.patch, 
> typesafe_manifest.patch
>
>
> There are various querying capabilities of this type around. JPA2 has its 
> Criteria query API. Third party solutions like QueryDSL also exist, in its 
> case providing a JDOQL implementation (as well as JPQL, and HQL). We should 
> seriously consider introducing something along these lines in the JDO2.4 
> timeframe. 
> There is a comparison of JPA Criteria with QueryDSL over at 
> http://source.mysema.com/forum/mvnforum/viewthread_thread,49



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to