You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/12/23 22:42:47 UTC

[isis] branch master updated: ISIS-2033: dn-integration: house keeping

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

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 890affd  ISIS-2033: dn-integration: house keeping
890affd is described below

commit 890affd9be989582ef13ea576fdd83e3cb699e74
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Dec 23 23:42:28 2020 +0100

    ISIS-2033: dn-integration: house keeping
---
 .../metamodel/facets/entity/JdoEntityFacet.java    |  2 +-
 ...tAbstract.java => _JdoEntityFacetAbstract.java} |  6 +-
 .../metamodel/facets/entity/package-info.java      | 22 ------
 .../integration/persistence/queries/QueryUtil.java | 91 ----------------------
 4 files changed, 4 insertions(+), 117 deletions(-)

diff --git a/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/JdoEntityFacet.java b/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/JdoEntityFacet.java
index c176bb8..cc344a2 100644
--- a/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/JdoEntityFacet.java
+++ b/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/JdoEntityFacet.java
@@ -33,7 +33,7 @@ import org.apache.isis.persistence.jdo.integration.metamodel.JdoMetamodelUtil;
 
 import lombok.val;
 
-public class JdoEntityFacet extends JdoEntityFacetAbstract {
+public class JdoEntityFacet extends _JdoEntityFacetAbstract {
 
     public JdoEntityFacet(
             final FacetHolder holder) {
diff --git a/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/JdoEntityFacetAbstract.java b/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/_JdoEntityFacetAbstract.java
similarity index 93%
rename from persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/JdoEntityFacetAbstract.java
rename to persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/_JdoEntityFacetAbstract.java
index b8ef1a8..98644df 100644
--- a/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/JdoEntityFacetAbstract.java
+++ b/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/_JdoEntityFacetAbstract.java
@@ -26,7 +26,7 @@ import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.entity.EntityFacet;
 import org.apache.isis.persistence.jdo.integration.persistence.JdoPersistenceSession;
 
-public abstract class JdoEntityFacetAbstract 
+abstract class _JdoEntityFacetAbstract 
 extends FacetAbstract 
 implements EntityFacet {
 
@@ -34,10 +34,10 @@ implements EntityFacet {
         return EntityFacet.class;
     }
 
-    public JdoEntityFacetAbstract(
+    public _JdoEntityFacetAbstract(
             final FacetHolder holder) {
         
-        super(JdoEntityFacetAbstract.type(), holder, Derivation.NOT_DERIVED);
+        super(_JdoEntityFacetAbstract.type(), holder, Derivation.NOT_DERIVED);
         super.setFacetAliasType(EntityFacet.class);
     }
     
diff --git a/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/package-info.java b/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/package-info.java
deleted file mode 100644
index 72d27aa..0000000
--- a/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/metamodel/facets/entity/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- *  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.
- */
-/**
- *
- *
- * @version $Rev$ $Date$
- */
-package org.apache.isis.persistence.jdo.integration.metamodel.facets.entity;
\ No newline at end of file
diff --git a/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/persistence/queries/QueryUtil.java b/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/persistence/queries/QueryUtil.java
deleted file mode 100644
index a32919e..0000000
--- a/persistence/jdo/integration/src/main/java/org/apache/isis/persistence/jdo/integration/persistence/queries/QueryUtil.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- *  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.isis.persistence.jdo.integration.persistence.queries;
-
-import javax.jdo.PersistenceManager;
-import javax.jdo.Query;
-
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-import lombok.extern.log4j.Log4j2;
-
-@Log4j2
-public final class QueryUtil {
-
-    private QueryUtil() {}
-
-    public static Query<?> createQuery(
-            final PersistenceManager persistenceManager,
-            final String alias,
-            final String select,
-            final ObjectSpecification specification,
-            final String whereClause) {
-
-        final StringBuilder buf = new StringBuilder(128);
-        appendSelect(buf, select, alias);
-        appendFrom(buf, specification, alias);
-        appendWhere(buf, whereClause);
-
-        final String queryString = buf.toString();
-        log.debug("creating query: {}", queryString);
-
-        final Query<?> jdoQuery = persistenceManager.newQuery(queryString);
-
-        // http://www.datanucleus.org/servlet/jira/browse/NUCCORE-1103
-        jdoQuery.addExtension("datanucleus.multivaluedFetch", "none");
-
-        return jdoQuery;
-    }
-
-    private static StringBuilder appendSelect(
-            final StringBuilder buf,
-            final String select,
-            String alias) {
-        if (select != null) {
-            buf.append(select);
-        } else {
-            buf.append("select ");
-            // not required in JDOQL (cf JPA QL)
-            // buf.append(alias);
-        }
-        buf.append(" ");
-        return buf;
-    }
-
-    private static void appendWhere(StringBuilder buf, String whereClause) {
-        if(whereClause == null) {
-            return;
-        }
-        buf.append(" where ").append(whereClause);
-    }
-
-
-    private static StringBuilder appendFrom(
-            final StringBuilder buf,
-            final ObjectSpecification specification,
-            final String alias) {
-        return buf.append("from ")
-                .append(specification.getFullIdentifier())
-                .append(" as ")
-                .append(alias);
-    }
-}
-
-
-// Copyright (c) Naked Objects Group Ltd.