Examples of IMapping


Examples of org.eclipse.persistence.jpa.jpql.tools.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.tools.spi.IMapping

        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

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

        appendable = !conditionalExpression;
      }
      else {

        // Resolve the mapping so we can determine what is valid based on its type
        IMapping mapping = 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

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

        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

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

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

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

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

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

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

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

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

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

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

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

    IMapping mapping = (IMapping) relationshipMapping;
    return mapping.getParent().getProvider().getManagedType(mapping.getType());
  }
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.