1 21 package net.mlw.vlh.adapter.hibernate3.util.setter; 22 23 import java.text.ParseException ; 24 25 import org.apache.commons.logging.Log; 26 import org.apache.commons.logging.LogFactory; 27 import org.hibernate.HibernateException; 28 import org.hibernate.Query; 29 30 36 public class DefaultSetter extends AbstractSetter 37 { 38 41 private static final Log LOGGER = LogFactory.getLog(DefaultSetter.class); 42 43 public void set(Query query, String key, Object value) throws HibernateException, ParseException 44 { 45 if (LOGGER.isInfoEnabled()) 46 { 47 LOGGER.info("The key='" + key + "' was set to the query as the parameter='" + value + "'."); 48 } 49 query.setParameter(key, value); 50 } 51 } | Popular Tags |