Examples of IMapping


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

                      identificationVariables.remove(proposal) ||
                      rangeIdentificationVariables.remove(proposal) != null;

    if (!removed) {
      for (Iterator<IMapping> iter = mappings.iterator(); iter.hasNext(); ) {
        IMapping mapping = iter.next();
        if (mapping.getName().equals(proposal)) {
          iter.remove();
          removed = true;
          break;
        }
      }
View Full Code Here

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

        if (joinIdentificationVariable.equalsIgnoreCase(variableName)) {

          // Make sure the JOIN expression maps a collection mapping
          Resolver resolver = getResolver(variableName);
          IMapping mapping = (resolver != null) ? resolver.getMapping() : null;
          return (mapping != null) && mapping.isCollection();
        }
      }
    }

    return false;
View Full Code Here

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

    if (relationshipMapping == null) {
      return null;
    }

    IMapping mapping = (IMapping) relationshipMapping;
    return mapping.getParent().getProvider().getManagedType(mapping.getType());
  }
View Full Code Here

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

        else if (managedType != null) {

          String path = getItem(index);

          // Cache the mapping
          IMapping mapping = managedType.getMappingNamed(path);
          mappings.add(mapping);

          // Continue by retrieving the managed type
          if (mapping != null) {
            managedType = provider.getManagedType(mapping.getType());
          }
          else {
            managedType = null;
          }
        }
View Full Code Here

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

                      identificationVariables.remove(proposal) ||
                      rangeIdentificationVariables.remove(proposal) != null;

    if (!removed) {
      for (Iterator<IMapping> iter = mappings.iterator(); iter.hasNext(); ) {
        IMapping mapping = iter.next();
        if (mapping.getName().equals(proposal)) {
          iter.remove();
          removed = true;
          break;
        }
      }
View Full Code Here

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

    return enumType;
  }

  private IManagedType resolveManagedType() {

    IMapping mapping = getMapping();

    if (mapping == null) {
      return null;
    }

    ITypeDeclaration typeDeclaration = mapping.getTypeDeclaration();
    IType type = typeDeclaration.getType();

    // Collection type cannot be traversed
    if (getTypeHelper().isCollectionType(type)) {
      ITypeDeclaration[] typeParameters = typeDeclaration.getTypeParameters();
View Full Code Here

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

    return managedType;
  }

  private IManagedType resolveManagedType() {

    IMapping mapping = getMapping();

    if (mapping == null) {
      return null;
    }

    ITypeDeclaration typeDeclaration = mapping.getTypeDeclaration();
    IType type = typeDeclaration.getType();

    // Collection type cannot be traversed
    // Example: SELECT e.employees. FROM Employee e where employees is a collection,
    // it cannot be traversed
View Full Code Here

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

      // A collection_valued_field is designated by the name of an association field in a
      // one-to-many or a many-to-many relationship or by the name of an element collection field
      Resolver resolver = getResolver(expression);
      IType type = resolver.getType();
      IMapping mapping = resolver.getMapping();

      // Does not resolve to a valid path
      if (!type.isResolvable() || (mapping == null)) {
        int startIndex = position(expression);
        int endIndex   = startIndex + length(expression);
View Full Code Here

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

    // one-to-one or many-to-one relationship or a field of embeddable class type
    if (expression.hasIdentificationVariable() &&
       !expression.endsWithDot()) {

      IType type = getType(expression);
      IMapping mapping = getMapping(expression);

      // Does not resolve to a valid path
      if (!type.isResolvable()) {
        addProblem(expression, StateFieldPathExpression_NotResolvable, expression.toParsedText());
      }
View Full Code Here

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

        if (ExpressionTools.stringIsNotEmpty(stateFieldValue)) {

          // State field without a dot
          if (stateFieldValue.indexOf(".") == -1) {
            IMapping mapping = managedType.getMappingNamed(stateFieldValue);

             if (mapping == null) {
               addProblem(pathExpression, UpdateItem_NotResolvable, stateFieldValue);
             }
             else {
               validateUpdateItemTypes(expression, mapping.getType());
             }
          }
          else {
            IType type = getType(pathExpression);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.