Package nexj.core.util

Examples of nexj.core.util.HashHolder


    */
   protected void buildDependentMsgPartsMap(CompositeMessagePart composite)
   {
      if (!m_bDependencyMapCreated)
      {
         Set currPathSet = new HashHolder();

         currPathSet.add(composite);
         buildDependentMsgPartsMap(composite, currPathSet);
         m_bDependencyMapCreated = true;
      }
   }
View Full Code Here


    */
   public XMLXMLMessageMappingExporter(XMLMetadataExporter exporter)
   {
      m_exporter = exporter;
      m_writer = exporter.getWriter();
      m_namespaceSet = new HashHolder();
   }
View Full Code Here

    */
   public void addAspects() throws MetadataException
   {
      List aspectList = new ArrayList();

      m_aspectNameSet = new HashHolder();
     
      for (Iterator aspectItr = getAspectIterator(); aspectItr.hasNext();)
      {
         Aspect aspect = (Aspect)aspectItr.next();

View Full Code Here

    * @param metadata The root metadata object.
    * @throws MetadataValidationException if a dependency cycle occurs.
    */
   public static void resolve(Metadata metadata) throws MetadataValidationException
   {
      Set activeSet = new HashHolder();

      for (Iterator itr = metadata.getPrivilegeIterator(); itr.hasNext();)
      {
         Privilege privilege = (Privilege)itr.next();

View Full Code Here

      // constructors

      public Implementation(Service service)
      {
         m_service = service;
         m_interfaceSet = new HashHolder(service.getInterfaceCount());
         service.setImplementation(this);
      }
View Full Code Here

      {
         Decision decision = (Decision)m_next;

         if (decision.isManual())
         {
            collectStates(decision, new HashHolder());

            return;
         }
      }
View Full Code Here

      // WSDL namespaces
      SchemaUniverse universe = service.getUniverse();
      Schema tnsSchema = universe.getSchema(service.getURI(), "tns");
      Schema soapBindSchema = universe.getSchema(XMLNamespace.WSDL_SOAP, XMLNamespace.WSDL_SOAP_NAME);
      Set excludedSchemaSet = new HashHolder();

      excludedSchemaSet.add(tnsSchema);
      excludedSchemaSet.add(soapBindSchema);
      excludedSchemaSet.add(XSDSchema.XSD);
      universe.addSchema(XSDSchema.XSD);
      universe.resolvePrefixes();

      String sTNSPrefix = universe.getPrefix(tnsSchema);
      String sSOAPBindPrefix = universe.getPrefix(soapBindSchema);
View Full Code Here

      int nSize = m_updateMappingSet.size();
      List updateList = new ArrayList(nSize);
      BitSet updateSet = (BitSet)updateAttributeSet.clone();

      // Compute cover
      Holder potentialMappingSet = new HashHolder(nSize);

      for (int i = 0; i < nSize; i++)
      {
         potentialMappingSet.add(m_updateMappingSet.get(i));
      }

      boolean bSelectUnbatchable = false;

      while (!(potentialMappingSet.isEmpty() || updateSet.isEmpty()))
      {
         int nBestScore = 0;
         UpdateMappingCase bestMapping = null;

         for (Iterator itr = potentialMappingSet.iterator(); itr.hasNext(); )
         {
            UpdateMappingCase candidateMapping = (UpdateMappingCase)itr.next();

            if (candidateMapping.isBatch() ^ bSelectUnbatchable)
            {
               BitSet candidateSet = (BitSet)candidateMapping.getAttributeSet().clone();

               candidateSet.and(updateSet);

               int nScore = candidateSet.cardinality();

               if (nScore > nBestScore)
               {
                  nBestScore = nScore;
                  bestMapping = candidateMapping;
               }
            }
         }

         if (bestMapping != null)
         {
            potentialMappingSet.remove(bestMapping);
            updateList.add(bestMapping);
            updateSet.andNot(bestMapping.getAttributeSet());
         }
         else
         {
View Full Code Here

   {
      verifyNotReadOnly();

      if (m_hintSet == null)
      {
         m_hintSet = new HashHolder/*<String>*/(2);
      }

      if (!m_hintSet.add(sHint))
      {
         throw new MetadataException("err.meta.tableHintDup", new Object[]{sHint, getName()});
View Full Code Here

   /**
    * @see nexj.core.meta.persistence.PersistenceMapping#getUniqueKeys()
    */
   public Pair getUniqueKeys()
   {
      Set keySet = new HashHolder(m_sortKeyList.size())// eliminates duplicates
      BitSet keyAttrSet = new BitSet(m_metaclass.getInstanceAttributeCount());
      Pair uniqueKeys = null;

      for (int nSortKey = m_sortKeyList.size() - 1; nSortKey >= 0; nSortKey--)
      {
         VirtualSortKey sortKey = (VirtualSortKey)m_sortKeyList.get(nSortKey);

         if (!sortKey.isUnique())
         {
            continue;
         }

         for (int i = sortKey.getAttributeCount() - 1; i >= 0 ; i--)
         {
            Attribute attr = sortKey.getAttribute(i);

            if (attr == null)
            {
               keyAttrSet.clear();

               break;
            }
            else
            {
               AttributeMapping mapping = getAttributeMapping(attr);

               if (mapping instanceof VirtualPrimitiveMapping)
               {
                  if (((VirtualPrimitiveMapping)mapping).getObjectKeyPart() >= 0)
                  {
                     keyAttrSet.clear();

                     break;
                  }
               }

               keyAttrSet.set(attr.getOrdinal());
            }
         }

         if (!keyAttrSet.isEmpty() && keySet.add(keyAttrSet))
         {
            Pair key = null;

            for (int i = keyAttrSet.nextSetBit(0); i >= 0; i = keyAttrSet.nextSetBit(i + 1))
            {
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.