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


The following commit(s) were added to refs/heads/master by this push:
     new 6938e5e54 CAY-2854 Improve delete prevention detection of flattened 
attribute row  - javadocs and missing license header
6938e5e54 is described below

commit 6938e5e546d2fe6e786d525e009a17668c052795
Author: Nikita Timofeev <stari...@gmail.com>
AuthorDate: Thu May 23 16:32:47 2024 +0400

    CAY-2854 Improve delete prevention detection of flattened attribute row
     - javadocs and missing license header
---
 .../reflect/AdditionalDbEntityDescriptor.java      | 40 +++++++++++++++++++---
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git 
a/cayenne/src/main/java/org/apache/cayenne/reflect/AdditionalDbEntityDescriptor.java
 
b/cayenne/src/main/java/org/apache/cayenne/reflect/AdditionalDbEntityDescriptor.java
index f6ae41ec3..3a2b3db04 100644
--- 
a/cayenne/src/main/java/org/apache/cayenne/reflect/AdditionalDbEntityDescriptor.java
+++ 
b/cayenne/src/main/java/org/apache/cayenne/reflect/AdditionalDbEntityDescriptor.java
@@ -1,14 +1,44 @@
+/*****************************************************************
+ *   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.reflect;
 
 import org.apache.cayenne.exp.path.CayennePath;
 import org.apache.cayenne.map.DbEntity;
 
-public class AdditionalDbEntityDescriptor
-{
-    private CayennePath path;
-    private DbEntity entity;
-    private boolean noDelete;
+/**
+ * A descriptor for an additional DB entity attached to the main one.
+ * For now additional entity is spawn by flattened attributes.
+ *
+ * @see 
PersistentDescriptorFactory#indexAdditionalDbEntities(PersistentDescriptor)
+ *
+ * @since 5.0
+ */
+public class AdditionalDbEntityDescriptor {
+    private final CayennePath path;
+    private final DbEntity entity;
+    private final boolean noDelete;
 
+    /**
+     * @param path relative to the root entity path
+     * @param entity target of this descriptor
+     * @param noDelete should row deletion of the root entity trigger deletion 
of the additional entity
+     */
     AdditionalDbEntityDescriptor(CayennePath path, DbEntity entity, boolean 
noDelete) {
         this.noDelete = noDelete;
         this.entity = entity;

Reply via email to