Save This Page
Home » openejb-3.1.2-src » javax » ejb » [javadoc | source]
    1   /*
    2   * JBoss, Home of Professional Open Source
    3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
    4   * by the @authors tag. See the copyright.txt in the distribution for a
    5   * full listing of individual contributors.
    6   *
    7   * This is free software; you can redistribute it and/or modify it
    8   * under the terms of the GNU Lesser General Public License as
    9   * published by the Free Software Foundation; either version 2.1 of
   10   * the License, or (at your option) any later version.
   11   *
   12   * This software is distributed in the hope that it will be useful,
   13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   15   * Lesser General Public License for more details.
   16   *
   17   * You should have received a copy of the GNU Lesser General Public
   18   * License along with this software; if not, write to the Free
   19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
   21   */
   22   package javax.ejb;
   23   
   24   /**
   25    * <p>The EJBLocalObject interface must be extended by all enterprise
   26    * Beans' local interfaces. An enterprise Bean's local interface provides
   27    * the local client view of an EJB object. An enterprise Bean's local interface
   28    * defines the business methods callable by local clients.</p>
   29    *
   30    * <p>The enterprise Bean's local interface is defined by the enterprise Bean
   31    * provider and implemented by the enterprise Bean container.</p>
   32    */
   33   public interface EJBLocalObject {
   34   
   35     /**
   36      * Obtain the enterprise Bean's local home interface. The local home interface
   37      * defines the enterprise Bean's create, finder, remove, and home business methods
   38      * that are available to local clients.
   39      *
   40      * @return A reference to the enterprise Bean's local home interface.
   41      * @exception EJBException - Thrown when the method failed due to a system-level failure.
   42      */
   43     public EJBLocalHome getEJBLocalHome()
   44       throws EJBException;
   45   
   46     /**
   47      * <p>Obtain the primary key of the EJB local object.</p>
   48      *
   49      * <p>This method can be called on an entity bean. An attempt to invoke this method
   50      * on a session Bean will result in an EJBException.</p>
   51      *
   52      * @return The EJB local object's primary key.
   53      * @exception EJBException - Thrown when the method failed due to a system-level failure.
   54      */
   55     public java.lang.Object getPrimaryKey()
   56       throws EJBException;
   57   
   58     /**
   59      * Remove the EJB local object.
   60      *
   61      * @exception RemoveException - The enterprise Bean or the container does not allow
   62      *                              destruction of the object.
   63      * @exception EJBException - Thrown when the method failed due to a system-level failure.
   64      */
   65     public void remove()
   66       throws RemoveException, EJBException;
   67   
   68     /**
   69      * Test if a given EJB local object is identical to the invoked EJB local object.
   70      *
   71      * @param obj - An object to test for identity with the invoked object.
   72      * @return True if the given EJB local object is identical to the invoked object, false otherwise.
   73      * @exception EJBException - Thrown when the method failed due to a system-level failure.
   74      */
   75     public boolean isIdentical(EJBLocalObject obj)
   76       throws EJBException;
   77   }

Save This Page
Home » openejb-3.1.2-src » javax » ejb » [javadoc | source]