Package nexj.core.util

Examples of nexj.core.util.HashHolder


                     if (value instanceof Instance || value instanceof InstanceList)
                     {
                        if (identitySet == null)
                        {
                           identitySet = new HashHolder();
                        }

                        SQLRequestSerializer.addDependency(uow, work, value, identitySet);
                     }
                  }
View Full Code Here


   {
      verifyNotReadOnly();

      if (m_enumerationSet == null)
      {
         m_enumerationSet = new HashHolder();
      }
     
      enumeration = m_type.convert(enumeration);

      if (!m_enumerationSet.add(enumeration))
View Full Code Here

      context.setSecure(false);
      context.setPartitioned(false);

      if (sDataSources != null && !"*".equals(sDataSources))
      {
         dataSourceSet = new HashHolder();

         for (StringTokenizer tokenizer = new StringTokenizer(sDataSources, ",");
              tokenizer.hasMoreTokens();)
         {
            dataSourceSet.add(metadata.getDataSource(tokenizer.nextToken().trim()));
View Full Code Here

   /**
    * @see nexj.core.meta.ui.AttributeMeta#getReadPrivilegeOrdinals()
    */
   public Holder getReadPrivilegeOrdinals()
   {
      Holder set = new HashHolder(2);

      if (m_readPrivilege != null && m_readPrivilege.getOrdinal() >= 0)
      {
         set.add(Primitive.createInteger(m_readPrivilege.getOrdinal()));
      }
     
      if (m_type instanceof ClassMeta)
      {
         if (((ClassMeta)m_type).getReadPrivilegeOrdinal() >= 0)
         {
            set.add(Primitive.createInteger(((ClassMeta)m_type).getReadPrivilegeOrdinal()));
         }
      }

      if (set.size() == 0)
      {
         return null;
      }
     
      return set;
View Full Code Here

    * @return True if the serialized representations match.
    */
   public static boolean equalIgnoreOIDs(URL url, Object obj, Pair attributes)
   {
      obj = RPCUtil.transfer(obj, attributes, RPCUtil.TF_ALL);
      removeOIDs(obj, new HashHolder());
     
      return equal(url, obj);
   }
View Full Code Here

    */
   public void seed(Accessor metaclass, final List resourceNameList, final String sExt,
      final String sMarkerTypeName, final String sMarkerPropertyName, String sTransformation,
      Function enabled, Function delete, ActionContext actx)
   {
      final Set nameSet = new HashHolder(resourceNameList.size());

      nameSet.addAll(resourceNameList);

      seed(sTransformation, enabled, delete, new ResourceLoader()
      {
         public void seedResources(XMLMetadataHelper helper, final CharacterStreamHandler handler)
         {
            helper.loadResources(sExt, sMarkerTypeName, sMarkerPropertyName, new CharacterStreamHandler()
            {
               public void handleCharacterStream(Reader reader, String sName) throws IOException
               {
                  if (nameSet.contains(sName))
                  {
                     handler.handleCharacterStream(reader, sName);
                  }
               }
            }, null);
View Full Code Here

      m_sysGenerateEvent = (PCodeFunction)m_env.getVariable(Symbol.SYS_GENERATE_EVENT);
   }

   public void testComputeGlobals()
   {
      Set symbolSet = new HashHolder();

      m_sysGenerateEvent.computeGlobals(symbolSet, m_env);
      assertEquals(2, symbolSet.size());
      assertTrue(symbolSet.contains(Symbol.define("reverse!")));
      assertTrue(symbolSet.contains(Symbol.define("reverse2!")));

      symbolSet.clear();
      m_sysGenerateEvent.computeGlobals(symbolSet, null);
      assertEquals(2, symbolSet.size());
      assertTrue(symbolSet.contains(Symbol.define("reverse!")));
      assertTrue(symbolSet.contains(Symbol.define("reverse2!")));
   }
View Full Code Here

    */
   public boolean addProblemFile(String sFileName)
   {
      if (m_problemFileNameSet == null)
      {
         m_problemFileNameSet = new HashHolder();
      }

      return m_problemFileNameSet.add(sFileName);
   }
View Full Code Here

         mconn.setRecovery(true);

         // Cannot mconn.destroy() as managed connection is needed for XAResource operation
         if (m_recoveryConnectionHolder == null)
         {
            m_recoveryConnectionHolder = new HashHolder(specs.length);
         }

         m_recoveryConnectionHolder.add(mconn);
      }
View Full Code Here

    * @return list of all attributes included in the message
    */
   public static Pair getAttributes(CompositeMessagePart composite)
   {
      ObjectMessagePartMapping mapping = (ObjectMessagePartMapping)composite.getMapping();
      Set currPathSet = new HashHolder();     // keeps track of cycle(s) in messages

      currPathSet.add(composite);

      return (Pair)mapping.getAttributes(composite, currPathSet, null);
   }
View Full Code Here

TOP

Related Classes of nexj.core.util.HashHolder

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.