continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r599781 - in /maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test: java/org/apache/maven/continuum/store/ java/org/apache/maven/continuum/store/jpa/ java/org/apache/openjpa/persistence/test/ resources/META-INF/ resources/sql/
Date Fri, 30 Nov 2007 11:22:39 GMT
Author: rinku
Date: Fri Nov 30 03:22:34 2007
New Revision: 599781

URL: http://svn.apache.org/viewvc?rev=599781&view=rev
Log:
o  tests and data for Store implementations.

Added:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java
      - copied, changed from r598174, maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
  (with props)
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
  (with props)
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-group-table-data.sql
Removed:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java
Modified:
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java
    maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml

Copied: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java
(from r598174, maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java)
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java?p2=maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java&p1=maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java&r1=598174&r2=599781&rev=599781&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/StoreTestCase.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/ApplicationContextAwareStoreTestCase.java
Fri Nov 30 03:22:34 2007
@@ -13,19 +13,44 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.continuum.model.CommonPersistableEntity;
+import org.apache.maven.continuum.store.api.Store;
 import org.apache.openjpa.persistence.test.SingleEMTestCase;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
 
 /**
  * Test Case support class that allows extensions to load test data from specified SQL files.
+ * <p>
+ * This also implements Spring's {@link ApplicationContextAware} interface that allows the
{@link ApplicationContext} to
+ * be made available to this test case's extensions.
  * 
  * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
  * @since 1.2
  * @version $Id$
  */
-public abstract class StoreTestCase extends SingleEMTestCase
+public abstract class ApplicationContextAwareStoreTestCase extends SingleEMTestCase implements
ApplicationContextAware
 {
 
     /**
+     * Spring application context.
+     */
+    private ApplicationContext applicationContext;
+
+    /**
+     * {@inheritDoc}
+     * <p>
+     * Spring IoC container injects the {@link ApplicationContext} through here.
+     * 
+     * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
+     */
+    public void setApplicationContext( ApplicationContext applicationContext ) throws BeansException
+    {
+        this.applicationContext = applicationContext;
+    }
+
+    /**
      * @see org.apache.openjpa.persistence.test.SingleEMTestCase#setUp()
      */
     @Override
@@ -124,6 +149,21 @@
                 throw e;
             }
         }
+    }
+
+    /**
+     * Returns the appropriate Store implementation tied to a specific {@link CommonPersistableEntity}.
+     * 
+     * @param <T>
+     * @param t
+     * @param storeBeanReference
+     * @return
+     */
+    @SuppressWarnings( "unchecked" )
+    protected <T extends CommonPersistableEntity> Store<T> getStore( String storeBeanReference
)
+    {
+        Object store = this.applicationContext.getBean( storeBeanReference );
+        return (Store<T>) store;
     }
 
 }

