branch feature/7017 updated (4a54a88 -> a6ee25e)
This is an automated email from the git hooks/post-receive script. New change to branch feature/7017 in repository observe. See http://git.codelutin.com/observe.git from 4a54a88 mise à jour du programme ouvert lors du déplacement d'une marée (ref #7017) new 6550165 amélioration des erreurs sur le proxy (refs #7017) new 1557801 correction de la méthode onCreate (refs #7017) new a6ee25e correction de la méthode onCreate (refs #7017) The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit a6ee25ec88b44f9f89138d0d2e977432a43ada3f Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Apr 27 15:39:42 2015 +0200 correction de la méthode onCreate (refs #7017) commit 15578010a842b2702f01d1b0e4124b997da7150b Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Apr 27 15:39:20 2015 +0200 correction de la méthode onCreate (refs #7017) commit 655016588b9a67c63384589903d9c51386c7deab Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Apr 27 15:38:55 2015 +0200 amélioration des erreurs sur le proxy (refs #7017) Summary of changes: .../ird/observe/services/AbstractObserveService.java | 4 +--- .../ird/observe/services/ObserveServiceFactory.java | 19 ++++++++++++++----- .../services/data/seine/TripSeineServiceImpl.java | 7 +++++++ 3 files changed, 22 insertions(+), 8 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7017 in repository observe. See http://git.codelutin.com/observe.git commit 655016588b9a67c63384589903d9c51386c7deab Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Apr 27 15:38:55 2015 +0200 amélioration des erreurs sur le proxy (refs #7017) --- .../ird/observe/services/ObserveServiceFactory.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/observe-services/src/main/java/fr/ird/observe/services/ObserveServiceFactory.java b/observe-services/src/main/java/fr/ird/observe/services/ObserveServiceFactory.java index 74bbd77..79f76ef 100644 --- a/observe-services/src/main/java/fr/ird/observe/services/ObserveServiceFactory.java +++ b/observe-services/src/main/java/fr/ird/observe/services/ObserveServiceFactory.java @@ -8,7 +8,6 @@ import com.google.common.collect.Sets; import fr.ird.observe.ObserveApplicationContext; import fr.ird.observe.ObserveTechnicalException; import fr.ird.observe.db.DataSource; -import fr.ird.observe.db.DataSourceException; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.reflect.ConstructorUtils; import org.apache.commons.logging.Log; @@ -181,9 +180,9 @@ public class ObserveServiceFactory implements Closeable { Object result; - if (methodNamesToByPass.contains(method.getName()) || !method.isAnnotationPresent(NoTransaction.class)) { + if (methodNamesToByPass.contains(method.getName()) || method.isAnnotationPresent(NoTransaction.class)) { - result = method.invoke(target, args); + result = invokeMethod(method, args); } else { @@ -195,7 +194,17 @@ public class ObserveServiceFactory implements Closeable { } - protected Object invokeMethodWithTransaction(Method method, Object... args) throws DataSourceException, IllegalAccessException, InvocationTargetException { + protected Object invokeMethod(Method method, Object... args) throws Throwable { + try { + Object result = method.invoke(target, args); + return result; + } catch (InvocationTargetException e) { + throw e.getCause(); + } + } + + + protected Object invokeMethodWithTransaction(Method method, Object... args) throws Throwable { String methodName = method.getName(); @@ -207,7 +216,7 @@ public class ObserveServiceFactory implements Closeable { serviceContext.setTransaction(tx); - Object invoke = method.invoke(target, args); + Object invoke = invokeMethod(method, args); if (method.isAnnotationPresent(Commit.class)) { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7017 in repository observe. See http://git.codelutin.com/observe.git commit 15578010a842b2702f01d1b0e4124b997da7150b Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Apr 27 15:39:20 2015 +0200 correction de la méthode onCreate (refs #7017) --- .../src/main/java/fr/ird/observe/services/AbstractObserveService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/observe-services/src/main/java/fr/ird/observe/services/AbstractObserveService.java b/observe-services/src/main/java/fr/ird/observe/services/AbstractObserveService.java index 4870d6a..7af5a7a 100644 --- a/observe-services/src/main/java/fr/ird/observe/services/AbstractObserveService.java +++ b/observe-services/src/main/java/fr/ird/observe/services/AbstractObserveService.java @@ -267,9 +267,7 @@ public abstract class AbstractObserveService implements ObserveService { } - public E onCreate(P parent, E toCreate) { - return getDao(entityClass).update(toCreate); - }; + public abstract E onCreate(P parent, E toCreate); public abstract E onUpdate(P parentBean, E toSave, E beanToSave); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7017 in repository observe. See http://git.codelutin.com/observe.git commit a6ee25ec88b44f9f89138d0d2e977432a43ada3f Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Apr 27 15:39:42 2015 +0200 correction de la méthode onCreate (refs #7017) --- .../fr/ird/observe/services/data/seine/TripSeineServiceImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/observe-services/src/main/java/fr/ird/observe/services/data/seine/TripSeineServiceImpl.java b/observe-services/src/main/java/fr/ird/observe/services/data/seine/TripSeineServiceImpl.java index 46fb48d..2935943 100644 --- a/observe-services/src/main/java/fr/ird/observe/services/data/seine/TripSeineServiceImpl.java +++ b/observe-services/src/main/java/fr/ird/observe/services/data/seine/TripSeineServiceImpl.java @@ -115,6 +115,13 @@ public class TripSeineServiceImpl extends AbstractObserveService implements Trip } @Override + public TripSeine onCreate(Program parent, TripSeine toCreate) { + TripSeine created = getDao().create(); + getBinderForEdit().copy(toCreate, created); + return created; + } + + @Override public TripSeine onUpdate(Program parentBean, TripSeine toUpdate, TripSeine updated) { getBinderForEdit().copyExcluding(toUpdate, updated, TripSeine.PROPERTY_ROUTE); return updated; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
participants (1)
-
codelutin.com scm