cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [13/30] cayenne git commit: CAY-2377. Remove NamedQuery
Date Thu, 07 Dec 2017 10:09:42 GMT
CAY-2377. Remove NamedQuery


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/060340bf
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/060340bf
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/060340bf

Branch: refs/heads/master
Commit: 060340bf6a4ae75e5ff1643e04437a38d8231014
Parents: 47a8795
Author: Arseni Bulatski <ancarseni@gmail.com>
Authored: Thu Nov 9 09:25:39 2017 +0300
Committer: Arseni Bulatski <ancarseni@gmail.com>
Committed: Wed Nov 15 10:27:47 2017 +0300

----------------------------------------------------------------------
 .../apache/cayenne/query/NamedQueryTest.java    |  43 ---
 .../org/apache/cayenne/query/NamedQuery.java    | 294 -------------------
 .../apache/cayenne/query/NamedQueryTest.java    |  83 ------
 .../cayenne/testdo/mt/ClientMultiTier.java      |  36 ---
 .../org/apache/cayenne/testdo/mt/MultiTier.java |  36 ---
 .../testdo/mt/auto/_ClientMultiTier.java        |  44 ---
 .../cayenne/testdo/mt/auto/_MultiTier.java      |  44 ---
 .../apache/cayenne/testdo/testmap/Tstmap.java   |  36 ---
 .../cayenne/testdo/testmap/auto/_Tstmap.java    | 118 --------
 docs/doc/src/main/resources/UPGRADE.txt         |   5 +
 10 files changed, 5 insertions(+), 734 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-client/src/test/java/org/apache/cayenne/query/NamedQueryTest.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/query/NamedQueryTest.java b/cayenne-client/src/test/java/org/apache/cayenne/query/NamedQueryTest.java
