git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[utils]
/
support
/
general
/
src
/
main
/
java
/
org
/
wamblee
/
persistence
/
PersistentFactory.java
diff --git
a/support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java
b/support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java
index 7dfb460bc60e244242e65dec0a46c9a77bb47698..8dd0986a63ac0d9762d927d1506ee5e077b557ac 100644
(file)
--- a/
support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java
+++ b/
support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java
@@
-18,7
+18,6
@@
package org.wamblee.persistence;
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
@@
-30,7
+29,7
@@
import javax.persistence.Version;
import org.wamblee.reflection.ReflectionUtils;
/**
import org.wamblee.reflection.ReflectionUtils;
/**
- * Factory which creates a {@link Persistent} object for a given entity for
+ * Factory which creates a {@link Persistent} object for a given
JPA
entity for
* interfacing with the primary key and version of the entity.
*
* This utility only treats primary keys and fields that are annotated with @Id
* interfacing with the primary key and version of the entity.
*
* This utility only treats primary keys and fields that are annotated with @Id
@@
-172,16
+171,16
@@
public class PersistentFactory {
@Override
public Number getPersistedVersion() {
@Override
public Number getPersistedVersion() {
- if (
accessor == null || accessor.getVersion() == null) {
- return null;
+ if (
accessor == null || accessor.getVersion() == null) {
+ return null;
}
return (Number) accessor.getVersion().get(entity);
}
@Override
public void setPersistedVersion(Number aVersion) {
}
return (Number) accessor.getVersion().get(entity);
}
@Override
public void setPersistedVersion(Number aVersion) {
- if (
accessor == null || accessor.getVersion() == null) {
- return;
+ if (
accessor == null || accessor.getVersion() == null) {
+ return;
}
accessor.getVersion().set(entity, aVersion);
}
}
accessor.getVersion().set(entity, aVersion);
}