Added: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java?rev=599781&view=auto
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
(added)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
Fri Nov 30 03:22:34 2007
@@ -0,0 +1,109 @@
+/**
+ * 
+ */
+package org.apache.maven.continuum.store.jpa;
+
+import java.io.File;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectGroup;
+import org.apache.maven.continuum.store.ApplicationContextAwareStoreTestCase;
+import org.apache.maven.continuum.store.api.Store;
+import org.apache.maven.continuum.store.api.StoreException;
+import org.apache.openjpa.persistence.OpenJPAQuery;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @since 1.2
+ * @version $Id$
+ * @see <a
+ *      href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200706.mbox/%3CBF2B99E3-7EF3-4E99-91E1-8AEB940524C7@apache.org%3E">
+ *      http://mail-archives.apache.org/mod_mbox/openjpa-users/200706.mbox/%3CBF2B99E3-7EF3-4E99-91E1-8AEB940524C7@apache.org%3E
+ *      </a>
+ */
+@RunWith( SpringJUnit4ClassRunner.class )
+@ContextConfiguration( locations = "/META-INF/spring-config.xml" )
+public class JpaProjectGroupStoreTest extends ApplicationContextAwareStoreTestCase
+{
+    private static final String BEAN_REF__PROJECT_GROUP_STORE = "projectGroupStore";
+
+    private static final String PERSISTENT_UNIT_CONTINUUM_STORE = "continuum-store";
+
+    @Override
+    @Before
+    public void setUp()
+    {
+        File testData = new File( "src/test/resources/sql/project-group-table-data.sql" );
+        Assert.assertTrue( "Unable to find test data resource: " + testData.getAbsolutePath(),
testData.exists() );
+        Properties propMap = new Properties();
+        setUp( propMap );
+
+        // load test data from SQL file.
+        setSqlSource( testData );
+    }
+
+    /**
+     * Returns the name of the persistent-unit setup in <code>persistence.xml</code>.
+     */
+    @Override
+    protected String getPersistenceUnitName()
+    {
+        return PERSISTENT_UNIT_CONTINUUM_STORE;
+    }
+
+    @Test
+    public void testOpenJPASetup()
+    {
+        OpenJPAQuery q = em.createQuery( "select pg from ProjectGroup pg" );
+        String[] sql = q.getDataStoreActions( null );
+        Assert.assertEquals( 1, sql.length );
+        Assert.assertTrue( sql[0].startsWith( "SELECT" ) );
+        List results = q.getResultList();
+        Assert.assertNotNull( results );
+        Assert.assertEquals( 1, results.size() );
+    }
+
+    @Test
+    public void testCreateProjectGroup() throws StoreException
+    {
+        ProjectGroup group = new ProjectGroup();
+        group.setGroupId( "org.sample.group" );
+        group.setName( "Sample Project Group" );
+        group.setDescription( "A sample project group" );
+        group.setModelEncoding( "UTF-8" );
+
+        Assert.assertTrue( null == group.getId() );
+        group = getProjectGroupStore().save( group );
+        Assert.assertTrue( null != group.getId() );
+        Assert.assertTrue( group.getId() > 0L );
+        Assert.assertEquals( 0, group.getProjects().size() );
+    }
+
+    @Override
+    @After
+    public void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
+    /**
+     * Convenience method to get {@link Store} implementation tied to a {@link Project}.
+     * 
+     * @return
+     */
+    private Store<ProjectGroup> getProjectGroupStore()
+    {
+        Store<ProjectGroup> store = getStore( BEAN_REF__PROJECT_GROUP_STORE );
+        return store;
+    }
+
+}

Propchange: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectGroupStoreTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java?rev=599781&r1=599780&r2=599781&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/maven/continuum/store/jpa/JpaProjectStoreTest.java
Fri Nov 30 03:22:34 2007
@@ -8,8 +8,17 @@
 import java.util.Properties;
 
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.store.StoreTestCase;
+import org.apache.maven.continuum.store.ApplicationContextAwareStoreTestCase;
+import org.apache.maven.continuum.store.api.Store;
+import org.apache.maven.continuum.store.api.StoreException;
 import org.apache.openjpa.persistence.OpenJPAQuery;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 /**
  * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
@@ -20,15 +29,19 @@
  *      http://mail-archives.apache.org/mod_mbox/openjpa-users/200706.mbox/%3CBF2B99E3-7EF3-4E99-91E1-8AEB940524C7@apache.org%3E
  *      </a>
  */
