summaryrefslogtreecommitdiffstats
path: root/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java
diff options
context:
space:
mode:
Diffstat (limited to 'utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java')
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java58
1 files changed, 29 insertions, 29 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java b/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java
index 2ed54196..3532002e 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/jpa/EntityMgrCloser.java
@@ -23,37 +23,37 @@ package org.onap.policy.common.utils.jpa;
import javax.persistence.EntityManager;
/**
- * Wrapper for an <i>EntityManager</i>, providing auto-close functionality. This
- * is useful in try-with-resources statements.
+ * Wrapper for an <i>EntityManager</i>, providing auto-close functionality. This is useful in
+ * try-with-resources statements.
*/
public class EntityMgrCloser implements AutoCloseable {
- /**
- * The wrapped manager.
- */
- private final EntityManager em;
-
- /**
- *
- * @param em
- * manager to be auto-closed
- */
- public EntityMgrCloser(EntityManager em) {
- this.em = em;
- }
-
- /**
- * Gets the EntityManager wrapped within this object.
- *
- * @return the associated EntityManager
- */
- public EntityManager getManager() {
- return em;
- }
-
- @Override
- public void close() {
- em.close();
- }
+ /**
+ * The wrapped manager.
+ */
+ private final EntityManager em;
+
+ /**
+ * Construct an instance with the EntityManager.
+ *
+ * @param em manager to be auto-closed
+ */
+ public EntityMgrCloser(EntityManager em) {
+ this.em = em;
+ }
+
+ /**
+ * Gets the EntityManager wrapped within this object.
+ *
+ * @return the associated EntityManager
+ */
+ public EntityManager getManager() {
+ return em;
+ }
+
+ @Override
+ public void close() {
+ em.close();
+ }
}