Package org.eclipse.persistence.jpa.jpql.spi

Examples of org.eclipse.persistence.jpa.jpql.spi.IType


        expression.hasDistinct()) {

      Expression childExpression = expression.getExpression();

      // Check for embeddable type
      IType type = getType(childExpression);
      IManagedType managedType = getManagedType(type);

      if (isEmbeddable(managedType)) {
        int distinctLength = Expression.DISTINCT.length() + 1; // +1 = space
        int startIndex  = position(childExpression) - distinctLength;
View Full Code Here


                                              Filter<IMapping> filter) {

    // Wrap the filter with another Filter that will make sure only the
    // mappings with the right type will be accepted, for instance, AVG(e.|
    // can only accept state fields with a numeric type
    IType type = acceptableType(expression.getParent());

    // No need to filter
    if (type == null) {
      return filter;
    }
View Full Code Here

          // the possible abstract schema names
          if (!expression.hasEntityType()) {

            // If the type of the path expression is resolvable,
            // then filter the abstract schema types
            IType type = getType(collectionValuedPathExpression);

            if (type.isResolvable()) {
              addAbstractSchemaTypes(type);
            }
            else {
              addAbstractSchemaTypes();
            }
          }
        }
      }

      // After "AS "
      if (expression.hasAs() &&
          expression.hasSpaceAfterAs()) {

        length += AS.length() + SPACE_LENGTH;

        // Right after "AS "
        if (position == length) {
          // If the type of the path expression is resolvable,
          // then filter the abstract schema types
          IType type = getType(expression.getCollectionValuedPathExpression());

          if (type.isResolvable()) {
            addAbstractSchemaTypes(type);
          }
          else {
            addAbstractSchemaTypes();
          }
View Full Code Here

    // Null comparisons over instances of embeddable class types are not supported
    StateFieldPathExpression pathExpression = stateFieldPathExpression(expression.getExpression());

    if (pathExpression != null) {
      IType type = getType(pathExpression);
      IManagedType managedType = getManagedType(type);

      if (isEmbeddable(managedType)) {
        addProblem(pathExpression, NullComparisonExpression_InvalidType, pathExpression.toParsedText());
        return;
View Full Code Here

             else {
               validateUpdateItemTypes(expression, mapping.getType());
             }
          }
          else {
            IType type = getType(pathExpression);

            if (!type.isResolvable()) {
               addProblem(pathExpression, UpdateItem_NotResolvable, stateFieldValue);
            }
            else {
               validateUpdateItemTypes(expression, type);
            }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public final void visit(CaseExpression expression) {
      IType type = getType(expression);
      valid = isRightType(type);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public final void visit(CoalesceExpression expression) {
      IType type = getType(expression);
      valid = isRightType(type);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public final void visit(FuncExpression expression) {
      IType type = getType(expression);
      valid = isRightType(type);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public final void visit(StateFieldPathExpression expression) {
      IType type = getType(expression);
      valid = isRightType(type);
    }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  IType buildType() {

    IType stringType   = null;
    IType numericType  = null;
    IType dateTimeType = null;
    IType numericClass = getTypeHelper().numberType();
    IType dateClass    = getTypeHelper().dateType();

    for (Resolver resolver : resolvers) {
      IType parameterType = resolver.getType();

      // String parameter type
      if (getTypeHelper().isStringType(parameterType)) {
        stringType = parameterType;
      }
      // Numeric parameter type
      else if (parameterType.isAssignableTo(numericClass)) {
        numericType = numericClass;
      }
      // Date/Time parameter type
      else if (parameterType.isAssignableTo(dateClass)) {
        dateTimeType = dateClass;
      }
    }

    // String type
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.jpql.spi.IType

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.