Package nexj.core.persistence

Examples of nexj.core.persistence.InvalidQueryException


         nFlags |= NORMALIZE_NORECUR;
      }

      if (!m_right.isConstant())
      {
         throw new InvalidQueryException("err.persistence.variableLikePattern");
      }

      return super.normalize(nFlags);
   }
View Full Code Here


    */
   public void setAttribute(AttributeOperator attribute)
   {
      if (attribute == null)
      {
         throw new InvalidQueryException("err.persistence.invalidMatchArgument",
                                         new Object[] {attribute});
      }

      m_attribute = attribute;
   }
View Full Code Here

    */
   public void setExpression(Pair expression)
   {
      if (expression == null)
      {
         throw new InvalidQueryException("err.persistence.invalidMatchArgument",
                                         new Object[] {expression});
      }

      m_expression = expression;
   }
View Full Code Here

            (sValue == null) ? null : sValue.toUpperCase(m_context.getLocale()),
            m_expression, m_scoreArray, m_context);
      }
      catch (ScriptingException e)
      {
         throw new InvalidQueryException("err.persistence.invalidMatchExpression", new Object[] {m_expression});
      }

      return (nValue > 0) ? Primitive.createDouble(nValue) : null;
   }
View Full Code Here

    */
   public void verifyOperandCount() throws InvalidQueryException
   {
      if (m_nOperandCount != m_argTypeArray.length)
      {
         throw new InvalidQueryException("err.persistence.functionArgCount",
            new Object[]{getSymbol().getName(), Primitive.createInteger(m_nOperandCount),
               Primitive.createInteger(m_argTypeArray.length)});
      }
   }
View Full Code Here

   {
      for (Operator parent = m_parent; parent != null; parent = parent.getParent())
      {
         if (parent instanceof AggregateOperator)
         {
            throw new InvalidQueryException("err.persistence.nestedAggregate", new Object[]{getSymbol().getName()});
         }
      }
   }
View Full Code Here

         {
            Operator op = m_operandArray[i];

            if (!op.isConstant())
            {
               throw new InvalidQueryException("err.persistence.variableInList");
            }

            if (op.getValue() == null)
            {
               m_value = Boolean.TRUE;
               break;
            }
         }

         return this;
      }

      setSource(first.getSource(), nFlags);

      if (type.isPrimitive())
      {
         if (type == Primitive.ANY && first.isConstant())
         {
            foldObjectIn(first);
            return this;
         }

         Primitive firstType = (Primitive)type;
         boolean bNull = false;

         for (int i = 1; i < m_nOperandCount; ++i)
         {
            Operator op = m_operandArray[i];

            if (!op.isConstant() || op.getType() != null && !op.getType().isPrimitive())
            {
               throw new InvalidQueryException("err.persistence.variableInList");
            }

            Primitive opType = (Primitive)op.getType();

            if (firstType.findEQFunction(opType) == null)
View Full Code Here

    */
   public Operator normalize(int nFlags)
   {
      if (!(m_parent instanceof AggregateOperator))
      {
         throw new InvalidQueryException("err.persistence.nestedAggregate", new Object[]{getSymbol().getName()});
      }

      normalizeOperand(nFlags);

      AggregateOperator parent = (AggregateOperator)m_parent;
View Full Code Here

            {
               collectAssociatedInstances(assoc.getNext(), (Instance)value, results);
            }
            else
            {
               throw new InvalidQueryException("err.persistence.primitiveAssocQuery",
                  new Object[]{assoc.getHead(), instance.getMetaclass().getName()});
            }
         }
      }
   }
View Full Code Here

                        ((Metaclass)attribute.getType()).findEvent("read", 6)
                           .findAction("main").getDeclarator().getBase() == null)
                     {
                        if (parentList.size() > 1)
                        {
                           throw new InvalidQueryException("err.persistence.multipleParentsWithoutPersistence",
                              new Object[]{classSym, assoc, parentMetaclass.getName()});
                        }

                        if (where != null || bookmark != null || orderBy != null)
                        {
                           throw new InvalidQueryException("err.persistence.whereWithoutPersistence",
                              new Object[]{classSym, assoc, parentMetaclass.getName()});
                        }

                        resultList = new InstanceArrayList();
                        collectAssociatedInstances((Pair)assoc, parentInstance, resultList);
View Full Code Here

TOP

Related Classes of nexj.core.persistence.InvalidQueryException

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.