You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2022/07/07 18:48:46 UTC
[cayenne] 03/05: CAY-2744 Remove ROP support - delete ROP tutorials
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git
commit c1247afd2b60d02f0cf86a9ed7b4ecd24871dd6e
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Thu Jul 7 18:26:02 2022 +0300
CAY-2744 Remove ROP support
- delete ROP tutorials
---
tutorials/pom.xml | 4 -
tutorials/tutorial-rop-client-http2/pom.xml | 50 --------
.../org/apache/cayenne/tutorial/Http2Client.java | 127 --------------------
.../cayenne/tutorial/persistent/client/Artist.java | 31 -----
.../tutorial/persistent/client/Gallery.java | 31 -----
.../tutorial/persistent/client/Painting.java | 31 -----
.../tutorial/persistent/client/auto/_Artist.java | 93 --------------
.../tutorial/persistent/client/auto/_Gallery.java | 72 -----------
.../tutorial/persistent/client/auto/_Painting.java | 86 -------------
.../src/main/resources/keystore | Bin 3697 -> 0 bytes
tutorials/tutorial-rop-client/pom.xml | 57 ---------
.../cayenne/tutorial/persistent/client/Artist.java | 28 -----
.../tutorial/persistent/client/Datamap.java | 36 ------
.../tutorial/persistent/client/Gallery.java | 28 -----
.../cayenne/tutorial/persistent/client/Main.java | 98 ---------------
.../tutorial/persistent/client/Painting.java | 28 -----
.../tutorial/persistent/client/auto/_Artist.java | 93 --------------
.../tutorial/persistent/client/auto/_Datamap.java | 12 --
.../tutorial/persistent/client/auto/_Gallery.java | 72 -----------
.../tutorial/persistent/client/auto/_Painting.java | 86 -------------
.../src/main/resources/.gitignore | 0
.../tutorial-rop-client/src/test/java/.gitignore | 0
.../src/test/resources/.gitignore | 0
tutorials/tutorial-rop-server-http2/pom.xml | 73 -----------
.../apache/cayenne/tutorial/Http2ROPServlet.java | 66 ----------
.../org/apache/cayenne/tutorial/Http2Server.java | 114 ------------------
.../apache/cayenne/tutorial/persistent/Artist.java | 28 -----
.../cayenne/tutorial/persistent/Gallery.java | 28 -----
.../cayenne/tutorial/persistent/Painting.java | 28 -----
.../cayenne/tutorial/persistent/auto/_Artist.java | 133 ---------------------
.../cayenne/tutorial/persistent/auto/_Gallery.java | 112 -----------------
.../tutorial/persistent/auto/_Painting.java | 124 -------------------
.../cayenne/tutorial/persistent/client/Artist.java | 31 -----
.../tutorial/persistent/client/Gallery.java | 31 -----
.../tutorial/persistent/client/Painting.java | 31 -----
.../tutorial/persistent/client/auto/_Artist.java | 93 --------------
.../tutorial/persistent/client/auto/_Gallery.java | 72 -----------
.../tutorial/persistent/client/auto/_Painting.java | 84 -------------
.../src/main/resources/cayenne-project.xml | 18 ---
.../src/main/resources/datamap.map.xml | 50 --------
.../src/main/resources/keystore | Bin 3697 -> 0 bytes
tutorials/tutorial-rop-server/pom.xml | 76 ------------
tutorials/tutorial-rop-server/realm.properties | 16 ---
.../apache/cayenne/tutorial/persistent/Artist.java | 50 --------
.../cayenne/tutorial/persistent/Datamap.java | 36 ------
.../cayenne/tutorial/persistent/Gallery.java | 25 ----
.../cayenne/tutorial/persistent/Painting.java | 25 ----
.../cayenne/tutorial/persistent/auto/_Artist.java | 133 ---------------------
.../cayenne/tutorial/persistent/auto/_Datamap.java | 12 --
.../cayenne/tutorial/persistent/auto/_Gallery.java | 112 -----------------
.../tutorial/persistent/auto/_Painting.java | 124 -------------------
.../cayenne/tutorial/persistent/client/Artist.java | 28 -----
.../tutorial/persistent/client/Datamap.java | 36 ------
.../tutorial/persistent/client/Gallery.java | 28 -----
.../tutorial/persistent/client/Painting.java | 28 -----
.../tutorial/persistent/client/auto/_Artist.java | 93 --------------
.../tutorial/persistent/client/auto/_Datamap.java | 12 --
.../tutorial/persistent/client/auto/_Gallery.java | 72 -----------
.../tutorial/persistent/client/auto/_Painting.java | 84 -------------
.../src/main/resources/cayenne-project.xml | 18 ---
.../src/main/resources/datamap.map.xml | 50 --------
.../src/main/webapp/META-INF/context.xml | 23 ----
.../src/main/webapp/WEB-INF/web.xml | 53 --------
.../tutorial-rop-server/src/test/java/.gitignore | 0
.../src/test/resources/.gitignore | 0
65 files changed, 3313 deletions(-)
diff --git a/tutorials/pom.xml b/tutorials/pom.xml
index f9f951559..a471c0795 100644
--- a/tutorials/pom.xml
+++ b/tutorials/pom.xml
@@ -32,10 +32,6 @@
<modules>
<module>tutorial</module>
- <module>tutorial-rop-client</module>
- <module>tutorial-rop-client-http2</module>
- <module>tutorial-rop-server</module>
- <module>tutorial-rop-server-http2</module>
</modules>
<properties>
diff --git a/tutorials/tutorial-rop-client-http2/pom.xml b/tutorials/tutorial-rop-client-http2/pom.xml
deleted file mode 100644
index c750654e6..000000000
--- a/tutorials/tutorial-rop-client-http2/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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
- https://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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>cayenne-tutorials-parent</artifactId>
- <groupId>org.apache.cayenne.tutorials</groupId>
- <version>4.3.M1-SNAPSHOT</version>
- </parent>
-
- <artifactId>tutorial-rop-client-http2</artifactId>
- <name>tutorial-rop-client-http2: Cayenne ROP HTTP/2 Client Tutorial</name>
- <packaging>jar</packaging>
-
- <properties>
- <main.class>org.apache.cayenne.tutorial.Http2Client</main.class>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-client-jetty</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-protostuff</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
-</project>
\ No newline at end of file
diff --git a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/Http2Client.java b/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/Http2Client.java
deleted file mode 100644
index 26462d703..000000000
--- a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/Http2Client.java
+++ /dev/null
@@ -1,127 +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
- * <p>
- * https://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tutorial;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.configuration.rop.client.ClientConstants;
-import org.apache.cayenne.configuration.rop.client.ClientJettyHttp2Module;
-import org.apache.cayenne.configuration.rop.client.ClientRuntime;
-import org.apache.cayenne.configuration.rop.client.ProtostuffModule;
-import org.apache.cayenne.query.ObjectSelect;
-import org.apache.cayenne.rop.JettyHttp2ClientConnectionProvider;
-import org.apache.cayenne.rop.http.JettyHttpROPConnector;
-import org.apache.cayenne.rop.protostuff.ProtostuffROPSerializationService;
-import org.apache.cayenne.tutorial.persistent.client.Artist;
-import org.apache.cayenne.tutorial.persistent.client.Gallery;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-
-import javax.net.ssl.HttpsURLConnection;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * This example uses {@link ProtostuffROPSerializationService} which is bound in {@link ProtostuffModule}
- * and {@link JettyHttpROPConnector} initialized by {@link JettyHttp2ClientConnectionProvider}, which is bound
- * in {@link ClientJettyHttp2Module}. It works without ALPN by default.
- * <p>
- * In order to run it with ALPN, you have to set {@link ClientConstants#ROP_SERVICE_USE_ALPN_PROPERTY} to true
- * and provide the alpn-boot-XXX.jar into the bootstrap classpath.
- */
-public class Http2Client {
-
- public static void main(String[] args) throws Exception {
- HttpsURLConnection.setDefaultHostnameVerifier((hostname, sslSession) -> hostname.equals("localhost"));
- System.setProperty("javax.net.ssl.trustStore", Http2Client.class.getResource("/keystore").getPath());
-
- // Setting Protostuff properties
- System.setProperty("protostuff.runtime.collection_schema_on_repeated_fields", "true");
- System.setProperty("protostuff.runtime.morph_collection_interfaces", "true");
- System.setProperty("protostuff.runtime.morph_map_interfaces", "true");
- System.setProperty("protostuff.runtime.pojo_schema_on_collection_fields", "true");
- System.setProperty("protostuff.runtime.pojo_schema_on_map_fields", "true");
-
- Map<String, String> properties = new HashMap<>();
- properties.put(ClientConstants.ROP_SERVICE_URL_PROPERTY, "https://localhost:8443/");
- properties.put(ClientConstants.ROP_SERVICE_USE_ALPN_PROPERTY, "false");
- properties.put(ClientConstants.ROP_SERVICE_USERNAME_PROPERTY, "cayenne-user");
- properties.put(ClientConstants.ROP_SERVICE_PASSWORD_PROPERTY, "secret");
- properties.put(ClientConstants.ROP_SERVICE_REALM_PROPERTY, "Cayenne Realm");
-
- ClientRuntime runtime = ClientRuntime.builder()
- .properties(properties)
- .addModule(new ClientJettyHttp2Module())
- .build();
-
- ObjectContext context = runtime.newContext();
-
- newObjectsTutorial(context);
- selectTutorial(context);
- deleteTutorial(context);
-
- runtime.shutdown();
- }
-
- static void newObjectsTutorial(ObjectContext context) {
-
- // creating new Artist
- Artist picasso = context.newObject(Artist.class);
- picasso.setName("Pablo Picasso");
-
- // Creating other objects
- Gallery metropolitan = context.newObject(Gallery.class);
- metropolitan.setName("Metropolitan Museum of Art");
-
- Painting girl = context.newObject(Painting.class);
- girl.setName("Girl Reading at a Table");
-
- Painting stein = context.newObject(Painting.class);
- stein.setName("Gertrude Stein");
-
- // connecting objects together via relationships
- picasso.addToPaintings(girl);
- picasso.addToPaintings(stein);
-
- girl.setGallery(metropolitan);
- stein.setGallery(metropolitan);
-
- // saving all the changes above
- context.commitChanges();
- }
-
- static void selectTutorial(ObjectContext context) {
- // ObjectSelect examples
- List<Painting> paintings1 = ObjectSelect.query(Painting.class).select(context);
-
- List<Painting> paintings2 = ObjectSelect.query(Painting.class)
- .where(Painting.NAME.likeIgnoreCase("gi%")).select(context);
- }
-
- static void deleteTutorial(ObjectContext context) {
- // Delete object example
- Artist picasso = ObjectSelect.query(Artist.class).where(Artist.NAME.eq("Pablo Picasso")).selectOne(context);
-
- if (picasso != null) {
- context.deleteObjects(picasso);
- context.commitChanges();
- }
- }
-}
diff --git a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java b/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java
deleted file mode 100644
index 154987f9e..000000000
--- a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java
+++ /dev/null
@@ -1,31 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Artist;
-
-/**
- * A persistent class mapped as "Artist" Cayenne entity.
- */
-public class Artist extends _Artist {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java b/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java
deleted file mode 100644
index 95400a112..000000000
--- a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java
+++ /dev/null
@@ -1,31 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Gallery;
-
-/**
- * A persistent class mapped as "Gallery" Cayenne entity.
- */
-public class Gallery extends _Gallery {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java b/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java
deleted file mode 100644
index 768407449..000000000
--- a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java
+++ /dev/null
@@ -1,31 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Painting;
-
-/**
- * A persistent class mapped as "Painting" Cayenne entity.
- */
-public class Painting extends _Painting {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java b/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
deleted file mode 100644
index 052709b71..000000000
--- a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import java.time.LocalDate;
-import java.util.List;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.exp.property.DateProperty;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-import org.apache.cayenne.util.PersistentObjectList;
-
-/**
- * A generated persistent class mapped as "Artist" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Artist extends PersistentObject {
-
- public static final DateProperty<LocalDate> DATE_OF_BIRTH = PropertyFactory.createDate("dateOfBirth", LocalDate.class);
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected LocalDate dateOfBirth;
- protected String name;
- protected List<Painting> paintings;
-
- public LocalDate getDateOfBirth() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "dateOfBirth", false);
- }
-
- return dateOfBirth;
- }
-
- public void setDateOfBirth(LocalDate dateOfBirth) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "dateOfBirth", false);
- objectContext.propertyChanged(this, "dateOfBirth", this.dateOfBirth, dateOfBirth);
- }
-
- this.dateOfBirth = dateOfBirth;
- }
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public List<Painting> getPaintings() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- return paintings;
- }
-
- public void addToPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.add(object);
- }
-
- public void removeFromPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.remove(object);
- }
-
-}
diff --git a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java b/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
deleted file mode 100644
index 57ccb07ba..000000000
--- a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import java.util.List;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-import org.apache.cayenne.util.PersistentObjectList;
-
-/**
- * A generated persistent class mapped as "Gallery" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Gallery extends PersistentObject {
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected String name;
- protected List<Painting> paintings;
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public List<Painting> getPaintings() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- return paintings;
- }
-
- public void addToPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.add(object);
- }
-
- public void removeFromPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.remove(object);
- }
-
-}
diff --git a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java b/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
deleted file mode 100644
index d6a4db2d7..000000000
--- a/tutorials/tutorial-rop-client-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.ValueHolder;
-import org.apache.cayenne.exp.property.EntityProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Artist;
-import org.apache.cayenne.tutorial.persistent.client.Gallery;
-import org.apache.cayenne.util.PersistentObjectHolder;
-
-/**
- * A generated persistent class mapped as "Painting" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Painting extends PersistentObject {
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final EntityProperty<org.apache.cayenne.tutorial.persistent.client.Artist> ARTIST = PropertyFactory.createEntity("artist", org.apache.cayenne.tutorial.persistent.client.Artist.class);
- public static final EntityProperty<org.apache.cayenne.tutorial.persistent.client.Gallery> GALLERY = PropertyFactory.createEntity("gallery", org.apache.cayenne.tutorial.persistent.client.Gallery.class);
-
- protected String name;
- protected ValueHolder<Artist> artist;
- protected ValueHolder<Gallery> gallery;
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public Artist getArtist() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "artist", true);
- } else if (this.artist == null) {
- this.artist = new PersistentObjectHolder<>(this, "artist");
- }
-
- return artist.getValue();
- }
-
- public void setArtist(Artist artist) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "artist", true);
- objectContext.propertyChanged(this, "artist", this.artist.getValueDirectly(), artist);
- } else if (this.artist == null) {
- this.artist = new PersistentObjectHolder<>(this, "artist");
- }
-
- this.artist.setValue(artist);
- }
-
- public Gallery getGallery() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "gallery", true);
- } else if (this.gallery == null) {
- this.gallery = new PersistentObjectHolder<>(this, "gallery");
- }
-
- return gallery.getValue();
- }
-
- public void setGallery(Gallery gallery) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "gallery", true);
- objectContext.propertyChanged(this, "gallery", this.gallery.getValueDirectly(), gallery);
- } else if (this.gallery == null) {
- this.gallery = new PersistentObjectHolder<>(this, "gallery");
- }
-
- this.gallery.setValue(gallery);
- }
-
-}
diff --git a/tutorials/tutorial-rop-client-http2/src/main/resources/keystore b/tutorials/tutorial-rop-client-http2/src/main/resources/keystore
deleted file mode 100644
index d6592f95e..000000000
Binary files a/tutorials/tutorial-rop-client-http2/src/main/resources/keystore and /dev/null differ
diff --git a/tutorials/tutorial-rop-client/pom.xml b/tutorials/tutorial-rop-client/pom.xml
deleted file mode 100644
index 03bb53892..000000000
--- a/tutorials/tutorial-rop-client/pom.xml
+++ /dev/null
@@ -1,57 +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
-
- https://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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.cayenne.tutorials</groupId>
- <artifactId>cayenne-tutorials-parent</artifactId>
- <version>4.3.M1-SNAPSHOT</version>
- </parent>
-
- <artifactId>tutorial-rop-client</artifactId>
- <name>tutorial-rop-client: Cayenne ROP Client Tutorial</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-client-jetty</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.caucho</groupId>
- <artifactId>hessian</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java
deleted file mode 100644
index ef55bda7e..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Artist;
-
-/**
- * A persistent class mapped as "Artist" Cayenne entity.
- */
-public class Artist extends _Artist {
-
-}
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Datamap.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Datamap.java
deleted file mode 100644
index 637c9ee7c..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Datamap.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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Datamap;
-
-public class Datamap extends _Datamap {
-
- private static Datamap instance;
-
- private Datamap() {}
-
- public static Datamap getInstance() {
- if(instance == null) {
- instance = new Datamap();
- }
-
- return instance;
- }
-}
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java
deleted file mode 100644
index 2584de48e..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Gallery;
-
-/**
- * A persistent class mapped as "Gallery" Cayenne entity.
- */
-public class Gallery extends _Gallery {
-
-}
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Main.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Main.java
deleted file mode 100644
index 46ab1770d..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Main.java
+++ /dev/null
@@ -1,98 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.configuration.rop.client.ClientConstants;
-import org.apache.cayenne.configuration.rop.client.ClientJettyHttp2Module;
-import org.apache.cayenne.configuration.rop.client.ClientJettyHttpModule;
-import org.apache.cayenne.configuration.rop.client.ClientRuntime;
-import org.apache.cayenne.query.ObjectSelect;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class Main {
-
- public static void main(String[] args) {
-
- Map<String, String> properties = new HashMap<>();
- properties.put(ClientConstants.ROP_SERVICE_URL_PROPERTY, "http://localhost:8080/cayenne-service");
- properties.put(ClientConstants.ROP_SERVICE_USERNAME_PROPERTY, "cayenne-user");
- properties.put(ClientConstants.ROP_SERVICE_PASSWORD_PROPERTY, "secret");
- properties.put(ClientConstants.ROP_SERVICE_REALM_PROPERTY, "Cayenne Realm");
-
- ClientRuntime runtime = ClientRuntime.builder()
- .properties(properties)
- .build();
-
- ObjectContext context = runtime.newContext();
-
- newObjectsTutorial(context);
- selectTutorial(context);
- deleteTutorial(context);
- runtime.shutdown();
- }
-
- static void newObjectsTutorial(ObjectContext context) {
-
- // creating new Artist
- Artist picasso = context.newObject(Artist.class);
- picasso.setName("Pablo Picasso");
-
- // Creating other objects
- Gallery metropolitan = context.newObject(Gallery.class);
- metropolitan.setName("Metropolitan Museum of Art");
-
- Painting girl = context.newObject(Painting.class);
- girl.setName("Girl Reading at a Table");
-
- Painting stein = context.newObject(Painting.class);
- stein.setName("Gertrude Stein");
-
- // connecting objects together via relationships
- picasso.addToPaintings(girl);
- picasso.addToPaintings(stein);
-
- girl.setGallery(metropolitan);
- stein.setGallery(metropolitan);
-
- // saving all the changes above
- context.commitChanges();
- }
-
- static void selectTutorial(ObjectContext context) {
- // ObjectSelect examples
- List<Painting> paintings1 = ObjectSelect.query(Painting.class).select(context);
-
- List<Painting> paintings2 = ObjectSelect.query(Painting.class)
- .where(Painting.NAME.likeIgnoreCase("gi%")).select(context);
- }
-
- static void deleteTutorial(ObjectContext context) {
- // Delete object example
- Artist picasso = ObjectSelect.query(Artist.class).where(Artist.NAME.eq("Pablo Picasso")).selectOne(context);
-
- if (picasso != null) {
- context.deleteObjects(picasso);
- context.commitChanges();
- }
- }
-}
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java
deleted file mode 100644
index 2bb394411..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Painting;
-
-/**
- * A persistent class mapped as "Painting" Cayenne entity.
- */
-public class Painting extends _Painting {
-
-}
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
deleted file mode 100644
index 052709b71..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import java.time.LocalDate;
-import java.util.List;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.exp.property.DateProperty;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-import org.apache.cayenne.util.PersistentObjectList;
-
-/**
- * A generated persistent class mapped as "Artist" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Artist extends PersistentObject {
-
- public static final DateProperty<LocalDate> DATE_OF_BIRTH = PropertyFactory.createDate("dateOfBirth", LocalDate.class);
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected LocalDate dateOfBirth;
- protected String name;
- protected List<Painting> paintings;
-
- public LocalDate getDateOfBirth() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "dateOfBirth", false);
- }
-
- return dateOfBirth;
- }
-
- public void setDateOfBirth(LocalDate dateOfBirth) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "dateOfBirth", false);
- objectContext.propertyChanged(this, "dateOfBirth", this.dateOfBirth, dateOfBirth);
- }
-
- this.dateOfBirth = dateOfBirth;
- }
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public List<Painting> getPaintings() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- return paintings;
- }
-
- public void addToPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.add(object);
- }
-
- public void removeFromPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.remove(object);
- }
-
-}
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Datamap.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Datamap.java
deleted file mode 100644
index bfb26721a..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Datamap.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-
-
-/**
- * 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 _Datamap {
-}
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
deleted file mode 100644
index 57ccb07ba..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import java.util.List;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-import org.apache.cayenne.util.PersistentObjectList;
-
-/**
- * A generated persistent class mapped as "Gallery" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Gallery extends PersistentObject {
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected String name;
- protected List<Painting> paintings;
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public List<Painting> getPaintings() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- return paintings;
- }
-
- public void addToPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.add(object);
- }
-
- public void removeFromPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.remove(object);
- }
-
-}
diff --git a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java b/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
deleted file mode 100644
index d6a4db2d7..000000000
--- a/tutorials/tutorial-rop-client/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.ValueHolder;
-import org.apache.cayenne.exp.property.EntityProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Artist;
-import org.apache.cayenne.tutorial.persistent.client.Gallery;
-import org.apache.cayenne.util.PersistentObjectHolder;
-
-/**
- * A generated persistent class mapped as "Painting" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Painting extends PersistentObject {
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final EntityProperty<org.apache.cayenne.tutorial.persistent.client.Artist> ARTIST = PropertyFactory.createEntity("artist", org.apache.cayenne.tutorial.persistent.client.Artist.class);
- public static final EntityProperty<org.apache.cayenne.tutorial.persistent.client.Gallery> GALLERY = PropertyFactory.createEntity("gallery", org.apache.cayenne.tutorial.persistent.client.Gallery.class);
-
- protected String name;
- protected ValueHolder<Artist> artist;
- protected ValueHolder<Gallery> gallery;
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public Artist getArtist() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "artist", true);
- } else if (this.artist == null) {
- this.artist = new PersistentObjectHolder<>(this, "artist");
- }
-
- return artist.getValue();
- }
-
- public void setArtist(Artist artist) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "artist", true);
- objectContext.propertyChanged(this, "artist", this.artist.getValueDirectly(), artist);
- } else if (this.artist == null) {
- this.artist = new PersistentObjectHolder<>(this, "artist");
- }
-
- this.artist.setValue(artist);
- }
-
- public Gallery getGallery() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "gallery", true);
- } else if (this.gallery == null) {
- this.gallery = new PersistentObjectHolder<>(this, "gallery");
- }
-
- return gallery.getValue();
- }
-
- public void setGallery(Gallery gallery) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "gallery", true);
- objectContext.propertyChanged(this, "gallery", this.gallery.getValueDirectly(), gallery);
- } else if (this.gallery == null) {
- this.gallery = new PersistentObjectHolder<>(this, "gallery");
- }
-
- this.gallery.setValue(gallery);
- }
-
-}
diff --git a/tutorials/tutorial-rop-client/src/main/resources/.gitignore b/tutorials/tutorial-rop-client/src/main/resources/.gitignore
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tutorials/tutorial-rop-client/src/test/java/.gitignore b/tutorials/tutorial-rop-client/src/test/java/.gitignore
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tutorials/tutorial-rop-client/src/test/resources/.gitignore b/tutorials/tutorial-rop-client/src/test/resources/.gitignore
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tutorials/tutorial-rop-server-http2/pom.xml b/tutorials/tutorial-rop-server-http2/pom.xml
deleted file mode 100644
index 39698013e..000000000
--- a/tutorials/tutorial-rop-server-http2/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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
- https://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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>cayenne-tutorials-parent</artifactId>
- <groupId>org.apache.cayenne.tutorials</groupId>
- <version>4.3.M1-SNAPSHOT</version>
- </parent>
-
- <artifactId>tutorial-rop-server-http2</artifactId>
- <name>tutorial-rop-server-http2: Cayenne ROP HTTP/2 Server Tutorial</name>
- <packaging>jar</packaging>
-
- <properties>
- <main.class>org.apache.cayenne.tutorial.Http2Server</main.class>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-protostuff</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <!-- Jetty's dependencies-->
- <dependency>
- <groupId>org.eclipse.jetty.http2</groupId>
- <artifactId>http2-server</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlet</artifactId>
- <version>${jetty.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlets</artifactId>
- <version>${jetty.version}</version>
- </dependency>
-
- </dependencies>
-
-</project>
\ No newline at end of file
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/Http2ROPServlet.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/Http2ROPServlet.java
deleted file mode 100644
index 14c2497f4..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/Http2ROPServlet.java
+++ /dev/null
@@ -1,66 +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
- * <p>
- * https://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tutorial;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import java.util.Collection;
-import java.util.Map;
-
-import org.apache.cayenne.configuration.rop.server.ROPServerModule;
-import org.apache.cayenne.configuration.server.ServerRuntime;
-import org.apache.cayenne.configuration.web.WebConfiguration;
-import org.apache.cayenne.configuration.web.WebUtil;
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.remote.RemoteService;
-import org.apache.cayenne.rop.ROPSerializationService;
-import org.apache.cayenne.rop.ROPServlet;
-
-public class Http2ROPServlet extends ROPServlet {
-
- @Override
- public void init(ServletConfig configuration) throws ServletException {
-
- checkAlreadyConfigured(configuration.getServletContext());
-
- this.servletContext = configuration.getServletContext();
-
- WebConfiguration configAdapter = new WebConfiguration(configuration);
-
- String configurationLocation = configAdapter.getConfigurationLocation();
- Map<String, String> eventBridgeParameters = configAdapter.getOtherParameters();
-
- Collection<Module> modules = configAdapter.createModules();
-
- ServerRuntime runtime = ServerRuntime
- .builder()
- .addConfig(configurationLocation)
- .addModule(binder ->
- ROPServerModule.contributeROPBridgeProperties(binder).putAll(eventBridgeParameters))
- .addModules(modules)
- .build();
-
- this.remoteService = runtime.getInjector().getInstance(RemoteService.class);
- this.serializationService = runtime.getInjector().getInstance(ROPSerializationService.class);
-
- WebUtil.setCayenneRuntime(servletContext, runtime);
- }
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/Http2Server.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/Http2Server.java
deleted file mode 100644
index 80470e4df..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/Http2Server.java
+++ /dev/null
@@ -1,114 +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
- * <p>
- * https://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tutorial;
-
-import org.eclipse.jetty.http2.HTTP2Cipher;
-import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
-import org.eclipse.jetty.security.ConstraintMapping;
-import org.eclipse.jetty.security.ConstraintSecurityHandler;
-import org.eclipse.jetty.security.HashLoginService;
-import org.eclipse.jetty.security.SecurityHandler;
-import org.eclipse.jetty.security.UserStore;
-import org.eclipse.jetty.security.authentication.BasicAuthenticator;
-import org.eclipse.jetty.server.HttpConfiguration;
-import org.eclipse.jetty.server.SecureRequestCustomizer;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.ServerConnector;
-import org.eclipse.jetty.server.SslConnectionFactory;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.util.security.Constraint;
-import org.eclipse.jetty.util.security.Credential;
-import org.eclipse.jetty.util.ssl.SslContextFactory;
-
-import static org.eclipse.jetty.util.resource.Resource.newClassPathResource;
-
-/**
- * Based on the example org.eclipse.jetty.embedded.Http2Server included in the jetty-project distribution.
- * <p>
- * This server works without ALPN and could handle only HTTP/2 protocol.
- */
-public class Http2Server {
-
- public static void main(String... args) throws Exception {
- // Setting Protostuff properties
- System.setProperty("protostuff.runtime.collection_schema_on_repeated_fields", "true");
- System.setProperty("protostuff.runtime.morph_collection_interfaces", "true");
- System.setProperty("protostuff.runtime.morph_map_interfaces", "true");
- System.setProperty("protostuff.runtime.pojo_schema_on_collection_fields", "true");
- System.setProperty("protostuff.runtime.pojo_schema_on_map_fields", "true");
-
- Server server = new Server();
-
- ServletContextHandler context = new ServletContextHandler(server, "/", ServletContextHandler.SESSIONS);
- context.addServlet(new ServletHolder("cayenne-project", new Http2ROPServlet()), "/");
- context.setSecurityHandler(basicAuth("cayenne-user", "secret", "Cayenne Realm"));
- server.setHandler(context);
-
- // HTTPS Configuration
- HttpConfiguration httpsConfig = new HttpConfiguration();
- httpsConfig.setSecureScheme("https");
- httpsConfig.setSecurePort(8443);
- httpsConfig.addCustomizer(new SecureRequestCustomizer());
-
- // SSL Context Factory for HTTPS and HTTP/2
- SslContextFactory sslContextFactory = new SslContextFactory();
- sslContextFactory.setKeyStoreResource(newClassPathResource("keystore"));
- sslContextFactory.setKeyStorePassword("OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4");
- sslContextFactory.setKeyManagerPassword("OBF:1u2u1wml1z7s1z7a1wnl1u2g");
- sslContextFactory.setCipherComparator(HTTP2Cipher.COMPARATOR);
-
- // SSL Connection Factory
- SslConnectionFactory ssl = new SslConnectionFactory(sslContextFactory, "h2");
-
- // HTTP/2 Connector
- ServerConnector http2Connector = new ServerConnector(server, ssl, new HTTP2ServerConnectionFactory(httpsConfig));
- http2Connector.setPort(8443);
- server.addConnector(http2Connector);
-
- server.start();
- server.join();
- }
-
- private static SecurityHandler basicAuth(String username, String password, String realm) {
- HashLoginService loginService = new HashLoginService();
- UserStore userStore = new UserStore();
- userStore.addUser(username, Credential.getCredential(password), new String[]{"cayenne-service-user"});
- loginService.setUserStore(userStore);
- loginService.setName(realm);
-
- Constraint constraint = new Constraint();
- constraint.setName(Constraint.__BASIC_AUTH);
- constraint.setRoles(new String[]{"cayenne-service-user"});
- constraint.setAuthenticate(true);
-
- ConstraintMapping constraintMapping = new ConstraintMapping();
- constraintMapping.setConstraint(constraint);
- constraintMapping.setPathSpec("/*");
-
- ConstraintSecurityHandler constraintSecurityHandler = new ConstraintSecurityHandler();
- constraintSecurityHandler.setAuthenticator(new BasicAuthenticator());
- constraintSecurityHandler.setRealmName(realm);
- constraintSecurityHandler.addConstraintMapping(constraintMapping);
- constraintSecurityHandler.setLoginService(loginService);
-
- return constraintSecurityHandler;
- }
-}
\ No newline at end of file
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Artist.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Artist.java
deleted file mode 100644
index bab14077d..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Artist.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent;
-
-import org.apache.cayenne.tutorial.persistent.auto._Artist;
-
-public class Artist extends _Artist {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Gallery.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Gallery.java
deleted file mode 100644
index cfcf3c800..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Gallery.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent;
-
-import org.apache.cayenne.tutorial.persistent.auto._Gallery;
-
-public class Gallery extends _Gallery {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Painting.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Painting.java
deleted file mode 100644
index 2a9a91c3a..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/Painting.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent;
-
-import org.apache.cayenne.tutorial.persistent.auto._Painting;
-
-public class Painting extends _Painting {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
deleted file mode 100644
index 5ff782323..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.auto;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.time.LocalDate;
-import java.util.List;
-
-import org.apache.cayenne.BaseDataObject;
-import org.apache.cayenne.exp.property.DateProperty;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.Painting;
-
-/**
- * Class _Artist 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 abstract class _Artist extends BaseDataObject {
-
- private static final long serialVersionUID = 1L;
-
- public static final String ID_PK_COLUMN = "ID";
-
- public static final DateProperty<LocalDate> DATE_OF_BIRTH = PropertyFactory.createDate("dateOfBirth", LocalDate.class);
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected LocalDate dateOfBirth;
- protected String name;
-
- protected Object paintings;
-
- public void setDateOfBirth(LocalDate dateOfBirth) {
- beforePropertyWrite("dateOfBirth", this.dateOfBirth, dateOfBirth);
- this.dateOfBirth = dateOfBirth;
- }
-
- public LocalDate getDateOfBirth() {
- beforePropertyRead("dateOfBirth");
- return this.dateOfBirth;
- }
-
- public void setName(String name) {
- beforePropertyWrite("name", this.name, name);
- this.name = name;
- }
-
- public String getName() {
- beforePropertyRead("name");
- return this.name;
- }
-
- public void addToPaintings(Painting obj) {
- addToManyTarget("paintings", obj, true);
- }
-
- public void removeFromPaintings(Painting obj) {
- removeToManyTarget("paintings", obj, true);
- }
-
- @SuppressWarnings("unchecked")
- public List<Painting> getPaintings() {
- return (List<Painting>)readProperty("paintings");
- }
-
- @Override
- public Object readPropertyDirectly(String propName) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch(propName) {
- case "dateOfBirth":
- return this.dateOfBirth;
- case "name":
- return this.name;
- case "paintings":
- return this.paintings;
- default:
- return super.readPropertyDirectly(propName);
- }
- }
-
- @Override
- public void writePropertyDirectly(String propName, Object val) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch (propName) {
- case "dateOfBirth":
- this.dateOfBirth = (LocalDate)val;
- break;
- case "name":
- this.name = (String)val;
- break;
- case "paintings":
- this.paintings = val;
- break;
- default:
- super.writePropertyDirectly(propName, val);
- }
- }
-
- private void writeObject(ObjectOutputStream out) throws IOException {
- writeSerialized(out);
- }
-
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- readSerialized(in);
- }
-
- @Override
- protected void writeState(ObjectOutputStream out) throws IOException {
- super.writeState(out);
- out.writeObject(this.dateOfBirth);
- out.writeObject(this.name);
- out.writeObject(this.paintings);
- }
-
- @Override
- protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
- super.readState(in);
- this.dateOfBirth = (LocalDate)in.readObject();
- this.name = (String)in.readObject();
- this.paintings = in.readObject();
- }
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
deleted file mode 100644
index 0dfd94185..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.auto;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.List;
-
-import org.apache.cayenne.BaseDataObject;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.Painting;
-
-/**
- * Class _Gallery 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 abstract class _Gallery extends BaseDataObject {
-
- private static final long serialVersionUID = 1L;
-
- public static final String ID_PK_COLUMN = "ID";
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected String name;
-
- protected Object paintings;
-
- public void setName(String name) {
- beforePropertyWrite("name", this.name, name);
- this.name = name;
- }
-
- public String getName() {
- beforePropertyRead("name");
- return this.name;
- }
-
- public void addToPaintings(Painting obj) {
- addToManyTarget("paintings", obj, true);
- }
-
- public void removeFromPaintings(Painting obj) {
- removeToManyTarget("paintings", obj, true);
- }
-
- @SuppressWarnings("unchecked")
- public List<Painting> getPaintings() {
- return (List<Painting>)readProperty("paintings");
- }
-
- @Override
- public Object readPropertyDirectly(String propName) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch(propName) {
- case "name":
- return this.name;
- case "paintings":
- return this.paintings;
- default:
- return super.readPropertyDirectly(propName);
- }
- }
-
- @Override
- public void writePropertyDirectly(String propName, Object val) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch (propName) {
- case "name":
- this.name = (String)val;
- break;
- case "paintings":
- this.paintings = val;
- break;
- default:
- super.writePropertyDirectly(propName, val);
- }
- }
-
- private void writeObject(ObjectOutputStream out) throws IOException {
- writeSerialized(out);
- }
-
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- readSerialized(in);
- }
-
- @Override
- protected void writeState(ObjectOutputStream out) throws IOException {
- super.writeState(out);
- out.writeObject(this.name);
- out.writeObject(this.paintings);
- }
-
- @Override
- protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
- super.readState(in);
- this.name = (String)in.readObject();
- this.paintings = in.readObject();
- }
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
deleted file mode 100644
index e15e25f83..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.auto;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.apache.cayenne.BaseDataObject;
-import org.apache.cayenne.exp.property.EntityProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.Artist;
-import org.apache.cayenne.tutorial.persistent.Gallery;
-
-/**
- * Class _Painting 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 abstract class _Painting extends BaseDataObject {
-
- private static final long serialVersionUID = 1L;
-
- public static final String ID_PK_COLUMN = "ID";
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final EntityProperty<org.apache.cayenne.tutorial.persistent.Artist> ARTIST = PropertyFactory.createEntity("artist", org.apache.cayenne.tutorial.persistent.Artist.class);
- public static final EntityProperty<org.apache.cayenne.tutorial.persistent.Gallery> GALLERY = PropertyFactory.createEntity("gallery", org.apache.cayenne.tutorial.persistent.Gallery.class);
-
- protected String name;
-
- protected Object artist;
- protected Object gallery;
-
- public void setName(String name) {
- beforePropertyWrite("name", this.name, name);
- this.name = name;
- }
-
- public String getName() {
- beforePropertyRead("name");
- return this.name;
- }
-
- public void setArtist(Artist artist) {
- setToOneTarget("artist", artist, true);
- }
-
- public Artist getArtist() {
- return (Artist)readProperty("artist");
- }
-
- public void setGallery(Gallery gallery) {
- setToOneTarget("gallery", gallery, true);
- }
-
- public Gallery getGallery() {
- return (Gallery)readProperty("gallery");
- }
-
- @Override
- public Object readPropertyDirectly(String propName) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch(propName) {
- case "name":
- return this.name;
- case "artist":
- return this.artist;
- case "gallery":
- return this.gallery;
- default:
- return super.readPropertyDirectly(propName);
- }
- }
-
- @Override
- public void writePropertyDirectly(String propName, Object val) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch (propName) {
- case "name":
- this.name = (String)val;
- break;
- case "artist":
- this.artist = val;
- break;
- case "gallery":
- this.gallery = val;
- break;
- default:
- super.writePropertyDirectly(propName, val);
- }
- }
-
- private void writeObject(ObjectOutputStream out) throws IOException {
- writeSerialized(out);
- }
-
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- readSerialized(in);
- }
-
- @Override
- protected void writeState(ObjectOutputStream out) throws IOException {
- super.writeState(out);
- out.writeObject(this.name);
- out.writeObject(this.artist);
- out.writeObject(this.gallery);
- }
-
- @Override
- protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
- super.readState(in);
- this.name = (String)in.readObject();
- this.artist = in.readObject();
- this.gallery = in.readObject();
- }
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java
deleted file mode 100644
index 154987f9e..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java
+++ /dev/null
@@ -1,31 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Artist;
-
-/**
- * A persistent class mapped as "Artist" Cayenne entity.
- */
-public class Artist extends _Artist {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java
deleted file mode 100644
index 95400a112..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java
+++ /dev/null
@@ -1,31 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Gallery;
-
-/**
- * A persistent class mapped as "Gallery" Cayenne entity.
- */
-public class Gallery extends _Gallery {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java
deleted file mode 100644
index 768407449..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java
+++ /dev/null
@@ -1,31 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Painting;
-
-/**
- * A persistent class mapped as "Painting" Cayenne entity.
- */
-public class Painting extends _Painting {
-
- private static final long serialVersionUID = 1L;
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
deleted file mode 100644
index 052709b71..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import java.time.LocalDate;
-import java.util.List;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.exp.property.DateProperty;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-import org.apache.cayenne.util.PersistentObjectList;
-
-/**
- * A generated persistent class mapped as "Artist" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Artist extends PersistentObject {
-
- public static final DateProperty<LocalDate> DATE_OF_BIRTH = PropertyFactory.createDate("dateOfBirth", LocalDate.class);
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected LocalDate dateOfBirth;
- protected String name;
- protected List<Painting> paintings;
-
- public LocalDate getDateOfBirth() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "dateOfBirth", false);
- }
-
- return dateOfBirth;
- }
-
- public void setDateOfBirth(LocalDate dateOfBirth) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "dateOfBirth", false);
- objectContext.propertyChanged(this, "dateOfBirth", this.dateOfBirth, dateOfBirth);
- }
-
- this.dateOfBirth = dateOfBirth;
- }
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public List<Painting> getPaintings() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- return paintings;
- }
-
- public void addToPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.add(object);
- }
-
- public void removeFromPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.remove(object);
- }
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
deleted file mode 100644
index 57ccb07ba..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import java.util.List;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-import org.apache.cayenne.util.PersistentObjectList;
-
-/**
- * A generated persistent class mapped as "Gallery" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Gallery extends PersistentObject {
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected String name;
- protected List<Painting> paintings;
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public List<Painting> getPaintings() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- return paintings;
- }
-
- public void addToPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.add(object);
- }
-
- public void removeFromPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.remove(object);
- }
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java b/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
deleted file mode 100644
index ec9511a16..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.ValueHolder;
-import org.apache.cayenne.exp.property.EntityProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Artist;
-import org.apache.cayenne.tutorial.persistent.client.Gallery;
-import org.apache.cayenne.util.PersistentObjectHolder;
-
-/**
- * A generated persistent class mapped as "Painting" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Painting extends PersistentObject {
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final EntityProperty<Artist> ARTIST = PropertyFactory.createEntity("artist", Artist.class);
- public static final EntityProperty<Gallery> GALLERY = PropertyFactory.createEntity("gallery", Gallery.class);
-
- protected String name;
- protected ValueHolder<Artist> artist;
- protected ValueHolder<Gallery> gallery;
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public Artist getArtist() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "artist", true);
- } else if (this.artist == null) {
- this.artist = new PersistentObjectHolder<>(this, "artist");
- }
-
- return artist.getValue();
- }
-
- public void setArtist(Artist artist) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "artist", true);
- } else if (this.artist == null) {
- this.artist = new PersistentObjectHolder<>(this, "artist");
- }
-
- this.artist.setValue(artist);
- }
-
- public Gallery getGallery() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "gallery", true);
- } else if (this.gallery == null) {
- this.gallery = new PersistentObjectHolder<>(this, "gallery");
- }
-
- return gallery.getValue();
- }
-
- public void setGallery(Gallery gallery) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "gallery", true);
- } else if (this.gallery == null) {
- this.gallery = new PersistentObjectHolder<>(this, "gallery");
- }
-
- this.gallery.setValue(gallery);
- }
-
-}
diff --git a/tutorials/tutorial-rop-server-http2/src/main/resources/cayenne-project.xml b/tutorials/tutorial-rop-server-http2/src/main/resources/cayenne-project.xml
deleted file mode 100644
index 27b1c1b1d..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/resources/cayenne-project.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<domain xmlns="http://cayenne.apache.org/schema/10/domain"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://cayenne.apache.org/schema/10/domain http://cayenne.apache.org/schema/10/domain.xsd"
- project-version="10">
- <map name="datamap"/>
- <node name="datanode"
- factory="org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory"
- schema-update-strategy="org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy">
- <map-ref name="datamap"/>
- <data-source>
- <driver value="org.apache.derby.jdbc.EmbeddedDriver"/>
- <url value="jdbc:derby:memory:testdb;create=true"/>
- <connectionPool min="1" max="1"/>
- <login/>
- </data-source>
- </node>
-</domain>
diff --git a/tutorials/tutorial-rop-server-http2/src/main/resources/datamap.map.xml b/tutorials/tutorial-rop-server-http2/src/main/resources/datamap.map.xml
deleted file mode 100644
index f87928816..000000000
--- a/tutorials/tutorial-rop-server-http2/src/main/resources/datamap.map.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/10/modelMap"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://cayenne.apache.org/schema/10/modelMap http://cayenne.apache.org/schema/10/modelMap.xsd"
- project-version="10">
- <property name="defaultPackage" value="org.apache.cayenne.tutorial.persistent"/>
- <property name="clientSupported" value="true"/>
- <property name="defaultClientPackage" value="org.apache.cayenne.tutorial.persistent.client"/>
- <db-entity name="ARTIST">
- <db-attribute name="DATE_OF_BIRTH" type="DATE"/>
- <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
- <db-attribute name="NAME" type="VARCHAR" length="200"/>
- </db-entity>
- <db-entity name="GALLERY">
- <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
- <db-attribute name="NAME" type="VARCHAR" length="200"/>
- </db-entity>
- <db-entity name="PAINTING">
- <db-attribute name="ARTIST_ID" type="INTEGER"/>
- <db-attribute name="GALLERY_ID" type="INTEGER"/>
- <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
- <db-attribute name="NAME" type="VARCHAR" length="200"/>
- </db-entity>
- <obj-entity name="Artist" className="org.apache.cayenne.tutorial.persistent.Artist" clientClassName="org.apache.cayenne.tutorial.persistent.client.Artist" dbEntityName="ARTIST">
- <obj-attribute name="dateOfBirth" type="java.time.LocalDate" db-attribute-path="DATE_OF_BIRTH"/>
- <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
- </obj-entity>
- <obj-entity name="Gallery" className="org.apache.cayenne.tutorial.persistent.Gallery" clientClassName="org.apache.cayenne.tutorial.persistent.client.Gallery" dbEntityName="GALLERY">
- <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
- </obj-entity>
- <obj-entity name="Painting" className="org.apache.cayenne.tutorial.persistent.Painting" clientClassName="org.apache.cayenne.tutorial.persistent.client.Painting" dbEntityName="PAINTING">
- <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
- </obj-entity>
- <db-relationship name="paintings" source="ARTIST" target="PAINTING" toMany="true">
- <db-attribute-pair source="ID" target="ARTIST_ID"/>
- </db-relationship>
- <db-relationship name="paintings" source="GALLERY" target="PAINTING" toMany="true">
- <db-attribute-pair source="ID" target="GALLERY_ID"/>
- </db-relationship>
- <db-relationship name="artist" source="PAINTING" target="ARTIST">
- <db-attribute-pair source="ARTIST_ID" target="ID"/>
- </db-relationship>
- <db-relationship name="gallery" source="PAINTING" target="GALLERY">
- <db-attribute-pair source="GALLERY_ID" target="ID"/>
- </db-relationship>
- <obj-relationship name="paintings" source="Artist" target="Painting" deleteRule="Cascade" db-relationship-path="paintings"/>
- <obj-relationship name="paintings" source="Gallery" target="Painting" deleteRule="Nullify" db-relationship-path="paintings"/>
- <obj-relationship name="artist" source="Painting" target="Artist" deleteRule="Nullify" db-relationship-path="artist"/>
- <obj-relationship name="gallery" source="Painting" target="Gallery" deleteRule="Nullify" db-relationship-path="gallery"/>
-</data-map>
diff --git a/tutorials/tutorial-rop-server-http2/src/main/resources/keystore b/tutorials/tutorial-rop-server-http2/src/main/resources/keystore
deleted file mode 100644
index d6592f95e..000000000
Binary files a/tutorials/tutorial-rop-server-http2/src/main/resources/keystore and /dev/null differ
diff --git a/tutorials/tutorial-rop-server/pom.xml b/tutorials/tutorial-rop-server/pom.xml
deleted file mode 100644
index cc5a094ad..000000000
--- a/tutorials/tutorial-rop-server/pom.xml
+++ /dev/null
@@ -1,76 +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
-
- https://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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.cayenne.tutorials</groupId>
- <artifactId>cayenne-tutorials-parent</artifactId>
- <version>4.3.M1-SNAPSHOT</version>
- </parent>
-
- <artifactId>tutorial-rop-server</artifactId>
- <name>tutorial-rop-server: Cayenne ROP Server Tutorial</name>
- <packaging>war</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-rop-server</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.caucho</groupId>
- <artifactId>hessian</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>${jetty.version}</version>
- <configuration>
- <loginServices>
- <loginService implementation="org.eclipse.jetty.security.HashLoginService">
- <name>Cayenne Realm</name>
- <config>realm.properties</config>
- </loginService>
- </loginServices>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/tutorials/tutorial-rop-server/realm.properties b/tutorials/tutorial-rop-server/realm.properties
deleted file mode 100644
index 63a80d22d..000000000
--- a/tutorials/tutorial-rop-server/realm.properties
+++ /dev/null
@@ -1,16 +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
-#
-# https://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.
-
-cayenne-user: secret,cayenne-service-user
\ No newline at end of file
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Artist.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Artist.java
deleted file mode 100644
index ef90379a9..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Artist.java
+++ /dev/null
@@ -1,50 +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
- *
- * https://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.tutorial.persistent;
-
-import java.time.LocalDate;
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeParseException;
-
-import org.apache.cayenne.tutorial.persistent.auto._Artist;
-
-public class Artist extends _Artist {
-
- static final String DEFAULT_DATE_FORMAT = "yyyyMMdd";
-
- /**
- * Sets date of birth using a string in format yyyyMMdd.
- */
- public void setDateOfBirthString(String yearMonthDay) {
- if (yearMonthDay == null) {
- setDateOfBirth(null);
- } else {
-
- LocalDate date;
- try {
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT);
- date = LocalDate.parse(yearMonthDay, formatter);
- } catch (DateTimeParseException e) {
- throw new IllegalArgumentException("A date argument must be in format '"
- + DEFAULT_DATE_FORMAT + "': " + yearMonthDay);
- }
- setDateOfBirth(date);
- }
- }
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Datamap.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Datamap.java
deleted file mode 100644
index ddf2ddf45..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Datamap.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
- *
- * https://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.tutorial.persistent;
-
-import org.apache.cayenne.tutorial.persistent.auto._Datamap;
-
-public class Datamap extends _Datamap {
-
- private static Datamap instance;
-
- private Datamap() {}
-
- public static Datamap getInstance() {
- if(instance == null) {
- instance = new Datamap();
- }
-
- return instance;
- }
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Gallery.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Gallery.java
deleted file mode 100644
index 2553b0904..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Gallery.java
+++ /dev/null
@@ -1,25 +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
- *
- * https://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.tutorial.persistent;
-
-import org.apache.cayenne.tutorial.persistent.auto._Gallery;
-
-public class Gallery extends _Gallery {
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Painting.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Painting.java
deleted file mode 100644
index f1364b0b0..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/Painting.java
+++ /dev/null
@@ -1,25 +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
- *
- * https://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.tutorial.persistent;
-
-import org.apache.cayenne.tutorial.persistent.auto._Painting;
-
-public class Painting extends _Painting {
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
deleted file mode 100644
index 5ff782323..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Artist.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.auto;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.time.LocalDate;
-import java.util.List;
-
-import org.apache.cayenne.BaseDataObject;
-import org.apache.cayenne.exp.property.DateProperty;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.Painting;
-
-/**
- * Class _Artist 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 abstract class _Artist extends BaseDataObject {
-
- private static final long serialVersionUID = 1L;
-
- public static final String ID_PK_COLUMN = "ID";
-
- public static final DateProperty<LocalDate> DATE_OF_BIRTH = PropertyFactory.createDate("dateOfBirth", LocalDate.class);
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected LocalDate dateOfBirth;
- protected String name;
-
- protected Object paintings;
-
- public void setDateOfBirth(LocalDate dateOfBirth) {
- beforePropertyWrite("dateOfBirth", this.dateOfBirth, dateOfBirth);
- this.dateOfBirth = dateOfBirth;
- }
-
- public LocalDate getDateOfBirth() {
- beforePropertyRead("dateOfBirth");
- return this.dateOfBirth;
- }
-
- public void setName(String name) {
- beforePropertyWrite("name", this.name, name);
- this.name = name;
- }
-
- public String getName() {
- beforePropertyRead("name");
- return this.name;
- }
-
- public void addToPaintings(Painting obj) {
- addToManyTarget("paintings", obj, true);
- }
-
- public void removeFromPaintings(Painting obj) {
- removeToManyTarget("paintings", obj, true);
- }
-
- @SuppressWarnings("unchecked")
- public List<Painting> getPaintings() {
- return (List<Painting>)readProperty("paintings");
- }
-
- @Override
- public Object readPropertyDirectly(String propName) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch(propName) {
- case "dateOfBirth":
- return this.dateOfBirth;
- case "name":
- return this.name;
- case "paintings":
- return this.paintings;
- default:
- return super.readPropertyDirectly(propName);
- }
- }
-
- @Override
- public void writePropertyDirectly(String propName, Object val) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch (propName) {
- case "dateOfBirth":
- this.dateOfBirth = (LocalDate)val;
- break;
- case "name":
- this.name = (String)val;
- break;
- case "paintings":
- this.paintings = val;
- break;
- default:
- super.writePropertyDirectly(propName, val);
- }
- }
-
- private void writeObject(ObjectOutputStream out) throws IOException {
- writeSerialized(out);
- }
-
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- readSerialized(in);
- }
-
- @Override
- protected void writeState(ObjectOutputStream out) throws IOException {
- super.writeState(out);
- out.writeObject(this.dateOfBirth);
- out.writeObject(this.name);
- out.writeObject(this.paintings);
- }
-
- @Override
- protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
- super.readState(in);
- this.dateOfBirth = (LocalDate)in.readObject();
- this.name = (String)in.readObject();
- this.paintings = in.readObject();
- }
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Datamap.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Datamap.java
deleted file mode 100644
index acb07cc77..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Datamap.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.auto;
-
-
-
-/**
- * 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 _Datamap {
-}
\ No newline at end of file
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
deleted file mode 100644
index 0dfd94185..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Gallery.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.auto;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.List;
-
-import org.apache.cayenne.BaseDataObject;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.Painting;
-
-/**
- * Class _Gallery 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 abstract class _Gallery extends BaseDataObject {
-
- private static final long serialVersionUID = 1L;
-
- public static final String ID_PK_COLUMN = "ID";
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected String name;
-
- protected Object paintings;
-
- public void setName(String name) {
- beforePropertyWrite("name", this.name, name);
- this.name = name;
- }
-
- public String getName() {
- beforePropertyRead("name");
- return this.name;
- }
-
- public void addToPaintings(Painting obj) {
- addToManyTarget("paintings", obj, true);
- }
-
- public void removeFromPaintings(Painting obj) {
- removeToManyTarget("paintings", obj, true);
- }
-
- @SuppressWarnings("unchecked")
- public List<Painting> getPaintings() {
- return (List<Painting>)readProperty("paintings");
- }
-
- @Override
- public Object readPropertyDirectly(String propName) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch(propName) {
- case "name":
- return this.name;
- case "paintings":
- return this.paintings;
- default:
- return super.readPropertyDirectly(propName);
- }
- }
-
- @Override
- public void writePropertyDirectly(String propName, Object val) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch (propName) {
- case "name":
- this.name = (String)val;
- break;
- case "paintings":
- this.paintings = val;
- break;
- default:
- super.writePropertyDirectly(propName, val);
- }
- }
-
- private void writeObject(ObjectOutputStream out) throws IOException {
- writeSerialized(out);
- }
-
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- readSerialized(in);
- }
-
- @Override
- protected void writeState(ObjectOutputStream out) throws IOException {
- super.writeState(out);
- out.writeObject(this.name);
- out.writeObject(this.paintings);
- }
-
- @Override
- protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
- super.readState(in);
- this.name = (String)in.readObject();
- this.paintings = in.readObject();
- }
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
deleted file mode 100644
index e15e25f83..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/auto/_Painting.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.auto;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.apache.cayenne.BaseDataObject;
-import org.apache.cayenne.exp.property.EntityProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.Artist;
-import org.apache.cayenne.tutorial.persistent.Gallery;
-
-/**
- * Class _Painting 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 abstract class _Painting extends BaseDataObject {
-
- private static final long serialVersionUID = 1L;
-
- public static final String ID_PK_COLUMN = "ID";
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final EntityProperty<org.apache.cayenne.tutorial.persistent.Artist> ARTIST = PropertyFactory.createEntity("artist", org.apache.cayenne.tutorial.persistent.Artist.class);
- public static final EntityProperty<org.apache.cayenne.tutorial.persistent.Gallery> GALLERY = PropertyFactory.createEntity("gallery", org.apache.cayenne.tutorial.persistent.Gallery.class);
-
- protected String name;
-
- protected Object artist;
- protected Object gallery;
-
- public void setName(String name) {
- beforePropertyWrite("name", this.name, name);
- this.name = name;
- }
-
- public String getName() {
- beforePropertyRead("name");
- return this.name;
- }
-
- public void setArtist(Artist artist) {
- setToOneTarget("artist", artist, true);
- }
-
- public Artist getArtist() {
- return (Artist)readProperty("artist");
- }
-
- public void setGallery(Gallery gallery) {
- setToOneTarget("gallery", gallery, true);
- }
-
- public Gallery getGallery() {
- return (Gallery)readProperty("gallery");
- }
-
- @Override
- public Object readPropertyDirectly(String propName) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch(propName) {
- case "name":
- return this.name;
- case "artist":
- return this.artist;
- case "gallery":
- return this.gallery;
- default:
- return super.readPropertyDirectly(propName);
- }
- }
-
- @Override
- public void writePropertyDirectly(String propName, Object val) {
- if(propName == null) {
- throw new IllegalArgumentException();
- }
-
- switch (propName) {
- case "name":
- this.name = (String)val;
- break;
- case "artist":
- this.artist = val;
- break;
- case "gallery":
- this.gallery = val;
- break;
- default:
- super.writePropertyDirectly(propName, val);
- }
- }
-
- private void writeObject(ObjectOutputStream out) throws IOException {
- writeSerialized(out);
- }
-
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- readSerialized(in);
- }
-
- @Override
- protected void writeState(ObjectOutputStream out) throws IOException {
- super.writeState(out);
- out.writeObject(this.name);
- out.writeObject(this.artist);
- out.writeObject(this.gallery);
- }
-
- @Override
- protected void readState(ObjectInputStream in) throws IOException, ClassNotFoundException {
- super.readState(in);
- this.name = (String)in.readObject();
- this.artist = in.readObject();
- this.gallery = in.readObject();
- }
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java
deleted file mode 100644
index ef55bda7e..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Artist.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Artist;
-
-/**
- * A persistent class mapped as "Artist" Cayenne entity.
- */
-public class Artist extends _Artist {
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Datamap.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Datamap.java
deleted file mode 100644
index 637c9ee7c..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Datamap.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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Datamap;
-
-public class Datamap extends _Datamap {
-
- private static Datamap instance;
-
- private Datamap() {}
-
- public static Datamap getInstance() {
- if(instance == null) {
- instance = new Datamap();
- }
-
- return instance;
- }
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java
deleted file mode 100644
index 2584de48e..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Gallery.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Gallery;
-
-/**
- * A persistent class mapped as "Gallery" Cayenne entity.
- */
-public class Gallery extends _Gallery {
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java
deleted file mode 100644
index 2bb394411..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/Painting.java
+++ /dev/null
@@ -1,28 +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
- *
- * https://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.tutorial.persistent.client;
-
-import org.apache.cayenne.tutorial.persistent.client.auto._Painting;
-
-/**
- * A persistent class mapped as "Painting" Cayenne entity.
- */
-public class Painting extends _Painting {
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
deleted file mode 100644
index 052709b71..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Artist.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import java.time.LocalDate;
-import java.util.List;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.exp.property.DateProperty;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-import org.apache.cayenne.util.PersistentObjectList;
-
-/**
- * A generated persistent class mapped as "Artist" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Artist extends PersistentObject {
-
- public static final DateProperty<LocalDate> DATE_OF_BIRTH = PropertyFactory.createDate("dateOfBirth", LocalDate.class);
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected LocalDate dateOfBirth;
- protected String name;
- protected List<Painting> paintings;
-
- public LocalDate getDateOfBirth() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "dateOfBirth", false);
- }
-
- return dateOfBirth;
- }
-
- public void setDateOfBirth(LocalDate dateOfBirth) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "dateOfBirth", false);
- objectContext.propertyChanged(this, "dateOfBirth", this.dateOfBirth, dateOfBirth);
- }
-
- this.dateOfBirth = dateOfBirth;
- }
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public List<Painting> getPaintings() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- return paintings;
- }
-
- public void addToPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.add(object);
- }
-
- public void removeFromPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.remove(object);
- }
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Datamap.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Datamap.java
deleted file mode 100644
index 83d07d8b9..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Datamap.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import org.apache.cayenne.PersistentObject;
-
-/**
- * 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 _Datamap {
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
deleted file mode 100644
index 57ccb07ba..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Gallery.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import java.util.List;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.exp.property.ListProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Painting;
-import org.apache.cayenne.util.PersistentObjectList;
-
-/**
- * A generated persistent class mapped as "Gallery" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Gallery extends PersistentObject {
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final ListProperty<Painting> PAINTINGS = PropertyFactory.createList("paintings", Painting.class);
-
- protected String name;
- protected List<Painting> paintings;
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public List<Painting> getPaintings() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- return paintings;
- }
-
- public void addToPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.add(object);
- }
-
- public void removeFromPaintings(Painting object) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "paintings", true);
- } else if (this.paintings == null) {
- this.paintings = new PersistentObjectList<>(this, "paintings");
- }
-
- this.paintings.remove(object);
- }
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java b/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
deleted file mode 100644
index ec9511a16..000000000
--- a/tutorials/tutorial-rop-server/src/main/java/org/apache/cayenne/tutorial/persistent/client/auto/_Painting.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.apache.cayenne.tutorial.persistent.client.auto;
-
-import org.apache.cayenne.PersistentObject;
-import org.apache.cayenne.ValueHolder;
-import org.apache.cayenne.exp.property.EntityProperty;
-import org.apache.cayenne.exp.property.PropertyFactory;
-import org.apache.cayenne.exp.property.StringProperty;
-import org.apache.cayenne.tutorial.persistent.client.Artist;
-import org.apache.cayenne.tutorial.persistent.client.Gallery;
-import org.apache.cayenne.util.PersistentObjectHolder;
-
-/**
- * A generated persistent class mapped as "Painting" Cayenne entity. It is a good idea to
- * avoid changing this class manually, since it will be overwritten next time code is
- * regenerated. If you need to make any customizations, put them in a subclass.
- */
-public abstract class _Painting extends PersistentObject {
-
- public static final StringProperty<String> NAME = PropertyFactory.createString("name", String.class);
- public static final EntityProperty<Artist> ARTIST = PropertyFactory.createEntity("artist", Artist.class);
- public static final EntityProperty<Gallery> GALLERY = PropertyFactory.createEntity("gallery", Gallery.class);
-
- protected String name;
- protected ValueHolder<Artist> artist;
- protected ValueHolder<Gallery> gallery;
-
- public String getName() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- }
-
- return name;
- }
-
- public void setName(String name) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "name", false);
- objectContext.propertyChanged(this, "name", this.name, name);
- }
-
- this.name = name;
- }
-
- public Artist getArtist() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "artist", true);
- } else if (this.artist == null) {
- this.artist = new PersistentObjectHolder<>(this, "artist");
- }
-
- return artist.getValue();
- }
-
- public void setArtist(Artist artist) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "artist", true);
- } else if (this.artist == null) {
- this.artist = new PersistentObjectHolder<>(this, "artist");
- }
-
- this.artist.setValue(artist);
- }
-
- public Gallery getGallery() {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "gallery", true);
- } else if (this.gallery == null) {
- this.gallery = new PersistentObjectHolder<>(this, "gallery");
- }
-
- return gallery.getValue();
- }
-
- public void setGallery(Gallery gallery) {
- if(objectContext != null) {
- objectContext.prepareForAccess(this, "gallery", true);
- } else if (this.gallery == null) {
- this.gallery = new PersistentObjectHolder<>(this, "gallery");
- }
-
- this.gallery.setValue(gallery);
- }
-
-}
diff --git a/tutorials/tutorial-rop-server/src/main/resources/cayenne-project.xml b/tutorials/tutorial-rop-server/src/main/resources/cayenne-project.xml
deleted file mode 100644
index 27b1c1b1d..000000000
--- a/tutorials/tutorial-rop-server/src/main/resources/cayenne-project.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<domain xmlns="http://cayenne.apache.org/schema/10/domain"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://cayenne.apache.org/schema/10/domain http://cayenne.apache.org/schema/10/domain.xsd"
- project-version="10">
- <map name="datamap"/>
- <node name="datanode"
- factory="org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory"
- schema-update-strategy="org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy">
- <map-ref name="datamap"/>
- <data-source>
- <driver value="org.apache.derby.jdbc.EmbeddedDriver"/>
- <url value="jdbc:derby:memory:testdb;create=true"/>
- <connectionPool min="1" max="1"/>
- <login/>
- </data-source>
- </node>
-</domain>
diff --git a/tutorials/tutorial-rop-server/src/main/resources/datamap.map.xml b/tutorials/tutorial-rop-server/src/main/resources/datamap.map.xml
deleted file mode 100644
index f87928816..000000000
--- a/tutorials/tutorial-rop-server/src/main/resources/datamap.map.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/10/modelMap"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://cayenne.apache.org/schema/10/modelMap http://cayenne.apache.org/schema/10/modelMap.xsd"
- project-version="10">
- <property name="defaultPackage" value="org.apache.cayenne.tutorial.persistent"/>
- <property name="clientSupported" value="true"/>
- <property name="defaultClientPackage" value="org.apache.cayenne.tutorial.persistent.client"/>
- <db-entity name="ARTIST">
- <db-attribute name="DATE_OF_BIRTH" type="DATE"/>
- <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
- <db-attribute name="NAME" type="VARCHAR" length="200"/>
- </db-entity>
- <db-entity name="GALLERY">
- <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
- <db-attribute name="NAME" type="VARCHAR" length="200"/>
- </db-entity>
- <db-entity name="PAINTING">
- <db-attribute name="ARTIST_ID" type="INTEGER"/>
- <db-attribute name="GALLERY_ID" type="INTEGER"/>
- <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
- <db-attribute name="NAME" type="VARCHAR" length="200"/>
- </db-entity>
- <obj-entity name="Artist" className="org.apache.cayenne.tutorial.persistent.Artist" clientClassName="org.apache.cayenne.tutorial.persistent.client.Artist" dbEntityName="ARTIST">
- <obj-attribute name="dateOfBirth" type="java.time.LocalDate" db-attribute-path="DATE_OF_BIRTH"/>
- <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
- </obj-entity>
- <obj-entity name="Gallery" className="org.apache.cayenne.tutorial.persistent.Gallery" clientClassName="org.apache.cayenne.tutorial.persistent.client.Gallery" dbEntityName="GALLERY">
- <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
- </obj-entity>
- <obj-entity name="Painting" className="org.apache.cayenne.tutorial.persistent.Painting" clientClassName="org.apache.cayenne.tutorial.persistent.client.Painting" dbEntityName="PAINTING">
- <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
- </obj-entity>
- <db-relationship name="paintings" source="ARTIST" target="PAINTING" toMany="true">
- <db-attribute-pair source="ID" target="ARTIST_ID"/>
- </db-relationship>
- <db-relationship name="paintings" source="GALLERY" target="PAINTING" toMany="true">
- <db-attribute-pair source="ID" target="GALLERY_ID"/>
- </db-relationship>
- <db-relationship name="artist" source="PAINTING" target="ARTIST">
- <db-attribute-pair source="ARTIST_ID" target="ID"/>
- </db-relationship>
- <db-relationship name="gallery" source="PAINTING" target="GALLERY">
- <db-attribute-pair source="GALLERY_ID" target="ID"/>
- </db-relationship>
- <obj-relationship name="paintings" source="Artist" target="Painting" deleteRule="Cascade" db-relationship-path="paintings"/>
- <obj-relationship name="paintings" source="Gallery" target="Painting" deleteRule="Nullify" db-relationship-path="paintings"/>
- <obj-relationship name="artist" source="Painting" target="Artist" deleteRule="Nullify" db-relationship-path="artist"/>
- <obj-relationship name="gallery" source="Painting" target="Gallery" deleteRule="Nullify" db-relationship-path="gallery"/>
-</data-map>
diff --git a/tutorials/tutorial-rop-server/src/main/webapp/META-INF/context.xml b/tutorials/tutorial-rop-server/src/main/webapp/META-INF/context.xml
deleted file mode 100644
index 288841a2b..000000000
--- a/tutorials/tutorial-rop-server/src/main/webapp/META-INF/context.xml
+++ /dev/null
@@ -1,23 +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
-
- https://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.
--->
-<!--
- This piece of configuration is needed for deployment on Tomcat 6 or 7
- to prevent ROP client from losing its server-side session between requests.
--->
-<Context>
- <Valve className="org.apache.catalina.authenticator.BasicAuthenticator"
- changeSessionIdOnAuthentication="false" />
-</Context>
\ No newline at end of file
diff --git a/tutorials/tutorial-rop-server/src/main/webapp/WEB-INF/web.xml b/tutorials/tutorial-rop-server/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 2872baecc..000000000
--- a/tutorials/tutorial-rop-server/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-<!--
- 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
-
- https://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.
--->
-<web-app>
- <display-name>Cayenne Tutorial</display-name>
- <servlet>
- <servlet-name>cayenne-project</servlet-name>
- <servlet-class>org.apache.cayenne.rop.ROPServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>cayenne-project</servlet-name>
- <url-pattern>/cayenne-service</url-pattern>
- </servlet-mapping>
-
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>CayenneService</web-resource-name>
- <url-pattern>/cayenne-service</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>cayenne-service-user</role-name>
- </auth-constraint>
- </security-constraint>
-
- <login-config>
- <auth-method>BASIC</auth-method>
- <realm-name>Cayenne Realm</realm-name>
- </login-config>
-
- <security-role>
- <role-name>cayenne-service-user</role-name>
- </security-role>
-</web-app>
\ No newline at end of file
diff --git a/tutorials/tutorial-rop-server/src/test/java/.gitignore b/tutorials/tutorial-rop-server/src/test/java/.gitignore
deleted file mode 100644
index e69de29bb..000000000
diff --git a/tutorials/tutorial-rop-server/src/test/resources/.gitignore b/tutorials/tutorial-rop-server/src/test/resources/.gitignore
deleted file mode 100644
index e69de29bb..000000000