-public class JpaProjectStoreTest extends StoreTestCase
+@RunWith( SpringJUnit4ClassRunner.class )
+@ContextConfiguration( locations = "/META-INF/spring-config.xml" )
+public class JpaProjectStoreTest extends ApplicationContextAwareStoreTestCase
 {
+    private static final String BEAN_REF__PROJECT_STORE = "projectStore";
     private static final String PERSISTENT_UNIT_CONTINUUM_STORE = "continuum-store";
 
     @Override
+    @Before
     public void setUp()
     {
         File testData = new File( "src/test/resources/sql/project-table-data.sql" );
-        assertTrue( "Unable to find test data resource: " + testData.getAbsolutePath(), testData.exists()
);
+        Assert.assertTrue( "Unable to find test data resource: " + testData.getAbsolutePath(),
testData.exists() );
         Properties propMap = new Properties();
         setUp( propMap );
 
@@ -45,18 +58,20 @@
         return PERSISTENT_UNIT_CONTINUUM_STORE;
     }
 
+    @Test
     public void testOpenJPASetup()
     {
         OpenJPAQuery q = em.createQuery( "select p from Project p" );
         String[] sql = q.getDataStoreActions( null );
-        assertEquals( 1, sql.length );
-        assertTrue( sql[0].startsWith( "SELECT" ) );
+        Assert.assertEquals( 1, sql.length );
+        Assert.assertTrue( sql[0].startsWith( "SELECT" ) );
         List results = q.getResultList();
-        assertNotNull( results );
-        assertEquals( 2, results.size() );
+        Assert.assertNotNull( results );
+        Assert.assertEquals( 2, results.size() );
     }
-    
-    public void testCreateProject()
+
+    @Test
+    public void testCreateProject() throws StoreException
     {
         Project project = new Project();
         project.setArtifactId( "sample-project" );
@@ -66,8 +81,11 @@
         project.setScmUseCache( false );
         project.setScmUrl( "https://localhost/svn/sample-project" );
         project.setModelEncoding( "UTF-8" );
-        
-        
+
+        Assert.assertTrue( null == project.getId() );
+        project = getProjectStore().save( project );
+        Assert.assertTrue( null != project.getId() );
+        Assert.assertTrue( project.getId() > 0L );
     }
 
     /**
@@ -75,10 +93,22 @@
      * schema.
      */
     @Override
+    @After
     public void tearDown() throws Exception
     {
         super.tearDown();
         // do nothing
+    }
+
+    /**
+     * Convenience method to get {@link Store} implementation tied to a {@link Project}.
+     * 
+     * @return
+     */
+    private Store<Project> getProjectStore()
+    {
+        Store<Project> store = getStore( BEAN_REF__PROJECT_STORE );
+        return store;
     }
 
 }

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java?rev=599781&r1=599780&r2=599781&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
Fri Nov 30 03:22:34 2007
@@ -29,19 +29,17 @@
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.Persistence;
 
-import junit.framework.TestCase;
-
 import org.apache.openjpa.kernel.AbstractBrokerFactory;
 import org.apache.openjpa.kernel.Broker;
 import org.apache.openjpa.meta.ClassMetaData;
 import org.apache.openjpa.persistence.JPAFacadeHelper;
 import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
+import org.junit.Assert;
 
 /**
  * Base test class providing persistence utilities.
  */
