Author: navssurtani
Date: 2008-06-30 08:55:26 -0400 (Mon, 30 Jun 2008)
New Revision: 14826
Added:
search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/
search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/Cfg.java
search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/CfgImpl.java
Log:
Updated version and package info
Added: search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/Cfg.java
===================================================================
--- search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/Cfg.java
(rev 0)
+++
search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/Cfg.java 2008-06-30
12:55:26 UTC (rev 14826)
@@ -0,0 +1,20 @@
+package org.hibernate.search.cfg;
+
+import org.hibernate.mapping.PersistentClass;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * @author Navin Surtani - navin(a)surtani.org
+ */
+public interface Cfg
+{
+ Iterator getClassMappings();
+
+ PersistentClass getClassMapping(String name);
+
+ String getProperty(String propertyName);
+
+ Properties getProperties();
+}
Added:
search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/CfgImpl.java
===================================================================
---
search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/CfgImpl.java
(rev 0)
+++
search/branches/jboss_cache_integration/src/java/org/hibernate/search/cfg/CfgImpl.java 2008-06-30
12:55:26 UTC (rev 14826)
@@ -0,0 +1,41 @@
+package org.hibernate.search.cfg;
+
+import org.hibernate.mapping.PersistentClass;
+import org.hibernate.cfg.Configuration;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * @author Navin Surtani - navin(a)surtani.org
+ */
+public class CfgImpl implements Cfg
+{
+ private Configuration cfg;
+
+ public CfgImpl(Configuration cfg)
+ {
+ if (cfg == null) throw new NullPointerException("Configuration is
null");
+ this.cfg = cfg;
+ }
+
+ public Iterator getClassMappings()
+ {
+ return cfg.getClassMappings();
+ }
+
+ public PersistentClass getClassMapping(String name)
+ {
+ return cfg.getClassMapping(name);
+ }
+
+ public String getProperty(String propertyName)
+ {
+ return cfg.getProperty(propertyName);
+ }
+
+ public Properties getProperties()
+ {
+ return cfg.getProperties();
+ }
+}
Show replies by date