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

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


    /**
     * {@inheritDoc}
     */
    public boolean isTransient() {
      IMapping mapping = resolver.getMapping();
      return (mapping != null) ? mapping.isTransient() : false;
    }
View Full Code Here


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

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

        if (childResolver == null) {
          childResolver = new StateFieldResolver(resolver, path);
          resolver.addChild(path, childResolver);
        }

        IMapping mapping = childResolver.getMapping();

        // Invalid path expression
        if (mapping == null) {
          break;
        }

        // The name matches
        if (mapping.getName().equals(oldAttributeName)) {

          // Make sure the field name is from the right type
          String parentTypeName = mapping.getParent().getType().getName();

          if (parentTypeName.equals(typeName)) {
            int extraOffset = expression.toParsedText(0, index).length() + 1 /* '.' */;
            addTextEdit(expression, extraOffset, oldAttributeName, newAttributeName);
            break;
View Full Code Here

        appendable = !conditionalExpression;
      }
      else {

        // Resolve the mapping so we can determine what is valid based on its type
        IMapping mapping = visitor.queryContext.getMapping(expression);

        if (mapping == null) {
          appendable = false;
        }
        else {
          IType type = mapping.getType();

          switch (appendableType) {
            case ARITHMETIC: {
              // e.name (String) cannot be followed by +,-,/,*
              // e.age (int) can be followed by an arithmetic operator
View Full Code Here

            );

            if (joinVariableName.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();
            }
          }
        }
      }
    }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  protected ITypeDeclaration buildTypeDeclaration() {
    IMapping mapping = getMapping();
    if (mapping != null) {
      return mapping.getTypeDeclaration();
    }
    return getTypeHelper().unknownTypeDeclaration();
  }
View Full Code Here

  public IManagedType getManagedType() {

    if ((managedType == null) && !managedTypeResolved) {
      managedTypeResolved = true;

      IMapping mapping = getMapping();

      if (mapping != null) {
        managedType = resolveManagedType(mapping);
      }
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public int getMappingType() {
      IMapping mapping = resolver.getMapping();
      return (mapping != null) ? mapping.getMappingType() : IMappingType.TRANSIENT;
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public boolean isCollection() {
      IMapping mapping = resolver.getMapping();
      return (mapping != null) ? mapping.isCollection() : false;
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public boolean isProperty() {
      IMapping mapping = resolver.getMapping();
      return (mapping != null) ? mapping.isProperty() : (mappingType == MappingType.PROPERTY);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.jpql.tools.spi.IMapping

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.