-public abstract class PersistenceTestCase
-    extends TestCase {
+public abstract class PersistenceTestCase {
 
     /**
      * Marker object you an pass to {@link #setUp} to indicate that the
@@ -113,12 +111,12 @@
     }
 
     public void tearDown() throws Exception {
-        super.tearDown();
+        //super.tearDown();
     }
 
     /**
      * Safely close the given factory.
-     */
+     */    
     protected boolean closeEMF(EntityManagerFactory emf) {
         if (emf == null)
             return false;
@@ -198,10 +196,10 @@
 
     public static void assertNotEquals(Object o1, Object o2) {
         if (o1 == o2)
-            fail("expected args to be different; were the same instance.");
+            Assert.fail("expected args to be different; were the same instance.");
         else if (o1 == null || o2 == null)
             return;
         else if (o1.equals(o2))
-            fail("expected args to be different; compared equal.");
+            Assert.fail("expected args to be different; compared equal.");
     }
 }

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java?rev=599781&r1=599780&r2=599781&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java
Fri Nov 30 03:22:34 2007
@@ -24,6 +24,7 @@
 import org.apache.openjpa.lib.jdbc.AbstractJDBCListener;
 import org.apache.openjpa.lib.jdbc.JDBCEvent;
 import org.apache.openjpa.lib.jdbc.JDBCListener;
+import org.junit.Assert;
 
 /**
  * Base class for tests that need to check generated SQL.
@@ -56,7 +57,7 @@
                 return;
         }
 
-        fail("Expected regular expression <" + sqlExp + "> to have"
+        Assert.fail("Expected regular expression <" + sqlExp + "> to have"
             + " existed in SQL statements: " + sql);
     }
 
@@ -74,7 +75,7 @@
         }
 
         if (failed)
-            fail("Regular expression <" + sqlExp + ">"
+            Assert.fail("Regular expression <" + sqlExp + ">"
                 + " should not have been executed in SQL statements: " + sql);
     }
 
@@ -89,7 +90,7 @@
                 return;
         }
 
-        fail("Expected regular expression <" + sqlExp + "> to be"
+        Assert.fail("Expected regular expression <" + sqlExp + "> to be"
             + " contained in SQL statements: " + sql);
     }
     

Modified: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml?rev=599781&r1=599780&r2=599781&view=diff
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
(original)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/persistence.xml
Fri Nov 30 03:22:34 2007
@@ -4,12 +4,12 @@
     <!-- provider>org.hibernate.ejb.HibernatePersistence</provider -->
     <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
     
-    <!-- Mapped superclasses -->    
+    <!-- Mapped superclasses -->
     <class>org.apache.maven.continuum.model.CommonPersistableEntity</class> 
  
     <class>org.apache.maven.continuum.model.CommonCreatedEntity</class>
     <class>org.apache.maven.continuum.model.CommonUpdatableEntity</class>
     <class>org.apache.maven.continuum.model.CommonUpdatableModelEntity</class>
   
-        
+    
     <!-- Entities -->    
     <class>org.apache.maven.continuum.model.project.BuildDefinition</class>
     <class>org.apache.maven.continuum.model.project.BuildDefinitionTemplate</class>
@@ -43,7 +43,7 @@
       <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>

       
       <!-- Enable SQL logging in OpenJPA -->
-      <property name="openjpa.Log" value="DefaultLevel=INFO,SQL=TRACE"/>
+      <!-- property name="openjpa.Log" value="DefaultLevel=INFO,SQL=TRACE" /-->
       
       <!-- Change default log level across OpenJPA 
       <property name="openjpa.Log" value="DefaultLevel=TRACE"/>

Added: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml?rev=599781&view=auto
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
(added)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
Fri Nov 30 03:22:34 2007
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  - Middle tier application context definition for the image database.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:context="http://www.springframework.org/schema/context"
+  xmlns:tx="http://www.springframework.org/schema/tx"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+				http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+				http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
+
+
+  <bean id="entityManagerFactory"
+    class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
+    <property name="persistenceUnitName" value="continuum-store" />
+  </bean>
+
+  <!-- Setup the transaction manager -->
+  <bean id="transactionManager"
+    class="org.springframework.orm.jpa.JpaTransactionManager">
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+  <bean id="transactionInterceptor"
+    class="org.springframework.transaction.interceptor.TransactionInterceptor">
+    <property name="transactionManager" ref="transactionManager" />
+    <property name="transactionAttributeSource">
+      <bean
+        class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"
/>
+    </property>
+  </bean>
+
+  <bean id="projectStoreTarget"
+    class="org.apache.maven.continuum.store.jpa.JpaProjectStore">
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <bean id="projectStore"
+    class="org.springframework.aop.framework.ProxyFactoryBean">
+    <property name="targetName" value="projectStoreTarget" />
+    <property name="autodetectInterfaces" value="true" />
+    <property name="interceptorNames">
+      <idref local="transactionInterceptor" />
+    </property>
+  </bean>
+
+  <bean id="projectGroupStoreTarget"
+    class="org.apache.maven.continuum.store.jpa.JpaProjectGroupStore">
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <bean id="projectGroupStore"
+    class="org.springframework.aop.framework.ProxyFactoryBean">
+    <property name="targetName" value="projectGroupStoreTarget" />
+    <property name="autodetectInterfaces" value="true" />
+    <property name="interceptorNames">
+      <idref local="transactionInterceptor" />
+    </property>
+  </bean>
+
+</beans>
\ No newline at end of file

Propchange: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/META-INF/spring-config.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-group-table-data.sql
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-group-table-data.sql?rev=599781&view=auto
==============================================================================
--- maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-group-table-data.sql
(added)
+++ maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/test/resources/sql/project-group-table-data.sql
Fri Nov 30 03:22:34 2007
@@ -0,0 +1,5 @@
+# Test SQL to populate data here
+
+
+INSERT INTO PROJECT_GROUP ( ID, DATE_CREATED, MODEL_ENCODING, DESCRIPTION, GROUP_ID, NAME)

+	VALUES ( 1000, 2007-11-10, 'UTF-8', 'Group for Continuum sub-projects', 'org.apache.continuum',
'Continuum Projects')



Mime
View raw message