[jboss-cvs] JBossAS SVN: r104898 - in projects/ejb-book/trunk: chxx-poker/src/test/java/org/jboss/ejb3/examples/chxx/transactions and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 17 21:47:27 EDT 2010


Author: ALRubinger
Date: 2010-05-17 21:47:27 -0400 (Mon, 17 May 2010)
New Revision: 104898

Added:
   projects/ejb-book/trunk/testsupport/src/main/java/org/jboss/ejb3/examples/testsupport/entity/
   projects/ejb-book/trunk/testsupport/src/main/java/org/jboss/ejb3/examples/testsupport/entity/IdentityBase.java
Removed:
   projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/IdentityBase.java
Modified:
   projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/Account.java
   projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/User.java
   projects/ejb-book/trunk/chxx-poker/src/test/java/org/jboss/ejb3/examples/chxx/transactions/TransactionalPokerGameIntegrationTest.java
Log:
[EJBBOOK-25] Move the IdentityBase to test support

Modified: projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/Account.java
===================================================================
--- projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/Account.java	2010-05-18 01:40:37 UTC (rev 104897)
+++ projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/Account.java	2010-05-18 01:47:27 UTC (rev 104898)
@@ -30,6 +30,7 @@
 import javax.persistence.Transient;
 
 import org.jboss.ejb3.examples.chxx.transactions.api.InsufficientBalanceException;
+import org.jboss.ejb3.examples.testsupport.entity.IdentityBase;
 
 /**
  * Entity representing a bank account; maintains a current balance

Deleted: projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/IdentityBase.java
===================================================================
--- projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/IdentityBase.java	2010-05-18 01:40:37 UTC (rev 104897)
+++ projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/IdentityBase.java	2010-05-18 01:47:27 UTC (rev 104898)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
-  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.examples.chxx.transactions.entity;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.MappedSuperclass;
-
-/**
- * Base class for all entities with an ID
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
- at Entity
- at MappedSuperclass
-public abstract class IdentityBase
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Instance Members -------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Primary key 
-    */
-   @Id
-   private Long id;
-
-   //-------------------------------------------------------------------------------------||
-   // Accessors / Mutators ---------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * @return the id
-    */
-   public Long getId()
-   {
-      return id;
-   }
-
-   /**
-    * @param id the id to set
-    */
-   public void setId(final Long id)
-   {
-      this.id = id;
-   }
-
-}

Modified: projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/User.java
===================================================================
--- projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/User.java	2010-05-18 01:40:37 UTC (rev 104897)
+++ projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/User.java	2010-05-18 01:47:27 UTC (rev 104898)
@@ -25,6 +25,8 @@
 import javax.persistence.Entity;
 import javax.persistence.OneToOne;
 
+import org.jboss.ejb3.examples.testsupport.entity.IdentityBase;
+
 /**
  * Entity representing a user of the poker service
  *

Modified: projects/ejb-book/trunk/chxx-poker/src/test/java/org/jboss/ejb3/examples/chxx/transactions/TransactionalPokerGameIntegrationTest.java
===================================================================
--- projects/ejb-book/trunk/chxx-poker/src/test/java/org/jboss/ejb3/examples/chxx/transactions/TransactionalPokerGameIntegrationTest.java	2010-05-18 01:40:37 UTC (rev 104897)
+++ projects/ejb-book/trunk/chxx-poker/src/test/java/org/jboss/ejb3/examples/chxx/transactions/TransactionalPokerGameIntegrationTest.java	2010-05-18 01:47:27 UTC (rev 104898)
@@ -46,6 +46,7 @@
 import org.jboss.ejb3.examples.testsupport.dbinit.DbInitializerLocalBusiness;
 import org.jboss.ejb3.examples.testsupport.dbquery.DbQueryBean;
 import org.jboss.ejb3.examples.testsupport.dbquery.DbQueryLocalBusiness;
+import org.jboss.ejb3.examples.testsupport.entity.IdentityBase;
 import org.jboss.ejb3.examples.testsupport.txwrap.ForcedTestException;
 import org.jboss.ejb3.examples.testsupport.txwrap.TaskExecutionException;
 import org.jboss.ejb3.examples.testsupport.txwrap.TxWrappingLocalBusiness;
@@ -96,7 +97,7 @@
             BankLocalBusiness.class.getPackage(), User.class.getPackage()).addManifestResource("persistence.xml")
             .addPackages(false, DbInitializerBean.class.getPackage(), TxWrappingLocalBusiness.class.getPackage(),
                   BankBean.class.getPackage(), DbInitializerLocalBusiness.class.getPackage(),
-                  DbQueryBean.class.getPackage());
+                  DbQueryBean.class.getPackage(), IdentityBase.class.getPackage());
       log.info(archive.toString(true));
       return archive;
    }

Copied: projects/ejb-book/trunk/testsupport/src/main/java/org/jboss/ejb3/examples/testsupport/entity/IdentityBase.java (from rev 104691, projects/ejb-book/trunk/chxx-poker/src/main/java/org/jboss/ejb3/examples/chxx/transactions/entity/IdentityBase.java)
===================================================================
--- projects/ejb-book/trunk/testsupport/src/main/java/org/jboss/ejb3/examples/testsupport/entity/IdentityBase.java	                        (rev 0)
+++ projects/ejb-book/trunk/testsupport/src/main/java/org/jboss/ejb3/examples/testsupport/entity/IdentityBase.java	2010-05-18 01:47:27 UTC (rev 104898)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.examples.testsupport.entity;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.MappedSuperclass;
+
+/**
+ * Base class for all entities with an ID
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Entity
+ at MappedSuperclass
+public abstract class IdentityBase
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Primary key 
+    */
+   @Id
+   private Long id;
+
+   //-------------------------------------------------------------------------------------||
+   // Accessors / Mutators ---------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * @return the id
+    */
+   public Long getId()
+   {
+      return id;
+   }
+
+   /**
+    * @param id the id to set
+    */
+   public void setId(final Long id)
+   {
+      this.id = id;
+   }
+
+}




More information about the jboss-cvs-commits mailing list