Examples of EJBLocalObject


Examples of javax.ejb.EJBLocalObject

    }

    private Object getRelatedPrimaryKey(Object localObject) {
        Object relatedId;
        if (relatedEntity.getLocalInterface().isAssignableFrom(localObject.getClass())) {
            EJBLocalObject local = (EJBLocalObject) localObject;
            try {
                relatedId = local.getPrimaryKey();
            } catch (NoSuchObjectLocalException e) {
                throw new IllegalArgumentException(e.getMessage());
            }

            /*
 
View Full Code Here

Examples of javax.ejb.EJBLocalObject

        // get a set of the argument collection's ids
        List argIds = new ArrayList();
        Iterator iterator = c.iterator();
        while (iterator.hasNext()) {
            EJBLocalObject localObject = (EJBLocalObject) iterator.next();
            Object relatedId = getPrimaryKey(localObject);
            argIds.add(relatedId);
        }

        boolean isModified = false;
View Full Code Here

Examples of javax.ejb.EJBLocalObject

        // get a set of the argument collection's ids
        List argIds = new ArrayList();
        Iterator iterator = c.iterator();
        while (iterator.hasNext()) {
            EJBLocalObject localObject = (EJBLocalObject) iterator.next();
            Object relatedId = getPrimaryKey(localObject);
            argIds.add(relatedId);
        }

        return idList.containsAll(argIds);
View Full Code Here

Examples of javax.ejb.EJBLocalObject

      // get a set of the argument collection's ids
      List argIds = new ArrayList();
      Iterator iterator = c.iterator();
      while(iterator.hasNext())
      {
         EJBLocalObject localObject = (EJBLocalObject) iterator.next();
         Object relatedId = getPrimaryKey(localObject);
         argIds.add(relatedId);
      }

      boolean isModified = false;
View Full Code Here

Examples of javax.ejb.EJBLocalObject

      // get a set of the argument collection's ids
      List argIds = new ArrayList();
      Iterator iterator = c.iterator();
      while(iterator.hasNext())
      {
         EJBLocalObject localObject = (EJBLocalObject) iterator.next();
         Object relatedId = getPrimaryKey(localObject);
         argIds.add(relatedId);
      }

      return idList.containsAll(argIds);
View Full Code Here

Examples of javax.ejb.EJBLocalObject

    * @param fk - foreign key value.
    * @return related local object instance.
    */
   public EJBLocalObject getRelatedEntityByFK(Object fk)
   {
      EJBLocalObject relatedLocalObject = null;
      final EntityContainer relatedContainer = getRelatedContainer();

      if(hasFKFieldsMappedToCMPFields
         && relatedManager.getReadAheadCache().getPreloadDataMap(fk, false) == null // not in preload cache
      )
View Full Code Here

Examples of javax.ejb.EJBLocalObject

   private Object getRelatedPrimaryKey(Object localObject)
   {
      Object relatedId;
      if(relatedEntity.getLocalInterface().isAssignableFrom(localObject.getClass()))
      {
         EJBLocalObject local = (EJBLocalObject) localObject;
         try
         {
            relatedId = local.getPrimaryKey();
         }
         catch(NoSuchObjectLocalException e)
         {
            throw new IllegalArgumentException(e.getMessage());
         }
View Full Code Here

Examples of javax.ejb.EJBLocalObject

       * Have to remove through EJB[Local}Object interface since the proxy contains the 'removed' flag
       * to be set on removal.
       */
      if(container.getLocalProxyFactory() != null)
      {
         final EJBLocalObject ejbObject = container.getLocalProxyFactory().getEntityEJBLocalObject(relatedId);
         ejbObject.remove();
      }
      else
      {
         final EJBObject ejbObject = (EJBObject)container.getProxyFactory().getEntityEJBObject(relatedId);
         ejbObject.remove();
      }
   }
View Full Code Here

Examples of javax.ejb.EJBLocalObject

            new EJBLocalObjectInvocationHandler(proxyInvocationInfoMap,
                                                localIntf);
        localObjImpl = handler;
       
        try {
            EJBLocalObject localObjectProxy = (EJBLocalObject) ejbLocalObjectProxyCtor.newInstance(new Object[]{handler});
            handler.setProxy(localObjectProxy);
        } catch (ClassCastException e) {
            String msg = localStrings.getLocalString("ejb.basecontainer_invalid_local_interface",
                    "Local component interface [{0}] is invalid since it does not extend javax.ejb.EJBLocalObject.", localIntf);
            throw new IllegalArgumentException(msg, e);
View Full Code Here

Examples of javax.ejb.EJBLocalObject

   @Override
   public EJBLocalObject getEJBLocalObject() throws IllegalStateException
   {
      try
      {
         EJBLocalObject proxy = (EJBLocalObject) container.createProxyLocalEjb21();
         return proxy;
      }
      catch (Exception e)
      {
         throw new IllegalStateException(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.