deleted file mode 100644
index 0477cc9..0000000
--- a/cayenne-client/src/test/java/org/apache/cayenne/query/NamedQueryTest.java
+++ /dev/null
@@ -1,43 +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.cayenne.query;
-
-import org.apache.cayenne.map.EntityResolver;
-import org.apache.cayenne.remote.hessian.service.HessianUtil;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-public class NamedQueryTest {
-
-    @SuppressWarnings("deprecation")
-    @Test
-    public void testSerializabilityWithHessian() throws Exception {
-        NamedQuery o = new NamedQuery("abc");
-        Object clone = HessianUtil.cloneViaClientServerSerialization(o, new EntityResolver());
-
-        assertTrue(clone instanceof NamedQuery);
-        NamedQuery c1 = (NamedQuery) clone;
-
-        assertNotSame(o, c1);
-        assertEquals(o.getName(), c1.getName());
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-server/src/main/java/org/apache/cayenne/query/NamedQuery.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/NamedQuery.java b/cayenne-server/src/main/java/org/apache/cayenne/query/NamedQuery.java
deleted file mode 100644
index b8544fa..0000000
--- a/cayenne-server/src/main/java/org/apache/cayenne/query/NamedQuery.java
+++ /dev/null
@@ -1,294 +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.cayenne.query;
-
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.Persistent;
-import org.apache.cayenne.map.EntityResolver;
-import org.apache.cayenne.map.QueryDescriptor;
-import org.apache.cayenne.util.EqualsBuilder;
-import org.apache.cayenne.util.HashCodeBuilder;
-import org.apache.cayenne.util.Util;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * A query that is a reference to a named parameterized query stored in the mapping. The
actual query is resolved
- * during execution.
- * 
- * @since 1.2
- * @deprecated since 4.0 you should use {@link MappedSelect} or {@link MappedExec} instead.
- */
-@SuppressWarnings("deprecation")
-@Deprecated
-public class NamedQuery extends IndirectQuery {
-
-    protected Map<String, Object> parameters;
-
-    protected boolean forceNoCache;
-
-    protected BaseQueryMetadata overrideMetadata;
-
-    // metadata fields...
-    transient int hashCode;
-    
-    //to enable serialization
-    @SuppressWarnings("unused")
-    private NamedQuery() {
-    }
-
-    public NamedQuery(String name) {
-        this(name, null);
-    }
-
-    public NamedQuery(String name, Map<String, ?> parameters) {
-        this.name = name;
-
-        // copy parameters map (among other things to make hessian serialization work).
-        if (parameters != null && !parameters.isEmpty()) {
-            this.parameters = new HashMap<>(parameters);
-        }
-    }
-
-    /**
-     * Creates NamedQuery with parameters passed as two matching arrays of keys and
-     * values.
-     */
-    public NamedQuery(String name, String[] keys, Object[] values) {
-        this.name = name;
-        this.parameters = Util.toMap(keys, values);
-    }
-
-    @Override
-    public QueryMetadata getMetaData(EntityResolver resolver) {
-
-        QueryMetadata base = overrideMetadata != null ? overrideMetadata : super.getMetaData(resolver);
-        QueryMetadataWrapper wrapper = new QueryMetadataWrapper(base);
-
-        // override cache policy, forcing refresh if needed
-        if (forceNoCache) {
-            QueryCacheStrategy strategy = base.getCacheStrategy();
-            if (QueryCacheStrategy.LOCAL_CACHE == strategy) {
-                wrapper.override(QueryMetadata.CACHE_STRATEGY_PROPERTY, QueryCacheStrategy.LOCAL_CACHE_REFRESH);
-            } else if (QueryCacheStrategy.SHARED_CACHE == strategy) {
-                wrapper.override(QueryMetadata.CACHE_STRATEGY_PROPERTY, QueryCacheStrategy.SHARED_CACHE_REFRESH);
-            }
-        }
-
-        // override cache key to include parameters
-        if (parameters != null
-                && !parameters.isEmpty()
-                && replacementQuery instanceof NamedQuery
-                && base.getCacheKey() != null) {
-
-            // TODO: andrus, 3/29/2006 this is taken from SelectQuery...probably need a
-            // central place for converting parameters to a cache key
-
-            StringBuilder buffer = new StringBuilder(name);
-
-            if (parameters != null && !parameters.isEmpty()) {
-                buffer.append(parameters.hashCode());
-            }
-
-            wrapper.override(QueryMetadataWrapper.CACHE_KEY_PROPERTY, buffer.toString());
-        }
-
-        return wrapper;
-    }
-
-    @Override
-    protected Query createReplacementQuery(EntityResolver resolver) {
-        Query query = resolveQuery(resolver);
-
-        if (query instanceof ParameterizedQuery) {
-            query = ((ParameterizedQuery) query).createQuery(normalizedParameters());
-        } else if (query instanceof EJBQLQuery) {
-            for (Map.Entry<String, ?> pairs : normalizedParameters().entrySet()) {
-                ((EJBQLQuery) query).setParameter(pairs.getKey(), pairs.getValue());
-            }
-        }
-
-        return query;
-    }
-
-    /**
-     * Returns a non-null parameter map, substituting all persistent objects in the
-     * initial map with ObjectIds. This is needed so that a query could work uniformly on
-     * the server and client sides.
-     */
-    Map<String, ?> normalizedParameters() {
-        if (parameters == null || parameters.isEmpty()) {
-            return Collections.emptyMap();
-        }
-
-        Map<String, Object> substitutes = new HashMap<>(parameters);
-
-        for (Map.Entry<String, ?> entry : parameters.entrySet()) {
-            Object value = entry.getValue();
-
-            if (value instanceof Persistent) {
-                value = ((Persistent) value).getObjectId();
-            }
-
-            substitutes.put(entry.getKey(), value);
-        }
-
-        return substitutes;
-    }
-
-    /**
-     * Returns a query for name, throwing an exception if such query is not mapped in the
-     * EntityResolver.
-     */
-    protected Query resolveQuery(EntityResolver resolver) {
-        QueryDescriptor queryDescriptor = resolver.getQueryDescriptor(getName());
-        Query query = queryDescriptor.buildQuery();
-
-        if (query == this) {
-            throw new CayenneRuntimeException("Named query resolves to self: '%s'", getName());
-        }
-
-        return query;
-    }
-
-    /**
-     * Overrides toString() outputting a short string with query class and name.
-     */
-    @Override
-    public String toString() {
-        String className = getClass().getName();
-        return Util.stripPackageName(className) + ":" + getName();
-    }
-
-    /**
-     * Initializes metadata overrides. Needed to store the metadata for the remote query
-     * proxies that have no access to the actual query.
-     */
-    public void initMetadata(QueryMetadata metadata) {
-        if (metadata != null) {
-            this.overrideMetadata = new BaseQueryMetadata();
-            this.overrideMetadata.copyFromInfo(metadata);
-        }
-        else {
-            this.overrideMetadata = null;
-        }
-    }
-
-    /**
-     * An object is considered equal to this NamedQuery if it is a NamedQuery with the
-     * same queryName and same parameters.
-     */
-    @Override
-    public boolean equals(Object object) {
-        if (this == object) {
-            return true;
-        }
-
-        if (!(object instanceof NamedQuery)) {
-            return false;
-        }
-
-        NamedQuery query = (NamedQuery) object;
-
-        if (!Util.nullSafeEquals(name, query.getName())) {
-            return false;
-        }
-
-        if (query.parameters == null && parameters == null) {
-            return true;
-        }
-
-        if (query.parameters == null || parameters == null) {
-            return false;
-        }
-
-        if (query.parameters.size() != parameters.size()) {
-            return false;
-        }
-
-        EqualsBuilder builder = new EqualsBuilder();
-
-        for (Map.Entry<String, ?> entry : parameters.entrySet()) {
-            String entryKey = entry.getKey();
-            Object entryValue = entry.getValue();
-
-            if (entryValue == null) {
-                if (query.parameters.get(entryKey) != null
-                        || !query.parameters.containsKey(entryKey)) {
-                    return false;
-                }
-            }
-            else {
-                // takes care of comparing primitive arrays, such as byte[]
-                builder.append(entryValue, query.parameters.get(entryKey));
-                if (!builder.isEquals()) {
-                    return false;
-                }
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * Implements a standard hashCode contract considering custom 'equals' implementation.
-     */
-    @Override
-    public int hashCode() {
-
-        if (this.hashCode == 0) {
-
-            HashCodeBuilder builder = new HashCodeBuilder(13, 17);
-
-            if (name != null) {
-                builder.append(name.hashCode());
-            }
-
-            if (parameters != null) {
-                Object[] keys = parameters.keySet().toArray();
-                Arrays.sort(keys);
-
-                for (Object key : keys) {
-                    // HashCodeBuilder will take care of processing object if it
-                    // happens to be a primitive array such as byte[]
-                    builder.append(key).append(parameters.get(key));
-                }
-
-            }
-
-            this.hashCode = builder.toHashCode();
-            assert hashCode != 0 : "Generated zero hashCode";
-        }
-
-        return hashCode;
-    }
-
-    public boolean isForceNoCache() {
-        return forceNoCache;
-    }
-
-    public void setForceNoCache(boolean forcingNoCache) {
-        this.forceNoCache = forcingNoCache;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-server/src/test/java/org/apache/cayenne/query/NamedQueryTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/NamedQueryTest.java b/cayenne-server/src/test/java/org/apache/cayenne/query/NamedQueryTest.java
deleted file mode 100644
index 0660732..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/NamedQueryTest.java
+++ /dev/null
@@ -1,83 +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.cayenne.query;
-
-import org.apache.cayenne.util.Util;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-@SuppressWarnings("deprecation")
-public class NamedQueryTest {
-
-    @Test
-    public void testName() {
-        NamedQuery query = new NamedQuery("abc");
-
-        assertEquals("abc", query.getName());
-        query.setName("123");
-        assertEquals("123", query.getName());
-    }
-
-    @Test
-    public void testQueryName() {
-        NamedQuery query = new NamedQuery("abc");
-        assertEquals("abc", query.getName());
-    }
-
-    @Test
-    public void testSerializability() throws Exception {
-        NamedQuery o = new NamedQuery("abc");
-        Object clone = Util.cloneViaSerialization(o);
-
-        assertTrue(clone != null);
-        NamedQuery c1 = (NamedQuery) clone;
-
-        assertNotSame(o, c1);
-        assertEquals(o.getName(), c1.getName());
-    }
-
-    /**
-     * Proper 'equals' and 'hashCode' implementations are important when mapping
-     * results obtained in a QueryChain back to the query.
-     */
-    @Test
-    public void testEquals() throws Exception {
-        NamedQuery q1 = new NamedQuery("abc", new String[] { "a", "b" }, new Object[] { "1",
"2" });
-
-        NamedQuery q2 = new NamedQuery("abc", new String[] { "a", "b" }, new Object[] { "1",
"2" });
-
-        NamedQuery q3 = new NamedQuery("abc", new String[] { "a", "b" }, new Object[] { "1",
"3" });
-
-        NamedQuery q4 = new NamedQuery("123", new String[] { "a", "b" }, new Object[] { "1",
"2" });
-
-        assertTrue(q1.equals(q2));
-        assertEquals(q1.hashCode(), q2.hashCode());
-
-        assertFalse(q1.equals(q3));
-        assertFalse(q1.hashCode() == q3.hashCode());
-
-        assertFalse(q1.equals(q4));
-        assertFalse(q1.hashCode() == q4.hashCode());
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/ClientMultiTier.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/ClientMultiTier.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/ClientMultiTier.java
deleted file mode 100644
index 77dee02..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/ClientMultiTier.java
+++ /dev/null
@@ -1,36 +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.cayenne.testdo.mt;
-
-import org.apache.cayenne.testdo.mt.auto._ClientMultiTier;
-
-public class ClientMultiTier extends _ClientMultiTier {
-
-    private static ClientMultiTier instance;
-
-    public ClientMultiTier() {}
-
-    public static ClientMultiTier getInstance() {
-        if(instance == null) {
-            instance = new ClientMultiTier();
-        }
-
-        return instance;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/MultiTier.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/MultiTier.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/MultiTier.java
deleted file mode 100644
index 980d622..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/MultiTier.java
+++ /dev/null
@@ -1,36 +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.cayenne.testdo.mt;
-
-import org.apache.cayenne.testdo.mt.auto._MultiTier;
-
-public class MultiTier extends _MultiTier {
-
-    private static MultiTier instance;
-
-    private MultiTier() {}
-
-    public static MultiTier getInstance() {
-        if(instance == null) {
-            instance = new MultiTier();
-        }
-
-        return instance;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMultiTier.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMultiTier.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMultiTier.java
deleted file mode 100644
index 6ddc7ee..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMultiTier.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.apache.cayenne.testdo.mt.auto;
-
-import java.util.List;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.query.NamedQuery;
-import org.apache.cayenne.testdo.mt.ClientMtTable1;
-
-/**
- * This class was generated by Cayenne.
- * It is probably a good idea to avoid changing this class manually,
- * since it may be overwritten next time code is regenerated.
- * If you need to make any customizations, please use subclass.
- */
-public class _ClientMultiTier {
-
-    public static final String ALL_MT_TABLE1_QUERYNAME = "AllMtTable1";
-
-    public static final String MT_QUERY_WITH_LOCAL_CACHE_QUERYNAME = "MtQueryWithLocalCache";
-
-    public static final String PARAMETERIZED_EJBQLMT_QUERY_QUERYNAME = "ParameterizedEJBQLMtQuery";
-
-    public static final String PARAMETERIZED_MT_QUERY_WITH_LOCAL_CACHE_QUERYNAME = "ParameterizedMtQueryWithLocalCache";
-
-    public List<ClientMtTable1> performAllMtTable1(ObjectContext context ) {
-        return context.performQuery(new NamedQuery("AllMtTable1"));
-    }
-
-    public List<ClientMtTable1> performMtQueryWithLocalCache(ObjectContext context
) {
-        return context.performQuery(new NamedQuery("MtQueryWithLocalCache"));
-    }
-
-    public List<ClientMtTable1> performParameterizedMtQueryWithLocalCache(ObjectContext
context , String g) {
-        String[] parameters = {
-            "g",
-        };
-
-        Object[] values = {
-            g,
-        };
-
-        return context.performQuery(new NamedQuery("ParameterizedMtQueryWithLocalCache",
parameters, values));
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_MultiTier.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_MultiTier.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_MultiTier.java
deleted file mode 100644
index d990c06..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/mt/auto/_MultiTier.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.apache.cayenne.testdo.mt.auto;
-
-import java.util.List;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.query.NamedQuery;
-import org.apache.cayenne.testdo.mt.MtTable1;
-
-/**
- * This class was generated by Cayenne.
- * It is probably a good idea to avoid changing this class manually,
- * since it may be overwritten next time code is regenerated.
- * If you need to make any customizations, please use subclass.
- */
-public class _MultiTier {
-
-    public static final String ALL_MT_TABLE1_QUERYNAME = "AllMtTable1";
-
-    public static final String MT_QUERY_WITH_LOCAL_CACHE_QUERYNAME = "MtQueryWithLocalCache";
-
-    public static final String PARAMETERIZED_EJBQLMT_QUERY_QUERYNAME = "ParameterizedEJBQLMtQuery";
-
-    public static final String PARAMETERIZED_MT_QUERY_WITH_LOCAL_CACHE_QUERYNAME = "ParameterizedMtQueryWithLocalCache";
-
-    public List<MtTable1> performAllMtTable1(ObjectContext context ) {
-        return context.performQuery(new NamedQuery("AllMtTable1"));
-    }
-
-    public List<MtTable1> performMtQueryWithLocalCache(ObjectContext context ) {
-        return context.performQuery(new NamedQuery("MtQueryWithLocalCache"));
-    }
-
-    public List<MtTable1> performParameterizedMtQueryWithLocalCache(ObjectContext context
, String g) {
-        String[] parameters = {
-            "g",
-        };
-
-        Object[] values = {
-            g,
-        };
-
-        return context.performQuery(new NamedQuery("ParameterizedMtQueryWithLocalCache",
parameters, values));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-server/src/test/java/org/apache/cayenne/testdo/testmap/Tstmap.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/testmap/Tstmap.java b/cayenne-server/src/test/java/org/apache/cayenne/testdo/testmap/Tstmap.java
deleted file mode 100644
index 0d693f0..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/testmap/Tstmap.java
+++ /dev/null
@@ -1,36 +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.cayenne.testdo.testmap;
-
-import org.apache.cayenne.testdo.testmap.auto._Tstmap;
-
-public class Tstmap extends _Tstmap {
-
-    private static Tstmap instance;
-
-    private Tstmap() {}
-
-    public static Tstmap getInstance() {
-        if(instance == null) {
-            instance = new Tstmap();
-        }
-
-        return instance;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/cayenne-server/src/test/java/org/apache/cayenne/testdo/testmap/auto/_Tstmap.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/testmap/auto/_Tstmap.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/testmap/auto/_Tstmap.java
deleted file mode 100644
index a3642f2..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/testmap/auto/_Tstmap.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.cayenne.testdo.testmap.auto;
-
-import java.util.List;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.query.NamedQuery;
-import org.apache.cayenne.testdo.testmap.Artist;
-import org.apache.cayenne.testdo.testmap.Gallery;
-import org.apache.cayenne.testdo.testmap.Painting;
-
-/**
- * This class was generated by Cayenne.
- * It is probably a good idea to avoid changing this class manually,
- * since it may be overwritten next time code is regenerated.
- * If you need to make any customizations, please use subclass.
- */
-public class _Tstmap {
-
-    public static final String EJBQL_QUERY_TEST_QUERYNAME = "EjbqlQueryTest";
-
-    public static final String NON_SELECTING_QUERY_QUERYNAME = "NonSelectingQuery";
-
-    public static final String OBJECT_QUERY_QUERYNAME = "ObjectQuery";
-
-    public static final String PARAMETERIZED_NON_SELECTING_QUERY_QUERYNAME = "ParameterizedNonSelectingQuery";
-
-    public static final String PARAMETERIZED_QUERY_WITH_LOCAL_CACHE_QUERYNAME = "ParameterizedQueryWithLocalCache";
-
-    public static final String PARAMETERIZED_QUERY_WITH_SHARED_CACHE_QUERYNAME = "ParameterizedQueryWithSharedCache";
-
-    public static final String PROCEDURE_QUERY_QUERYNAME = "ProcedureQuery";
-
-    public static final String QUERY_WITH_LOCAL_CACHE_QUERYNAME = "QueryWithLocalCache";
-
-    public static final String QUERY_WITH_ORDERING_QUERYNAME = "QueryWithOrdering";
-
-    public static final String QUERY_WITH_PREFETCH_QUERYNAME = "QueryWithPrefetch";
-
-    public static final String QUERY_WITH_QUALIFIER_QUERYNAME = "QueryWithQualifier";
-
-    public static final String QUERY_WITH_SHARED_CACHE_QUERYNAME = "QueryWithSharedCache";
-
-    public static final String SELECT_DATE_TEST_QUERYNAME = "SelectDateTest";
-
-    public static final String SELECT_RETURN_TYPES_LOBS_MAP1_QUERYNAME = "SelectReturnTypesLobsMap1";
-
-    public static final String SELECT_RETURN_TYPES_MAP1_QUERYNAME = "SelectReturnTypesMap1";
-
-    public static final String SELECT_RETURN_TYPES_MAP2_QUERYNAME = "SelectReturnTypesMap2";
-
-    public static final String SELECT_TEST_LOWER_QUERYNAME = "SelectTestLower";
-
-    public static final String SELECT_TEST_UPPER_QUERYNAME = "SelectTestUpper";
-
-    public List<Painting> performObjectQuery(ObjectContext context , Artist artist)
{
-        String[] parameters = {
-            "artist",
-        };
-
-        Object[] values = {
-            artist,
-        };
-
-        return context.performQuery(new NamedQuery("ObjectQuery", parameters, values));
-    }
-
-    public List<Artist> performParameterizedQueryWithLocalCache(ObjectContext context
, String name) {
-        String[] parameters = {
-            "name",
-        };
-
-        Object[] values = {
-            name,
-        };
-
-        return context.performQuery(new NamedQuery("ParameterizedQueryWithLocalCache", parameters,
values));
-    }
-
-    public List<Artist> performParameterizedQueryWithSharedCache(ObjectContext context
, String name) {
-        String[] parameters = {
-            "name",
-        };
-
-        Object[] values = {
-            name,
-        };
-
-        return context.performQuery(new NamedQuery("ParameterizedQueryWithSharedCache", parameters,
values));
-    }
-
-    public List<Artist> performQueryWithLocalCache(ObjectContext context ) {
-        return context.performQuery(new NamedQuery("QueryWithLocalCache"));
-    }
-
-    public List<Artist> performQueryWithOrdering(ObjectContext context ) {
-        return context.performQuery(new NamedQuery("QueryWithOrdering"));
-    }
-
-    public List<Gallery> performQueryWithPrefetch(ObjectContext context ) {
-        return context.performQuery(new NamedQuery("QueryWithPrefetch"));
-    }
-
-    public List<Artist> performQueryWithQualifier(ObjectContext context , String param1)
{
-        String[] parameters = {
-            "param1",
-        };
-
-        Object[] values = {
-            param1,
-        };
-
-        return context.performQuery(new NamedQuery("QueryWithQualifier", parameters, values));
-    }
-
-    public List<Artist> performQueryWithSharedCache(ObjectContext context ) {
-        return context.performQuery(new NamedQuery("QueryWithSharedCache"));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/060340bf/docs/doc/src/main/resources/UPGRADE.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/UPGRADE.txt b/docs/doc/src/main/resources/UPGRADE.txt
index 676d529..38ed27b 100644
--- a/docs/doc/src/main/resources/UPGRADE.txt
+++ b/docs/doc/src/main/resources/UPGRADE.txt
@@ -239,6 +239,11 @@ UPGRADING TO 4.1.M2
       org.apache.cayenne.access.DataNode;
       - removed OSQueryCache in org.apache.cayenne.cache with tests;
       - removed EhCacheQueryCache in org.apache.cayenne.cache with tests;
+      - removed Tstmap and _Tstmap org.apache.cayenne.testdo.testmap;
+      - removed MultiTier and _MultiTier in org.apache.cayenne.testdo.mt;
+      - removed ClientMultiTier and _ClientMultiTier in org.apache.cayenne.testdo.mt;
+      - removed NamedQueryTest in org.apache.cayenne.query.NamedQueryTest;
+      - removed NamedQuery in org.apache.cayenne.query;
 
 UPGRADING TO 4.1.M1
 


Mime
View raw message