Package javax.ejb

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


        // 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

        // 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

      // 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

      // 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

    * @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

   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

       * 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

            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

   @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

Related Classes of javax.ejb.EJBLocalObject

Copyright © 2018 www.massapicom. 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.