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

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


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

          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

      // 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

   * {@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
    // Example: SELECT e.employees. FROM Employee e where employees is a collection,
    // it cannot be traversed
View Full Code Here

        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

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.