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

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


    /**
     * {@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() : false;
    }
View Full Code Here

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

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

   * {@inheritDoc}
   */
  @Override
  protected IManagedType resolveManagedType() {

    IMapping mapping = getMapping();

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

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

    // Collection type cannot be traversed
    if (typeHelper.isCollectionType(type)) {

View Full Code Here

    public void visit(StateFieldPathExpression expression) {

      appendable = !expression.endsWithDot() || (appendableType == AppendableType.CLAUSE);

      if (appendable) {
        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

  /**
   * {@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

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

        IMapping mapping = resolver.getMapping();

        // Invalid path expression
        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)) {
            int extraOffset = expression.toParsedText(0, index).length() + 1 /* '.' */;
            addTextEdit(expression, extraOffset, oldFieldName, newFieldName);
            break;
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.