Author: pete.muir(a)jboss.org
Date: 2009-03-26 13:14:47 -0400 (Thu, 26 Mar 2009)
New Revision: 2216
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJpaServices.java
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJpaServices.java
Log:
oops
Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJpaServices.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJpaServices.java
(rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJpaServices.java 2009-03-26
17:14:47 UTC (rev 2216)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.jboss.webbeans.mock;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.inject.manager.InjectionPoint;
+import javax.persistence.Entity;
+
+import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
+import org.jboss.webbeans.jpa.spi.JpaServices;
+
+public class MockJpaServices implements JpaServices
+{
+
+ private final WebBeanDiscovery webBeanDiscovery;
+
+ public MockJpaServices(WebBeanDiscovery webBeanDiscovery)
+ {
+ this.webBeanDiscovery = webBeanDiscovery;
+ }
+
+ public Object resolvePersistenceContext(InjectionPoint injectionPoint)
+ {
+ return null;
+ }
+
+ public Iterable<Class<?>> discoverEntities()
+ {
+ Set<Class<?>> classes = new HashSet<Class<?>>();
+ for (Class<?> clazz : webBeanDiscovery.discoverWebBeanClasses())
+ {
+ if (clazz.isAnnotationPresent(Entity.class))
+ {
+ classes.add(clazz);
+ }
+ }
+ return classes;
+ }
+
+}
\ No newline at end of file
Property changes on:
ri/trunk/impl/src/main/java/org/jboss/webbeans/mock/MockJpaServices.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJpaServices.java
===================================================================
--- ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJpaServices.java
(rev 0)
+++
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJpaServices.java 2009-03-26
17:14:47 UTC (rev 2216)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.bootstrap.api.test;
+
+import javax.inject.manager.InjectionPoint;
+
+import org.jboss.webbeans.jpa.spi.JpaServices;
+
+public class MockJpaServices implements JpaServices
+{
+
+ public Iterable<Class<?>> discoverEntities()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object resolvePersistenceContext(InjectionPoint injectionPoint)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on:
ri/trunk/spi/src/test/java/org/jboss/webbeans/bootstrap/api/test/MockJpaServices.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Show replies by date