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

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


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


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

    /**
     * {@inheritDoc}
     */
    public boolean isTransient() {
      IMapping mapping = resolver.getMapping();
      return (mapping != null) ? mapping.isTransient() : false;
    }
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

                      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

      // Now traverse the path expression after the identification variable
      for (int index = 1, count = stateObject.itemsSize(); index < count; index++) {

        // Retrieve the mapping for the path at the current position
        IMapping mapping = stateObject.getMapping(index);

        if (mapping == null) {
          break;
        }

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

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

          if (parentTypeName.equals(typeName)) {
            stateObject.setPath(index, newFieldName);
            break;
          }
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

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

TOP

Related Classes of org.eclipse.persistence.jpa.jpql.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.