X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fpersistence%2FPersistentFactory.java;h=8dd0986a63ac0d9762d927d1506ee5e077b557ac;hb=7c3979f07f0eccac51d1fd988650ab7c33a39378;hp=fddc76b9e7844377304aa045ac0957f7316a46b5;hpb=5bbd2c6e9dcf47e312122a3205c78b676a724e07;p=utils 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 fddc76b9..8dd0986a 100644 --- a/support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java +++ b/support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java @@ -29,7 +29,7 @@ import javax.persistence.Version; 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 @@ -171,16 +171,16 @@ public class PersistentFactory { @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) { - if ( accessor == null || accessor.getVersion() == null) { - return; + if (accessor == null || accessor.getVersion() == null) { + return; } accessor.getVersion().set(entity, aVersion); }