Home » openejb-3.1.2-src » org.openejb.test.simple » bmp » [javadoc | source]

    1   /* ====================================================================
    2    * Redistribution and use of this software and associated documentation
    3    * ("Software"), with or without modification, are permitted provided
    4    * that the following conditions are met:
    5    *
    6    * 1. Redistributions of source code must retain copyright
    7    *    statements and notices.  Redistributions must also contain a
    8    *    copy of this document.
    9    *
   10    * 2. Redistributions in binary form must reproduce this list of
   11    *    conditions and the following disclaimer in the documentation
   12    *    and/or other materials provided with the distribution.
   13    *
   14    * 3. The name "OpenEJB" must not be used to endorse or promote
   15    *    products derived from this Software without prior written
   16    *    permission of The OpenEJB Group.  For written permission,
   17    *    please contact openejb-group@openejb.sf.net.
   18    *
   19    * 4. Products derived from this Software may not be called "OpenEJB"
   20    *    nor may "OpenEJB" appear in their names without prior written
   21    *    permission of The OpenEJB Group. OpenEJB is a registered
   22    *    trademark of The OpenEJB Group.
   23    *
   24    * 5. Due credit should be given to the OpenEJB Project
   25    *    (http://openejb.org/).
   26    *
   27    * THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
   28    * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
   29    * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   30    * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
   31    * THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
   32    * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   33    * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   34    * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   35    * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   36    * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   37    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
   38    * OF THE POSSIBILITY OF SUCH DAMAGE.
   39    *
   40    * ====================================================================
   41    *
   42    * This software consists of voluntary contributions made by many
   43    * individuals on behalf of the OpenEJB Project.  For more information
   44    * please see <http://openejb.org/>.
   45    *
   46    * ====================================================================
   47    */
   48   package org.openejb.test.simple.bmp;
   49   
   50   import javax.ejb.EJBException;
   51   import javax.ejb.EntityBean;
   52   import javax.ejb.EntityContext;
   53   import javax.ejb.RemoveException;
   54   
   55   /**
   56    * 
   57    * 
   58    * @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
   59    */
   60   public class SimpleBMPEntityEJB implements EntityBean {
   61       private static final Integer PK = new Integer(1);
   62       private static String name = "SomeName";
   63       private static String value = "SomeValue";
   64   
   65       public Integer ejbCreate() {
   66           return PK;
   67       }
   68   
   69       public void ejbPostCreate() {
   70       }
   71   
   72       public Integer ejbFindByPrimaryKey(Integer key) throws javax.ejb.FinderException {
   73           if(PK.equals(key)) {
   74               return PK;
   75           } else {
   76               return null;
   77           }
   78       }
   79   
   80       public String getName() {
   81           return name;
   82       }
   83   
   84       public void setName(String name) {
   85           SimpleBMPEntityEJB.name = name;
   86       }
   87   
   88       public String getValue() {
   89           return value;
   90       }
   91   
   92       public void setValue(String value) {
   93           SimpleBMPEntityEJB.value = value;
   94       }
   95   
   96       public void ejbActivate() throws EJBException {
   97       }
   98   
   99       public void ejbLoad() throws EJBException {
  100       }
  101   
  102       public void ejbPassivate() throws EJBException {
  103       }
  104   
  105       public void ejbRemove() throws RemoveException, EJBException {
  106       }
  107   
  108       public void ejbStore() throws EJBException {
  109       }
  110   
  111       public void setEntityContext(EntityContext ctx) throws EJBException {
  112       }
  113   
  114       public void unsetEntityContext() throws EJBException {
  115       }
  116   }

Home » openejb-3.1.2-src » org.openejb.test.simple » bmp » [javadoc | source]