User: oberg   
  Date: 00/05/30 11:32:27

  Modified:    src/main/org/jboss/ejb/plugins/jrmp/interfaces
                        EntityProxy.java
  Log:
  Major update. Too much to mention.
  
  Revision  Changes    Path
  1.8       +11 -1     
jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/EntityProxy.java
  
  Index: EntityProxy.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/EntityProxy.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- EntityProxy.java  2000/05/12 12:18:41     1.7
  +++ EntityProxy.java  2000/05/30 18:32:26     1.8
  @@ -19,7 +19,7 @@
    *      
    *      @see <related>
    *      @author Rickard �berg ([EMAIL PROTECTED])
  - *      @version $Revision: 1.7 $
  + *      @version $Revision: 1.8 $
    */
   public abstract class EntityProxy
      extends GenericProxy
  @@ -35,6 +35,7 @@
      static Method isIdentical;
      static Method toStr;
      static Method eq;
  +   static Method hash;
      
      static
      {
  @@ -45,6 +46,7 @@
            isIdentical = EJBObject.class.getMethod("isIdentical", new Class[] { 
EJBObject.class });
            toStr = Object.class.getMethod("toString", new Class[0]);
            eq = Object.class.getMethod("equals", new Class[] { Object.class });
  +           hash = Object.class.getMethod("hashCode", new Class[0]);
         } catch (Exception e)
         {
            e.printStackTrace();
  @@ -86,6 +88,14 @@
         else if (m.equals(eq))
         {
            return invoke(proxy, isIdentical, args);
  +      }
  +      else if (m.equals(isIdentical))
  +      {
  +                     return new 
Boolean(((EJBObject)args[0]).getPrimaryKey().equals(id));
  +      }
  +      else if (m.equals(hash))
  +      {
  +             return new Integer(id.hashCode());
         }
         else
         {
  
  
  

Reply via email to