Package nexj.core.persistence.operator

Examples of nexj.core.persistence.operator.AndOperator


       * @param query The query which to bind to the operator.
       * @return The logical operator.
       */
      public MultiArgOperator createLogical(Query query)
      {
         return new AndOperator();
      }
View Full Code Here


      Object value = null;

      switch (op.getOrdinal())
      {
         case AndOperator.ORDINAL:
            AndOperator and = (AndOperator)op;

            for (int i = 0, nCount = and.getOperandCount(); i < nCount; ++i)
            {
               if (addConstraints(and.getOperand(i), sourceCollection))
               {
                  return true;
               }
            }
View Full Code Here

      if (isJoin())
      {
         if (m_where != null && m_where.getOrdinal() != AndOperator.ORDINAL)
         {
            AndOperator and = new AndOperator();

            and.addOperand(m_where);
            m_where = and;
         }
      }
   }
View Full Code Here

    * @return The read instance list.
    */
   private InstanceList read(Operator conj)
   {
      byte nUniquenessSaved = m_nUnique;
      AndOperator and;
      int nOperandCountSaved;

      if (m_where == null)
      {
         and = null;
         nOperandCountSaved = 0;
         m_where = conj;
      }
      else
      {
         and = (AndOperator)m_where; // and was setup during normalization
         nOperandCountSaved = and.getOperandCount();
         and.addOperand(conj);
      }

      if (m_nUnique == 0)
      {
         m_nUnique = -1;
      }

      try
      {
         conj = conj.normalize(Operator.NORMALIZE_WHERE | Operator.NORMALIZE_PERSISTENCE);

         if (and == null)
         {
            m_where = conj;
         }
         else
         {
            and.setOperand(nOperandCountSaved, conj);
         }

         return read();
      }
      finally
      {
         // remove the join filter
         if (and == null)
         {
            m_where = null;
         }
         else
         {
            while (and.getOperandCount() > nOperandCountSaved)
            {
               and.removeOperand(and.getOperandCount() - 1);
            }
         }

         m_nUnique = nUniquenessSaved;
      }
View Full Code Here

TOP

Related Classes of nexj.core.persistence.operator.AndOperator

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.