Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/maven/org.apache.derby-derby-10…
Browse files Browse the repository at this point in the history
….17.1.0
  • Loading branch information
ilgrosso authored Sep 19, 2024
2 parents 5203f7d + 80a8b77 commit 342ed18
Show file tree
Hide file tree
Showing 167 changed files with 19,484 additions and 19,432 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ dependency-reduced-pom.xml
nb-configuration.xml
nbactions*.xml
.checkstyle
.vscode

2 changes: 1 addition & 1 deletion openjpa-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-all</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-examples/image-gallery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-examples</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<groupId>org.apache.openjpa.openjpa-examples</groupId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-examples/openbooks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-examples</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<groupId>org.apache.openjpa.openjpa-examples</groupId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-examples/simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-examples</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<groupId>org.apache.openjpa.openjpa-examples</groupId>
Expand Down
9 changes: 8 additions & 1 deletion openjpa-features/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-features</artifactId>
Expand All @@ -27,6 +27,13 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-integration/daytrader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-integration-daytrader</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-integration/examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-integration-examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-integration/jmx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-integration-jmx</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-integration</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-integration/slf4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-integration-slf4j</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-integration/tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-integration-tck</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-integration/validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-integration</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-integration-validation</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openjpa-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId>
<version>4.0.0-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>openjpa-jdbc</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.jdbc.kernel.exps;

/**
* OPENJPA-1794
* An aggregate unary operation that can indicate whether a null value from the data store
* should be returned as null.
*/
public abstract class NullableAggregateUnaryOp extends UnaryOp {
private static final long serialVersionUID = 1L;

public NullableAggregateUnaryOp(Val val) {
super(val);
}

public NullableAggregateUnaryOp(Val val, boolean noParen) {
super(val, noParen);
}

@Override
protected boolean nullableValue(ExpContext ctx, ExpState state) {
// If this is a simple operator (no joins involved), check compatibility to determine
// whether 'null' should be returned for the aggregate operation
if (ctx != null && ctx.store != null && (state.joins == null || state.joins.isEmpty())) {
return ctx.store.getConfiguration().getCompatibilityInstance().getReturnNullOnEmptyAggregateResult();
}
return false;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.jdbc.kernel.exps;

/**
* OPENJPA-1794
* An aggregate unary operation that can indicate whether a null value from the data store
* should be returned as null.
*/
public abstract class NullableAggregateUnaryOp extends UnaryOp {
private static final long serialVersionUID = 1L;

public NullableAggregateUnaryOp(Val val) {
super(val);
}

public NullableAggregateUnaryOp(Val val, boolean noParen) {
super(val, noParen);
}

@Override
protected boolean nullableValue(ExpContext ctx, ExpState state) {
// If this is a simple operator (no joins involved), check compatibility to determine
// whether 'null' should be returned for the aggregate operation
if (ctx != null && ctx.store != null && (state.joins == null || state.joins.isEmpty())) {
return ctx.store.getConfiguration().getCompatibilityInstance().getReturnNullOnEmptyAggregateResult();
}
return false;
}
}
Loading

0 comments on commit 342ed18

Please sign in to comment.