From 7628015221e254754e2fda5cfd3d9102e8a2421b Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 22 Jul 2010 11:54:15 +0000 Subject: [PATCH] --- .../persistence/hibernate/HibernateSupport.java | 9 ++++----- .../org/wamblee/test/spring/HibernateUtils.java | 15 ++++++--------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/support/spring/src/main/java/org/wamblee/persistence/hibernate/HibernateSupport.java b/support/spring/src/main/java/org/wamblee/persistence/hibernate/HibernateSupport.java index 52dbc352..8eb7790b 100644 --- a/support/spring/src/main/java/org/wamblee/persistence/hibernate/HibernateSupport.java +++ b/support/spring/src/main/java/org/wamblee/persistence/hibernate/HibernateSupport.java @@ -22,9 +22,8 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.Map.Entry; +import java.util.logging.Logger; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.springframework.orm.hibernate3.HibernateTemplate; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import org.wamblee.persistence.Persistent; @@ -36,7 +35,7 @@ import org.wamblee.persistence.Persistent; * @author Erik Brakkee */ public class HibernateSupport extends HibernateDaoSupport { - private static final Log LOG = LogFactory.getLog(HibernateSupport.class); + private static final Logger LOG = Logger.getLogger(HibernateSupport.class.getName()); /** * Constructs the object. @@ -111,11 +110,11 @@ public class HibernateSupport extends HibernateDaoSupport { aProcessed.add(elem); - LOG.debug("Setting pk/version on " + aPersistent + " from " + aMerged); + LOG.fine("Setting pk/version on " + aPersistent + " from " + aMerged); if ((aPersistent.getPrimaryKey() != null) && !aMerged.getPrimaryKey().equals(aPersistent.getPrimaryKey())) { - LOG.error("Mismatch between primary key values: " + aPersistent + + LOG.warning("Mismatch between primary key values: " + aPersistent + " " + aMerged); } else { aPersistent.setPersistedVersion(aMerged.getPersistedVersion()); diff --git a/support/spring/src/test/java/org/wamblee/test/spring/HibernateUtils.java b/support/spring/src/test/java/org/wamblee/test/spring/HibernateUtils.java index a370a404..edefc373 100644 --- a/support/spring/src/test/java/org/wamblee/test/spring/HibernateUtils.java +++ b/support/spring/src/test/java/org/wamblee/test/spring/HibernateUtils.java @@ -15,21 +15,18 @@ */ package org.wamblee.test.spring; -import org.apache.oro.io.AwkFilenameFilter; - -import org.hibernate.cfg.Configuration; - -import org.wamblee.io.ClassPathResource; -import org.wamblee.io.InputResource; - import java.io.File; import java.io.FileFilter; import java.io.IOException; - import java.util.Map; import java.util.Properties; import java.util.TreeMap; +import org.hibernate.cfg.Configuration; +import org.wamblee.io.ClassPathResource; +import org.wamblee.io.InputResource; +import org.wamblee.io.RegexFilenameFilter; + /** * Hibernate utilities. * @@ -55,7 +52,7 @@ public final class HibernateUtils { */ public static Configuration getConfiguration(File aDir) throws IOException { Configuration conf = new Configuration(); - File[] files = aDir.listFiles((FileFilter) (new AwkFilenameFilter( + File[] files = aDir.listFiles((FileFilter) (new RegexFilenameFilter( ".*\\.hbm\\.xml"))); for (File f : files) { -- 2.31.1