This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 9068474656d4be63f5d479c3ca857cf54b075fdf
Author: Dan Haywood <d...@haywood-associates.co.uk>
AuthorDate: Mon Sep 18 22:29:13 2017 +0100

    ISIS-1276: fixes compile issues in metamodel and runtime
---
 .../value/vsp/ValueSemanticsProviderUtil.java      |  2 --
 ...ionParameterAbstractTest_getId_and_getName.java |  8 ++++---
 .../DataNucleusApplicationComponents.java          |  2 +-
 .../persistence/PersistenceSessionFactory.java     |  2 +-
 .../CreateSchemaObjectFromClassMetadata.java       |  3 ++-
 .../service/support/IsisJdoSupportImpl.java        | 27 +++++++++-------------
 6 files changed, 20 insertions(+), 24 deletions(-)

diff --git 
a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/value/vsp/ValueSemanticsProviderUtil.java
 
b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/value/vsp/ValueSemanticsProviderUtil.java
index 03658a5..b34d5fe 100644
--- 
a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/value/vsp/ValueSemanticsProviderUtil.java
+++ 
b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/value/vsp/ValueSemanticsProviderUtil.java
@@ -24,7 +24,6 @@ import com.google.common.base.Strings;
 import org.apache.isis.applib.adapters.ValueSemanticsProvider;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.lang.ClassUtil;
-import org.apache.isis.core.commons.lang.StringExtensions;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 
 public final class ValueSemanticsProviderUtil {
@@ -46,7 +45,6 @@ public final class ValueSemanticsProviderUtil {
         @SuppressWarnings("rawtypes")
         final Class clazz = candidateClass != null ? 
ClassUtil.implementingClassOrNull(candidateClass.getName(), 
ValueSemanticsProvider.class, FacetHolder.class) : null;
         return clazz != null ? clazz : 
(Class)ClassUtil.implementingClassOrNull(classCandidateName, 
ValueSemanticsProvider.class, FacetHolder.class);
-
     }
 
 }
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
index 1f3fcc3..3e1eb76 100644
--- 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
@@ -19,6 +19,8 @@
 
 package org.apache.isis.core.metamodel.specloader.specimpl;
 
+import javax.ws.rs.HEAD;
+
 import com.google.common.base.Predicate;
 import com.google.common.collect.Lists;
 
@@ -164,7 +166,7 @@ public class 
ObjectActionParameterAbstractTest_getId_and_getName {
                 one(actionParamPeer).getFacet(NamedFacet.class);
                 will(returnValue(null));
 
-                
one(parentAction).getParameters((Predicate<ObjectActionParameter>) 
with(Expectations.<Predicate>anything()));
+                
one(parentAction).getParameters(with(Expectations.<Predicate<ObjectActionParameter>>anything()));
                 will(returnValue(Lists.newArrayList(objectActionParameter)));
             }
         });
@@ -183,7 +185,7 @@ public class 
ObjectActionParameterAbstractTest_getId_and_getName {
                 one(actionParamPeer).getFacet(NamedFacet.class);
                 will(returnValue(null));
 
-                
one(parentAction).getParameters(with(Expectations.<Predicate>anything()));
+                
one(parentAction).getParameters(with(Expectations.<Predicate<ObjectActionParameter>>anything()));
                 
will(returnValue(Lists.newArrayList(stubObjectActionParameterString, 
objectActionParameter, stubObjectActionParameterString2)));
             }
         });
@@ -202,7 +204,7 @@ public class 
ObjectActionParameterAbstractTest_getId_and_getName {
                 one(actionParamPeer).getFacet(NamedFacet.class);
                 will(returnValue(null));
 
-                
one(parentAction).getParameters(with(Expectations.<Predicate>anything()));
+                
one(parentAction).getParameters(with(Expectations.<Predicate<ObjectActionParameter>>anything()));
                 
will(returnValue(Lists.newArrayList(stubObjectActionParameterString, 
objectActionParameter, stubObjectActionParameterString2)));
             }
         });
diff --git 
a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
 
b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
index 52ac35b..a68ce06 100644
--- 
a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
+++ 
b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
@@ -144,7 +144,7 @@ public class DataNucleusApplicationComponents implements 
ApplicationScopedCompon
                 // (if the configured StoreMgr supports it, and if requested 
in isis.properties)
                 //
                 
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_ALL, "false"); // 
turn off, cos want to do the schema object ourselves...
-                
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_SCHEMA, "false");
+                
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_DATABASE, 
"false");
                 
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_TABLES, "true"); 
// but have DN do everything else...
                 
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_COLUMNS, "true");
                 
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_CONSTRAINTS, 
"true");
diff --git 
a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
 
