From c904aa1917913bac1adc5b4f5436d13c0c60d6dc Mon Sep 17 00:00:00 2001 From: mdb Date: Wed, 15 Aug 2007 19:00:50 +0000 Subject: [PATCH] git-svn-id: https://samskivert.googlecode.com/svn/trunk@2186 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../com/samskivert/jdbc/depot/DepotRepository.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/java/com/samskivert/jdbc/depot/DepotRepository.java b/src/java/com/samskivert/jdbc/depot/DepotRepository.java index f93a14b3..9a174a29 100644 --- a/src/java/com/samskivert/jdbc/depot/DepotRepository.java +++ b/src/java/com/samskivert/jdbc/depot/DepotRepository.java @@ -381,8 +381,8 @@ public abstract class DepotRepository * * @param type the type of the persistent object to be modified. * @param key the key to match in the update. - * @param invalidator a cache invalidator that will be prior to the update to flush the - * relevant persistent objects from the cache. + * @param invalidator a cache invalidator that will be run prior to the update to flush the + * relevant persistent objects from the cache, or null if no invalidation is needed. * @param fieldsValues an array containing the names of the fields/columns and the values to be * assigned, in key, value, key, value, etc. order. * @@ -393,7 +393,9 @@ public abstract class DepotRepository throws PersistenceException { // sanity check - invalidator.validateFlushType(type); + if (invalidator != null) { + invalidator.validateFlushType(type); + } // separate the arguments into keys and values final String[] fields = new String[fieldsValues.length/2]; @@ -520,7 +522,9 @@ public abstract class DepotRepository requireNotComputed(type, "updateLiteral"); // sanity check - invalidator.validateFlushType(type); + if (invalidator != null) { + invalidator.validateFlushType(type); + } // separate the arguments into keys and values final String[] fields = new String[fieldsToValues.size()];