Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7CA8E200C8B for ; Mon, 22 May 2017 16:03:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7B5A4160BD9; Mon, 22 May 2017 14:03:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3AFE0160BBF for ; Mon, 22 May 2017 16:03:34 +0200 (CEST) Received: (qmail 91601 invoked by uid 500); 22 May 2017 14:03:32 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 91581 invoked by uid 99); 22 May 2017 14:03:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2017 14:03:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 81DFBE1863; Mon, 22 May 2017 14:03:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ntimofeev@apache.org To: commits@cayenne.apache.org Date: Mon, 22 May 2017 14:03:33 -0000 Message-Id: <103c20d4612f4b5b9fd7f618eed2dfe1@git.apache.org> In-Reply-To: <75e176a176f440008b64820bca88092e@git.apache.org> References: <75e176a176f440008b64820bca88092e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/8] cayenne git commit: CAY-2302 Rename PostCommit module and its content to CommitLog archived-at: Mon, 22 May 2017 14:03:36 -0000 http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/DiffProcessor.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/DiffProcessor.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/DiffProcessor.java deleted file mode 100644 index 7daf6e1..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/DiffProcessor.java +++ /dev/null @@ -1,104 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit; - -import org.apache.cayenne.ObjectId; -import org.apache.cayenne.graph.GraphChangeHandler; -import org.apache.cayenne.lifecycle.changemap.MutableChangeMap; -import org.apache.cayenne.lifecycle.changemap.MutableObjectChange; -import org.apache.cayenne.lifecycle.changemap.ObjectChangeType; -import org.apache.cayenne.map.EntityResolver; -import org.apache.cayenne.map.ObjEntity; -import org.apache.cayenne.map.ObjRelationship; - -/** - * Records changes in a given transaction to a {@link MutableChangeMap} object. - * - * @since 4.0 - */ -class DiffProcessor implements GraphChangeHandler { - - private EntityResolver entityResolver; - private MutableChangeMap changeSet; - - DiffProcessor(MutableChangeMap changeSet, EntityResolver entityResolver) { - this.changeSet = changeSet; - this.entityResolver = entityResolver; - } - - @Override - public void nodeRemoved(Object nodeId) { - // do nothing... deletes are processed pre-commit - } - - @Override - public void nodePropertyChanged(Object nodeId, String property, Object oldValue, Object newValue) { - changeSet.getOrCreate((ObjectId) nodeId, ObjectChangeType.UPDATE).attributeChanged(property, oldValue, - newValue); - } - - @Override - public void nodeIdChanged(Object nodeId, Object newId) { - changeSet.aliasId((ObjectId) nodeId, (ObjectId) newId); - } - - @Override - public void nodeCreated(Object nodeId) { - changeSet.getOrCreate((ObjectId) nodeId, ObjectChangeType.INSERT); - } - - @Override - public void arcDeleted(Object nodeId, Object targetNodeId, Object arcId) { - ObjectId id = (ObjectId) nodeId; - String relationshipName = arcId.toString(); - - ObjEntity entity = entityResolver.getObjEntity(id.getEntityName()); - ObjRelationship relationship = entity.getRelationship(relationshipName); - - MutableObjectChange c = changeSet.getOrCreate(id, ObjectChangeType.UPDATE); - - ObjectId tid = (ObjectId) targetNodeId; - - if (relationship.isToMany()) { - c.toManyRelationshipDisconnected(relationshipName, tid); - } else { - c.toOneRelationshipDisconnected(relationshipName, tid); - } - } - - @Override - public void arcCreated(Object nodeId, Object targetNodeId, Object arcId) { - - ObjectId id = (ObjectId) nodeId; - String relationshipName = arcId.toString(); - - ObjEntity entity = entityResolver.getObjEntity(id.getEntityName()); - ObjRelationship relationship = entity.getRelationship(relationshipName); - - MutableObjectChange c = changeSet.getOrCreate(id, ObjectChangeType.UPDATE); - - ObjectId tid = (ObjectId) targetNodeId; - - if (relationship.isToMany()) { - c.toManyRelationshipConnected(relationshipName, tid); - } else { - c.toOneRelationshipConnected(relationshipName, tid); - } - } -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter.java deleted file mode 100644 index d0343b4..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter.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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit; - -import java.util.Collection; -import java.util.List; - -import org.apache.cayenne.DataChannel; -import org.apache.cayenne.DataChannelFilter; -import org.apache.cayenne.DataChannelFilterChain; -import org.apache.cayenne.ObjectContext; -import org.apache.cayenne.QueryResponse; -import org.apache.cayenne.di.Inject; -import org.apache.cayenne.graph.GraphChangeHandler; -import org.apache.cayenne.graph.GraphDiff; -import org.apache.cayenne.lifecycle.changemap.ChangeMap; -import org.apache.cayenne.lifecycle.changemap.MutableChangeMap; -import org.apache.cayenne.lifecycle.postcommit.meta.PostCommitEntityFactory; -import org.apache.cayenne.query.Query; - -/** - * A {@link DataChannelFilter} that captures commit changes, delegating their - * processing to an underlying collection of listeners. - * - * @since 4.0 - */ -public class PostCommitFilter implements DataChannelFilter { - - private PostCommitEntityFactory entityFactory; - private Collection listeners; - - public PostCommitFilter(@Inject PostCommitEntityFactory entityFactory, - @Inject List listeners) { - this.entityFactory = entityFactory; - this.listeners = listeners; - } - - @Override - public void init(DataChannel channel) { - // do nothing... - } - - @Override - public QueryResponse onQuery(ObjectContext originatingContext, Query query, DataChannelFilterChain filterChain) { - return filterChain.onQuery(originatingContext, query); - } - - @Override - public GraphDiff onSync(ObjectContext originatingContext, GraphDiff beforeDiff, int syncType, - DataChannelFilterChain filterChain) { - - // process commits only; skip rollback - if (syncType != DataChannel.FLUSH_CASCADE_SYNC && syncType != DataChannel.FLUSH_NOCASCADE_SYNC) { - return filterChain.onSync(originatingContext, beforeDiff, syncType); - } - - // don't collect changes if there are no listeners - if (listeners.isEmpty()) { - return filterChain.onSync(originatingContext, beforeDiff, syncType); - } - - MutableChangeMap changes = new MutableChangeMap(); - - // passing DataDomain, not ObjectContext to speed things up - // and avoid capturing changed state when fetching snapshots - DataChannel channel = originatingContext.getChannel(); - - beforeCommit(changes, channel, beforeDiff); - GraphDiff afterDiff = filterChain.onSync(originatingContext, beforeDiff, syncType); - afterCommit(changes, channel, beforeDiff, afterDiff); - notifyListeners(originatingContext, changes); - - return afterDiff; - } - - private void beforeCommit(MutableChangeMap changes, DataChannel channel, GraphDiff contextDiff) { - - // capture snapshots of deleted objects before they are purged from cache - GraphChangeHandler handler = new DiffFilter(entityFactory, - new DeletedDiffProcessor(changes, channel, entityFactory)); - contextDiff.apply(handler); - } - - private void afterCommit(MutableChangeMap changes, DataChannel channel, GraphDiff contextDiff, GraphDiff dbDiff) { - - GraphChangeHandler handler = new DiffFilter(entityFactory, - new DiffProcessor(changes, channel.getEntityResolver())); - contextDiff.apply(handler); - dbDiff.apply(handler); - } - - private void notifyListeners(ObjectContext originatingContext, ChangeMap changes) { - for (PostCommitListener l : listeners) { - l.onPostCommit(originatingContext, changes); - } - } - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitListener.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitListener.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitListener.java deleted file mode 100644 index fc9412b..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitListener.java +++ /dev/null @@ -1,32 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit; - -import org.apache.cayenne.ObjectContext; -import org.apache.cayenne.lifecycle.changemap.ChangeMap; - -/** - * An interface of a listener of post-commit events. - * - * @since 4.0 - */ -public interface PostCommitListener { - - void onPostCommit(ObjectContext originatingContext, ChangeMap changes); -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModule.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModule.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModule.java deleted file mode 100644 index 458c7ce..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModule.java +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ - -package org.apache.cayenne.lifecycle.postcommit; - -import org.apache.cayenne.di.Binder; -import org.apache.cayenne.di.ListBuilder; -import org.apache.cayenne.di.Module; -import org.apache.cayenne.lifecycle.postcommit.meta.IncludeAllPostCommitEntityFactory; -import org.apache.cayenne.lifecycle.postcommit.meta.PostCommitEntityFactory; - -/** - * @since 4.0 - */ -public class PostCommitModule implements Module{ - - public static ListBuilder contributeListeners(Binder binder) { - return binder.bindList(PostCommitListener.class); - } - - @Override - public void configure(Binder binder) { - contributeListeners(binder); - binder.bind(PostCommitEntityFactory.class).to(IncludeAllPostCommitEntityFactory.class); - binder.bind(PostCommitFilter.class).to(PostCommitFilter.class); - } -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilder.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilder.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilder.java deleted file mode 100644 index 179ba2c..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilder.java +++ /dev/null @@ -1,137 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit; - -import org.apache.cayenne.configuration.server.ServerModule; -import org.apache.cayenne.di.Binder; -import org.apache.cayenne.di.ListBuilder; -import org.apache.cayenne.di.Module; -import org.apache.cayenne.lifecycle.audit.Auditable; -import org.apache.cayenne.lifecycle.postcommit.meta.AuditablePostCommitEntityFactory; -import org.apache.cayenne.lifecycle.postcommit.meta.IncludeAllPostCommitEntityFactory; -import org.apache.cayenne.lifecycle.postcommit.meta.PostCommitEntity; -import org.apache.cayenne.lifecycle.postcommit.meta.PostCommitEntityFactory; -import org.apache.cayenne.tx.TransactionFilter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Collection; -import java.util.HashSet; - -/** - * A builder of a module that integrates {@link PostCommitFilter} and - * {@link PostCommitListener} in Cayenne. - * - * @since 4.0 - */ -public class PostCommitModuleBuilder { - - private static final Logger LOGGER = LoggerFactory.getLogger(PostCommitModuleBuilder.class); - - public static PostCommitModuleBuilder builder() { - return new PostCommitModuleBuilder(); - } - - private Class entityFactoryType; - private Collection> listenerTypes; - private Collection listenerInstances; - private boolean excludeFromTransaction; - - PostCommitModuleBuilder() { - entityFactory(IncludeAllPostCommitEntityFactory.class); - this.listenerTypes = new HashSet<>(); - this.listenerInstances = new HashSet<>(); - } - - public PostCommitModuleBuilder listener(Class type) { - this.listenerTypes.add(type); - return this; - } - - public PostCommitModuleBuilder listener(PostCommitListener instance) { - this.listenerInstances.add(instance); - return this; - } - - /** - * If called, events will be dispatched outside of the main commit - * transaction. By default events are dispatched within the transaction, so - * listeners can commit their code together with the main commit. - */ - public PostCommitModuleBuilder excludeFromTransaction() { - this.excludeFromTransaction = true; - return this; - } - - /** - * Installs entity filter that would only include entities annotated with - * {@link Auditable} on the callbacks. Also {@link Auditable#confidential()} - * properties will be obfuscated and {@link Auditable#ignoredProperties()} - - * excluded from the change collection. - */ - public PostCommitModuleBuilder auditableEntitiesOnly() { - return entityFactory(AuditablePostCommitEntityFactory.class); - } - - /** - * Installs a custom factory for {@link PostCommitEntity} objects that - * allows implementors to use their own annotations, etc. - */ - public PostCommitModuleBuilder entityFactory(Class entityFactoryType) { - this.entityFactoryType = entityFactoryType; - return this; - } - - /** - * Creates a DI module that would install {@link PostCommitFilter} and its - * listeners in Cayenne. - */ - public Module build() { - return new Module() { - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void configure(Binder binder) { - - if (listenerTypes.isEmpty() && listenerInstances.isEmpty()) { - LOGGER.info("No listeners configured. Skipping PostCommitFilter registration"); - return; - } - - binder.bind(PostCommitEntityFactory.class).to(entityFactoryType); - - ListBuilder listeners = PostCommitModule.contributeListeners(binder) - .addAll(listenerInstances); - - // types have to be added one-by-one - for (Class type : listenerTypes) { - // TODO: temp hack - need to bind each type before adding to collection... - binder.bind(type).to(type); - listeners.add(type); - } - - if (excludeFromTransaction) { - ServerModule.contributeDomainFilters(binder).addAfter(PostCommitFilter.class, TransactionFilter.class); - } else { - ServerModule.contributeDomainFilters(binder).insertBefore(PostCommitFilter.class, TransactionFilter.class); - } - } - }; - } -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitServerModuleProvider.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitServerModuleProvider.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitServerModuleProvider.java deleted file mode 100644 index 207af35..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/PostCommitServerModuleProvider.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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ - -package org.apache.cayenne.lifecycle.postcommit; - -import java.util.Collection; -import java.util.Collections; - -import org.apache.cayenne.configuration.server.CayenneServerModuleProvider; -import org.apache.cayenne.configuration.server.ServerModule; -import org.apache.cayenne.di.Module; - -/** - * @since 4.0 - */ -public class PostCommitServerModuleProvider implements CayenneServerModuleProvider { - - @Override - public Module module() { - return new PostCommitModule(); - } - - @Override - public Class moduleType() { - return PostCommitModule.class; - } - - @SuppressWarnings("unchecked") - @Override - public Collection> overrides() { - Collection modules = Collections.singletonList(ServerModule.class); - return modules; - } -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/AuditablePostCommitEntityFactory.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/AuditablePostCommitEntityFactory.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/AuditablePostCommitEntityFactory.java deleted file mode 100644 index 424c7d2..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/AuditablePostCommitEntityFactory.java +++ /dev/null @@ -1,104 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit.meta; - -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - -import org.apache.cayenne.DataChannel; -import org.apache.cayenne.ObjectId; -import org.apache.cayenne.di.Inject; -import org.apache.cayenne.di.Provider; -import org.apache.cayenne.lifecycle.audit.Auditable; -import org.apache.cayenne.map.EntityResolver; -import org.apache.cayenne.map.ObjEntity; -import org.apache.cayenne.reflect.ClassDescriptor; - -/** - * Compiles {@link PostCommitEntity}'s based on {@link Auditable} annotation. - * - * @since 4.0 - */ -public class AuditablePostCommitEntityFactory implements PostCommitEntityFactory { - - private static final PostCommitEntity BLOCKED_ENTITY = new PostCommitEntity() { - - @Override - public boolean isIncluded(String property) { - return false; - } - - @Override - public boolean isConfidential(String property) { - return false; - } - - @Override - public boolean isIncluded() { - return false; - } - }; - - private Provider channelProvider; - private ConcurrentMap entities; - - public AuditablePostCommitEntityFactory(@Inject Provider channelProvider) { - this.entities = new ConcurrentHashMap<>(); - - // injecting provider instead of DataChannel, as otherwise we end up - // with circular dependency. - this.channelProvider = channelProvider; - } - - @Override - public PostCommitEntity getEntity(ObjectId id) { - String entityName = id.getEntityName(); - - PostCommitEntity descriptor = entities.get(entityName); - if (descriptor == null) { - PostCommitEntity newDescriptor = createDescriptor(entityName); - PostCommitEntity existingDescriptor = entities.putIfAbsent(entityName, newDescriptor); - descriptor = (existingDescriptor != null) ? existingDescriptor : newDescriptor; - } - - return descriptor; - - } - - private EntityResolver getEntityResolver() { - return channelProvider.get().getEntityResolver(); - } - - private PostCommitEntity createDescriptor(String entityName) { - EntityResolver entityResolver = getEntityResolver(); - ClassDescriptor classDescriptor = entityResolver.getClassDescriptor(entityName); - - Auditable a = classDescriptor.getObjectClass().getAnnotation(Auditable.class); - if (a == null) { - return BLOCKED_ENTITY; - } - - ObjEntity entity = entityResolver.getObjEntity(entityName); - return new MutablePostCommitEntity(entity).setConfidential(a.confidential()) - .setIgnoreProperties(a.ignoredProperties()).setIgnoreAttributes(a.ignoreAttributes()) - .setIgnoreToOneRelationships(a.ignoreToOneRelationships()) - .setIgnoreToManyRelationships(a.ignoreToManyRelationships()); - } - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/IncludeAllPostCommitEntityFactory.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/IncludeAllPostCommitEntityFactory.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/IncludeAllPostCommitEntityFactory.java deleted file mode 100644 index 2064885..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/IncludeAllPostCommitEntityFactory.java +++ /dev/null @@ -1,51 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit.meta; - -import org.apache.cayenne.ObjectId; - -/** - * @since 4.0 - */ -public class IncludeAllPostCommitEntityFactory implements PostCommitEntityFactory { - - private static final PostCommitEntity ALLOWED_ENTITY = new PostCommitEntity() { - - @Override - public boolean isIncluded(String property) { - return true; - } - - @Override - public boolean isConfidential(String property) { - return false; - } - - @Override - public boolean isIncluded() { - return true; - } - }; - - @Override - public PostCommitEntity getEntity(ObjectId id) { - return ALLOWED_ENTITY; - - } -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/MutablePostCommitEntity.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/MutablePostCommitEntity.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/MutablePostCommitEntity.java deleted file mode 100644 index 3e61c40..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/MutablePostCommitEntity.java +++ /dev/null @@ -1,112 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit.meta; - -import java.util.Collection; -import java.util.HashSet; - -import org.apache.cayenne.map.ObjAttribute; -import org.apache.cayenne.map.ObjEntity; -import org.apache.cayenne.map.ObjRelationship; - -/** - * @since 4.0 - */ -public class MutablePostCommitEntity implements PostCommitEntity { - - private Collection ignoredProperties; - private Collection confidentialProperties; - private ObjEntity entity; - - public MutablePostCommitEntity(ObjEntity entity) { - this.entity = entity; - this.ignoredProperties = new HashSet<>(); - this.confidentialProperties = new HashSet<>(); - } - - @Override - public boolean isIncluded(String property) { - return !ignoredProperties.contains(property); - } - - @Override - public boolean isIncluded() { - return true; - } - - @Override - public boolean isConfidential(String property) { - return confidentialProperties.contains(property); - } - - MutablePostCommitEntity setConfidential(String[] confidentialProperties) { - - if (confidentialProperties != null) { - for (String property : confidentialProperties) { - this.confidentialProperties.add(property); - } - } - - return this; - } - - MutablePostCommitEntity setIgnoreProperties(String[] properties) { - if (properties != null) { - for (String property : properties) { - this.ignoredProperties.add(property); - } - } - - return this; - } - - MutablePostCommitEntity setIgnoreAttributes(boolean ignore) { - if (ignore) { - for (ObjAttribute a : entity.getAttributes()) { - this.ignoredProperties.add(a.getName()); - } - } - - return this; - } - - MutablePostCommitEntity setIgnoreToOneRelationships(boolean ignore) { - if (ignore) { - for (ObjRelationship r : entity.getRelationships()) { - if (!r.isToMany()) { - this.ignoredProperties.add(r.getName()); - } - } - } - - return this; - } - - MutablePostCommitEntity setIgnoreToManyRelationships(boolean ignore) { - if (ignore) { - for (ObjRelationship r : entity.getRelationships()) { - if (r.isToMany()) { - this.ignoredProperties.add(r.getName()); - } - } - } - - return this; - } -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/PostCommitEntity.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/PostCommitEntity.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/PostCommitEntity.java deleted file mode 100644 index 1f3d8ca..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/PostCommitEntity.java +++ /dev/null @@ -1,34 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit.meta; - -/** - * Describes post-commit behavior for a given Cayenne entity. - * - * @since 4.0 - */ -public interface PostCommitEntity { - - boolean isIncluded(); - - boolean isConfidential(String property); - - boolean isIncluded(String property); - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/PostCommitEntityFactory.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/PostCommitEntityFactory.java b/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/PostCommitEntityFactory.java deleted file mode 100644 index f8f7e0b..0000000 --- a/cayenne-postcommit/src/main/java/org/apache/cayenne/lifecycle/postcommit/meta/PostCommitEntityFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.postcommit.meta; - -import org.apache.cayenne.ObjectId; - -/** - * @since 4.0 - */ -public interface PostCommitEntityFactory { - - PostCommitEntity getEntity(ObjectId id); -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/cayenne-postcommit/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider deleted file mode 100644 index c47fc1b..0000000 --- a/cayenne-postcommit/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider +++ /dev/null @@ -1,20 +0,0 @@ -################################################################## -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -################################################################## - -org.apache.cayenne.lifecycle.postcommit.PostCommitServerModuleProvider \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditLog.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditLog.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditLog.java deleted file mode 100644 index a9bf9b5..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditLog.java +++ /dev/null @@ -1,27 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.db.auto._AuditLog; - -public class AuditLog extends _AuditLog { - - private static final long serialVersionUID = 1L; - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java deleted file mode 100644 index 4cb7ff1..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable1.java +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.audit.Auditable; -import org.apache.cayenne.lifecycle.db.auto._Auditable1; - -@Auditable -public class Auditable1 extends _Auditable1 { - - private static final long serialVersionUID = 8458581370578140962L; - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java deleted file mode 100644 index 854b0ac..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable2.java +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.audit.Auditable; -import org.apache.cayenne.lifecycle.db.auto._Auditable2; - -@Auditable(ignoredProperties = "charProperty1", confidential = "charProperty2") -public class Auditable2 extends _Auditable2 { - - private static final long serialVersionUID = 5203324250911707978L; - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable3.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable3.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable3.java deleted file mode 100644 index c033020..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable3.java +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.audit.Auditable; -import org.apache.cayenne.lifecycle.db.auto._Auditable3; - -@Auditable(ignoreAttributes = true, ignoreToManyRelationships = true) -public class Auditable3 extends _Auditable3 { - - private static final long serialVersionUID = 1L; - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable4.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable4.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable4.java deleted file mode 100644 index 05861e3..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/Auditable4.java +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.audit.Auditable; -import org.apache.cayenne.lifecycle.db.auto._Auditable4; - -@Auditable(ignoreToOneRelationships = true) -public class Auditable4 extends _Auditable4 { - - private static final long serialVersionUID = 1L; - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java deleted file mode 100644 index 9039a08..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild1.java +++ /dev/null @@ -1,27 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.db.auto._AuditableChild1; - -public class AuditableChild1 extends _AuditableChild1 { - - private static final long serialVersionUID = 7967782239405764614L; - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.java deleted file mode 100644 index 3c32d79..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/AuditableChild3.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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.db.auto._AuditableChild3; - -public class AuditableChild3 extends _AuditableChild3 { - private static final long serialVersionUID = 1L; -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E1.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E1.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E1.java deleted file mode 100644 index d08294d..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E1.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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.db.auto._E1; - -public class E1 extends _E1 { - private static final long serialVersionUID = 1L; -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E2.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E2.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E2.java deleted file mode 100644 index b58c371..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E2.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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.db.auto._E2; - -public class E2 extends _E2 { - private static final long serialVersionUID = 1L; -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E3.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E3.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E3.java deleted file mode 100644 index b07346e..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E3.java +++ /dev/null @@ -1,27 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.db.auto._E3; - -public class E3 extends _E3 { - - private static final long serialVersionUID = 1L; - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E4.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E4.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E4.java deleted file mode 100644 index 060862d..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/E4.java +++ /dev/null @@ -1,27 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.db.auto._E4; - -public class E4 extends _E4 { - - private static final long serialVersionUID = 1L; - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/LifecycleMap.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/LifecycleMap.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/LifecycleMap.java deleted file mode 100644 index 119ab3a..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/LifecycleMap.java +++ /dev/null @@ -1,36 +0,0 @@ -/***************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - ****************************************************************/ -package org.apache.cayenne.lifecycle.db; - -import org.apache.cayenne.lifecycle.db.auto._LifecycleMap; - -public class LifecycleMap extends _LifecycleMap { - - private static LifecycleMap instance; - - private LifecycleMap() {} - - public static LifecycleMap getInstance() { - if(instance == null) { - instance = new LifecycleMap(); - } - - return instance; - } -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java deleted file mode 100644 index 8a30f01..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditLog.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; - -/** - * Class _AuditLog 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 _AuditLog extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property LOG = Property.create("log", String.class); - - public void setLog(String log) { - writeProperty("log", log); - } - public String getLog() { - return (String)readProperty("log"); - } - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java deleted file mode 100644 index df212a1..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable1.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import java.util.List; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; -import org.apache.cayenne.lifecycle.db.AuditableChild1; - -/** - * Class _Auditable1 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 _Auditable1 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property CHAR_PROPERTY1 = Property.create("charProperty1", String.class); - public static final Property> CHILDREN1 = Property.create("children1", List.class); - - public void setCharProperty1(String charProperty1) { - writeProperty("charProperty1", charProperty1); - } - public String getCharProperty1() { - return (String)readProperty("charProperty1"); - } - - public void addToChildren1(AuditableChild1 obj) { - addToManyTarget("children1", obj, true); - } - public void removeFromChildren1(AuditableChild1 obj) { - removeToManyTarget("children1", obj, true); - } - @SuppressWarnings("unchecked") - public List getChildren1() { - return (List)readProperty("children1"); - } - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java deleted file mode 100644 index ea7a51b..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable2.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import java.util.List; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; -import org.apache.cayenne.lifecycle.db.AuditableChild3; - -/** - * Class _Auditable2 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 _Auditable2 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property CHAR_PROPERTY1 = Property.create("charProperty1", String.class); - public static final Property CHAR_PROPERTY2 = Property.create("charProperty2", String.class); - public static final Property> CHILDREN = Property.create("children", List.class); - - public void setCharProperty1(String charProperty1) { - writeProperty("charProperty1", charProperty1); - } - public String getCharProperty1() { - return (String)readProperty("charProperty1"); - } - - public void setCharProperty2(String charProperty2) { - writeProperty("charProperty2", charProperty2); - } - public String getCharProperty2() { - return (String)readProperty("charProperty2"); - } - - public void addToChildren(AuditableChild3 obj) { - addToManyTarget("children", obj, true); - } - public void removeFromChildren(AuditableChild3 obj) { - removeToManyTarget("children", obj, true); - } - @SuppressWarnings("unchecked") - public List getChildren() { - return (List)readProperty("children"); - } - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java deleted file mode 100644 index 24ca50b..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable3.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import java.util.List; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; -import org.apache.cayenne.lifecycle.db.Auditable4; - -/** - * Class _Auditable3 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 _Auditable3 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property CHAR_PROPERTY1 = Property.create("charProperty1", String.class); - public static final Property CHAR_PROPERTY2 = Property.create("charProperty2", String.class); - public static final Property> AUDITABLE4S = Property.create("auditable4s", List.class); - - public void setCharProperty1(String charProperty1) { - writeProperty("charProperty1", charProperty1); - } - public String getCharProperty1() { - return (String)readProperty("charProperty1"); - } - - public void setCharProperty2(String charProperty2) { - writeProperty("charProperty2", charProperty2); - } - public String getCharProperty2() { - return (String)readProperty("charProperty2"); - } - - public void addToAuditable4s(Auditable4 obj) { - addToManyTarget("auditable4s", obj, true); - } - public void removeFromAuditable4s(Auditable4 obj) { - removeToManyTarget("auditable4s", obj, true); - } - @SuppressWarnings("unchecked") - public List getAuditable4s() { - return (List)readProperty("auditable4s"); - } - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java deleted file mode 100644 index f79e125..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_Auditable4.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; -import org.apache.cayenne.lifecycle.db.Auditable3; - -/** - * Class _Auditable4 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 _Auditable4 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property CHAR_PROPERTY1 = Property.create("charProperty1", String.class); - public static final Property CHAR_PROPERTY2 = Property.create("charProperty2", String.class); - public static final Property AUDITABLE3 = Property.create("auditable3", Auditable3.class); - - public void setCharProperty1(String charProperty1) { - writeProperty("charProperty1", charProperty1); - } - public String getCharProperty1() { - return (String)readProperty("charProperty1"); - } - - public void setCharProperty2(String charProperty2) { - writeProperty("charProperty2", charProperty2); - } - public String getCharProperty2() { - return (String)readProperty("charProperty2"); - } - - public void setAuditable3(Auditable3 auditable3) { - setToOneTarget("auditable3", auditable3, true); - } - - public Auditable3 getAuditable3() { - return (Auditable3)readProperty("auditable3"); - } - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java deleted file mode 100644 index 96f21b0..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild1.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; -import org.apache.cayenne.lifecycle.db.Auditable1; - -/** - * Class _AuditableChild1 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 _AuditableChild1 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property CHAR_PROPERTY1 = Property.create("charProperty1", String.class); - public static final Property PARENT = Property.create("parent", Auditable1.class); - - public void setCharProperty1(String charProperty1) { - writeProperty("charProperty1", charProperty1); - } - public String getCharProperty1() { - return (String)readProperty("charProperty1"); - } - - public void setParent(Auditable1 parent) { - setToOneTarget("parent", parent, true); - } - - public Auditable1 getParent() { - return (Auditable1)readProperty("parent"); - } - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java deleted file mode 100644 index fb2f26a..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_AuditableChild3.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; -import org.apache.cayenne.lifecycle.db.Auditable2; - -/** - * Class _AuditableChild3 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 _AuditableChild3 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property CHAR_PROPERTY1 = Property.create("charProperty1", String.class); - public static final Property CHAR_PROPERTY2 = Property.create("charProperty2", String.class); - public static final Property PARENT = Property.create("parent", Auditable2.class); - - public void setCharProperty1(String charProperty1) { - writeProperty("charProperty1", charProperty1); - } - public String getCharProperty1() { - return (String)readProperty("charProperty1"); - } - - public void setCharProperty2(String charProperty2) { - writeProperty("charProperty2", charProperty2); - } - public String getCharProperty2() { - return (String)readProperty("charProperty2"); - } - - public void setParent(Auditable2 parent) { - setToOneTarget("parent", parent, true); - } - - public Auditable2 getParent() { - return (Auditable2)readProperty("parent"); - } - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E1.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E1.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E1.java deleted file mode 100644 index ce307f3..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E1.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import org.apache.cayenne.CayenneDataObject; - -/** - * Class _E1 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 _E1 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E2.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E2.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E2.java deleted file mode 100644 index e333492..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E2.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import org.apache.cayenne.CayenneDataObject; - -/** - * Class _E2 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 _E2 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java deleted file mode 100644 index 2bc35b9..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E3.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import java.util.List; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; -import org.apache.cayenne.lifecycle.db.E4; - -/** - * Class _E3 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 _E3 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property> E4S = Property.create("e4s", List.class); - - public void addToE4s(E4 obj) { - addToManyTarget("e4s", obj, true); - } - public void removeFromE4s(E4 obj) { - removeToManyTarget("e4s", obj, true); - } - @SuppressWarnings("unchecked") - public List getE4s() { - return (List)readProperty("e4s"); - } - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java deleted file mode 100644 index 42ea901..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_E4.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.apache.cayenne.lifecycle.db.auto; - -import java.util.List; - -import org.apache.cayenne.CayenneDataObject; -import org.apache.cayenne.exp.Property; -import org.apache.cayenne.lifecycle.db.E3; - -/** - * Class _E4 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 _E4 extends CayenneDataObject { - - private static final long serialVersionUID = 1L; - - public static final String ID_PK_COLUMN = "ID"; - - public static final Property> E3S = Property.create("e3s", List.class); - - public void addToE3s(E3 obj) { - addToManyTarget("e3s", obj, true); - } - public void removeFromE3s(E3 obj) { - removeToManyTarget("e3s", obj, true); - } - @SuppressWarnings("unchecked") - public List getE3s() { - return (List)readProperty("e3s"); - } - - -} http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_LifecycleMap.java ---------------------------------------------------------------------- diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_LifecycleMap.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_LifecycleMap.java deleted file mode 100644 index 3e50353..0000000 --- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/db/auto/_LifecycleMap.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.apache.cayenne.lifecycle.db.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 _LifecycleMap { -} \ No newline at end of file