From 8d5621248f7d6e44b85f73bcf21932b9c560ca56 Mon Sep 17 00:00:00 2001 From: Robin Bygrave Date: Fri, 31 Jul 2015 22:00:52 +1200 Subject: [PATCH] No effective change - code cleanup - remove unused - objects --- .../server/deploy/CopyContext.java | 64 ------------------- .../lib/util/CreateObjectException.java | 23 ------- 2 files changed, 87 deletions(-) delete mode 100644 src/main/java/com/avaje/ebeaninternal/server/deploy/CopyContext.java delete mode 100644 src/main/java/com/avaje/ebeaninternal/server/lib/util/CreateObjectException.java diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/CopyContext.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/CopyContext.java deleted file mode 100644 index 2bf41fad7..000000000 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/CopyContext.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.avaje.ebeaninternal.server.deploy; - -import com.avaje.ebean.bean.PersistenceContext; -import com.avaje.ebeaninternal.server.transaction.DefaultPersistenceContext; - -/** - * Provides context when performing a bean copy. - * - * @author rbygrave - */ -public class CopyContext { - - private final boolean vanillaMode; - - private final boolean sharing; - - private final PersistenceContext pc; - - public CopyContext(boolean vanillaMode, boolean sharing) { - this.vanillaMode = vanillaMode; - this.sharing = sharing; - this.pc = new DefaultPersistenceContext(); - } - - public CopyContext(boolean vanillaMode) { - this(vanillaMode, false); - } - - /** - * Return true if the copy should be a vanilla bean. - */ - public boolean isVanillaMode() { - return vanillaMode; - } - - /** - * Return true if the copy should be safe for sharing. - */ - public boolean isSharing() { - return sharing; - } - - /** - * Return the persistence context used during the copy. - */ - public PersistenceContext getPersistenceContext() { - return pc; - } - - /** - * Put the bean if absent into the persistence context. - */ - public Object putIfAbsent(Object id, Object bean){ - return pc.putIfAbsent(id, bean); - } - - /** - * Return the bean for the given type and id from the persistence context. - */ - public Object get(Class beanType, Object beanId){ - return pc.get(beanType, beanId); - } - -} diff --git a/src/main/java/com/avaje/ebeaninternal/server/lib/util/CreateObjectException.java b/src/main/java/com/avaje/ebeaninternal/server/lib/util/CreateObjectException.java deleted file mode 100644 index 80b3ff955..000000000 --- a/src/main/java/com/avaje/ebeaninternal/server/lib/util/CreateObjectException.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.avaje.ebeaninternal.server.lib.util; - - -/** - * A general exception when creating an Object. - */ -public class CreateObjectException extends RuntimeException -{ - static final long serialVersionUID = 7061559938704539736L; - - public CreateObjectException(Exception cause) { - super(cause); - } - - public CreateObjectException(String s, Exception cause) { - super(s, cause); - } - - public CreateObjectException(String s) { - super(s); - } - -}