Package nexj.core.rpc

Examples of nexj.core.rpc.InstanceFactory


      };

      try
      {
         List list = (List)new SOAPUnmarshaller(m_context).deserialize(reader);
         InstanceFactory factory = new InstanceFactory(InstanceFactory.STATE, m_context);

         for (int i = 0; i != list.size(); ++i)
         {
            factory.instantiate((TransferObject)list.get(i));
         }

         factory.complete();

         for (Iterator itr = factory.getIdentityMap().valueIterator(); itr.hasNext();)
         {
            Object obj = itr.next();

            if (obj instanceof Instance)
            {
View Full Code Here


            throw new UncheckedException("err.rpc.valueDeserialization", e);
         }

         m_map = new PropertyHashTab(tobj.getValueCount());

         InstanceFactory factory = null;

         for (PropertyIterator itr = tobj.getIterator(); itr.hasNext();)
         {
            String sName = (String)itr.next();
            Object value = itr.getValue();

            if ((value instanceof List || value instanceof TransferObject) && m_nSafeMode != RAW)
            {
               if (factory == null)
               {
                  factory = new InstanceFactory(context);
               }

               if (m_nSafeMode != FAIL)
               {
                  try
                  {
                     value = factory.instantiate(value);
                  }
                  catch (RuntimeException e)
                  {
                     if (m_nSafeMode == SKIP)
                     {
                        continue;
                     }
                  }
               }
               else
               {
                  value = factory.instantiate(value);
               }
            }

            m_map.put(sName, value);
         }
View Full Code Here

      Instance inst = null;

      try
      {
         context.setSecure(false);
         InstanceFactory instanceFactory = new InstanceFactory(new HashTab(), new ArrayList(), InstanceFactory.STATE, context);

         inst = instanceFactory.instantiate(tobj);

         instanceFactory.complete();
      }
      finally
      {
         context.setSecure(bSecured);
      }
View Full Code Here

    */
   public void importData(Iterator tobjItr, Set dataSourceSet, boolean bEmpty)
   {
      m_context.getUnitOfWork().setMaxChangeCount(-1);

      InstanceFactory factory = new InstanceFactory(m_context);

      while (tobjItr.hasNext())
      {
         factory.instantiate((TransferObject)tobjItr.next());
      }

      for (Iterator itr = factory.getIdentityMap().valueIterator(); itr.hasNext();)
      {
         Object obj = itr.next();

         if (obj instanceof Instance)
         {
View Full Code Here

         }

         int nOffset = 0;
         int nCount = tobjList.size();
         InstanceList instanceList = new InstanceArrayList(nCount);
         InstanceFactory factory = new InstanceFactory(identityMap, null, InstanceFactory.STATE, context);

         for (int i = 0; i < nCount && (m_nMaxCount < 0 || instanceList.size() < m_nMaxCount); ++i)
         {
            TransferObject tobj = (TransferObject)tobjList.get(i);

            m_instance = tobj;

            if (bFiltered || m_where == null || !Boolean.FALSE.equals(m_where.getValue()))
            {
               Instance instance = factory.instantiate(tobj);

               identityMap.clear();

               if (isJoin())
               {
                  join(instance, getAdapter().getOID(instance, m_childItem));
               }

               if (nOffset++ >= m_nOffset)
               {
                  instanceList.add(instance);
               }
            }
         }

         if (bCached && !bMissed && factory.isLockMismatch())
         {
            bCached = false;

            continue;
         }
View Full Code Here

            throw new UncheckedException("err.rpc.valueDeserialization", e);
         }
      }

      TransferObject instances = (TransferObject)tobj.findValue(":instances");
      InstanceFactory factory = null;

      for (int i = 0, n = m_flow.getVariableCount(); i != n; ++i)
      {
         Variable var = m_flow.getVariable(i);
         Object value = tobj.findValue(var.getName());

         if (value == null && instances != null)
         {
            value = instances.findValue(var.getName());

            if (value instanceof List || value instanceof TransferObject)
            {
               if (factory == null)
               {
                  factory = new InstanceFactory(context);
               }

               value = factory.instantiate(value);
            }
         }

         setValue(var, value);
      }
View Full Code Here

TOP

Related Classes of nexj.core.rpc.InstanceFactory

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.