b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
index 8a32edb..095fbee 100644
--- 
a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
+++ 
b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
@@ -112,7 +112,7 @@ public class PersistenceSessionFactory implements 
ApplicationScopedComponent, Fi
         putIfNotPresent(props, "javax.jdo.PersistenceManagerFactoryClass", 
JDOPersistenceManagerFactory.class.getName());
 
         // previously we defaulted this property to "true", but that could 
cause the target database to be modified
-        putIfNotPresent(props, 
PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_SCHEMA, Boolean.FALSE.toString());
+        putIfNotPresent(props, 
PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_DATABASE, Boolean.FALSE.toString());
 
         putIfNotPresent(props, PropertyNames.PROPERTY_SCHEMA_VALIDATE_ALL, 
Boolean.TRUE.toString());
         putIfNotPresent(props, PropertyNames.PROPERTY_CACHE_L2_TYPE, "none");
diff --git 
a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
 
b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
index 6b2d536..87c6e91 100644
--- 
a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
+++ 
b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
@@ -31,10 +31,11 @@ import org.datanucleus.ClassLoaderResolver;
 import org.datanucleus.enhancer.EnhancementNucleusContextImpl;
 import org.datanucleus.metadata.AbstractClassMetaData;
 import org.datanucleus.metadata.MetaDataListener;
-import org.datanucleus.store.encryption.ConnectionEncryptionProvider;
+import org.datanucleus.store.ConnectionEncryptionProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * Implementation note: the methods in this class are <tt>protected</tt> to 
allow for easy subclassing.
  */
diff --git 
a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
 
b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
index a9a2ac5..e5171c9 100644
--- 
a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
+++ 
b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
@@ -29,16 +29,14 @@ import java.util.Map;
 import java.util.concurrent.Callable;
 
 import javax.jdo.Extent;
+import javax.jdo.JDOQLTypedQuery;
 import javax.jdo.PersistenceManager;
 import javax.jdo.datastore.JDOConnection;
+import javax.jdo.query.BooleanExpression;
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
-import org.datanucleus.api.jdo.JDOPersistenceManager;
-import org.datanucleus.query.typesafe.BooleanExpression;
-import org.datanucleus.query.typesafe.TypesafeQuery;
-
 import org.apache.isis.applib.FatalException;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
@@ -158,12 +156,9 @@ public class IsisJdoSupportImpl implements IsisJdoSupport {
             
             // temporarily disable concurrency checking while this method is 
performed
             try {
-                ConcurrencyChecking.executeWithConcurrencyCheckingDisabled(new 
Callable<Void>() {
-                    @Override
-                    public Void call() {
-                        
getJdoPersistenceManager().deletePersistentAll(instances);
-                        return null;
-                    }
+                
ConcurrencyChecking.executeWithConcurrencyCheckingDisabled((Callable<Void>) () 
-> {
+                    getJdoPersistenceManager().deletePersistentAll(instances);
+                    return null;
                 });
             } catch (final Exception ex) {
                 throw new FatalException(ex);
@@ -176,31 +171,31 @@ public class IsisJdoSupportImpl implements IsisJdoSupport 
{
     @Programmatic
     @Override
     public <T> List<T> executeQuery(final Class<T> cls, final 
BooleanExpression expression) {
-        final TypesafeQuery<T> query = 
newTypesafeQuery(cls).filter(expression);
+        final JDOQLTypedQuery<T> query = 
newTypesafeQuery(cls).filter(expression);
         return executeListAndClose(query);
     }
 
     @Programmatic
     @Override
     public <T> T executeQueryUnique(final Class<T> cls, final 
BooleanExpression expression) {
-        final TypesafeQuery<T> query = 
newTypesafeQuery(cls).filter(expression);
+        final JDOQLTypedQuery<T> query = 
newTypesafeQuery(cls).filter(expression);
         return executeUniqueAndClose(query);
     }
 
     @Programmatic
     @Override
-    public <T> TypesafeQuery<T> newTypesafeQuery(Class<T> cls) {
-        return 
((JDOPersistenceManager)getJdoPersistenceManager()).newTypesafeQuery(cls);
+    public <T> JDOQLTypedQuery<T> newTypesafeQuery(Class<T> cls) {
+        return getJdoPersistenceManager().newJDOQLTypedQuery(cls);
     }
 
-    private static <T> List<T> executeListAndClose(final TypesafeQuery<T> 
query) {
+    private static <T> List<T> executeListAndClose(final JDOQLTypedQuery<T> 
query) {
         final List<T> elements = query.executeList();
         final List<T> list = Lists.newArrayList(elements);
         query.closeAll();
         return list;
     }
 
-    private static <T> T executeUniqueAndClose(final TypesafeQuery<T> query) {
+    private static <T> T executeUniqueAndClose(final JDOQLTypedQuery<T> query) 
{
         final T result = query.executeUnique();
         query.closeAll();
         return result;

-- 
To stop receiving notification emails like this one, please contact
ahu...@apache.org.

Reply via email to