Package nexj.core.persistence

Examples of nexj.core.persistence.Source


      BitSet attrSet = new BitSet(query.getMetaclass().getInstanceAttributeCount());
      int nCount = sourceList.size();

      for (int nSource = 0; nSource < nCount; nSource++)
      {
         Source source = (Source)sourceList.get(nSource);

         if (source instanceof Field)
         {
            attrSet.set(((Field)source).getAttribute().getOrdinal());
         }
         else
         {
            Query assoc = source.getQuery();

            if (assoc.getParent() == query)
            {
               attrSet.set(assoc.getAttribute().getOrdinal());
            }
View Full Code Here


                  {
                     matchOp.setMapping(join);
                  }
                  else // if null then not seen before or no join table created
                  {
                     Source source = matchOp.getAttribute().getSource();
                     Table table = m_adapter.getMatchJoin(
                        ((RelationalPrimitiveMapping)source.getAttributeMapping()).getColumn(),
                        matchOp.getExpression());

                     if (table != null) // if adapter needs a table join
                     {
                        join = addTable(source.getQuery(), table);
                        join.isEnabled = true; // enable and set operator value to join alias
                        matchOp.setMapping(join); // for s_appenderArray...appendOperator()
                        seenObjectList.add(matchOp); // store join to reuse later
                        seenObjectList.add(join);   // store join to reuse later
                     }
View Full Code Here

      int nCount = sourceList.size();
      Set columnSet = new HashHolder(nCount);

      for (int nSource = 0; nSource < nCount; ++nSource)
      {
         Source source = (Source)sourceList.get(nSource);

         if (source instanceof Field)
         {
            addColumns((Field)source, columnSet);
         }
         else
         {
            Query assoc = source.getQuery();

            if (assoc.getParent() == query)
            {
               Index index = (Index)query.getKey(false);
View Full Code Here

    */
   public boolean isJoinSupported(Query query, Operator op)
   {
      if (op instanceof AttributeOperator)
      {
         Source source = ((AttributeOperator)op).getSource();

         return !(source instanceof Field) || source.getMapping() == query.getMapping();
      }

      return true;
   }
View Full Code Here

TOP

Related Classes of nexj.core.persistence.Source

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.