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

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


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


    return managedType;
  }

  private IManagedType resolveManagedType() {

    IMapping mapping = getMapping();

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

    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

                      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

    return enumType;
  }

  private IManagedType resolveManagedType() {

    IMapping mapping = getMapping();

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

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

    // Collection type cannot be traversed
    if (getTypeHelper().isCollectionType(type)) {
      ITypeDeclaration[] typeParameters = typeDeclaration.getTypeParameters();
View Full Code Here

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

      // A collection_valued_field is designated by the name of an association field in a
      // one-to-many or a many-to-many relationship or by the name of an element collection field
      Resolver resolver = getResolver(expression);
      IType type = resolver.getType();
      IMapping mapping = resolver.getMapping();

      // Does not resolve to a valid path
      if (!type.isResolvable() || (mapping == null)) {
        int startIndex = position(expression);
        int endIndex   = startIndex + length(expression);
View Full Code Here

    // one-to-one or many-to-one relationship or a field of embeddable class type
    if (expression.hasIdentificationVariable() &&
       !expression.endsWithDot()) {

      IType type = getType(expression);
      IMapping mapping = getMapping(expression);

      // Does not resolve to a valid path
      if (!type.isResolvable()) {
        addProblem(expression, StateFieldPathExpression_NotResolvable, expression.toParsedText());
      }
View Full Code Here

        if (ExpressionTools.stringIsNotEmpty(stateFieldValue)) {

          // State field without a dot
          if (stateFieldValue.indexOf(".") == -1) {
            IMapping mapping = managedType.getMappingNamed(stateFieldValue);

             if (mapping == null) {
               addProblem(pathExpression, UpdateItem_NotResolvable, stateFieldValue);
             }
             else {
               validateUpdateItemTypes(expression, mapping.getType());
             }
          }
          else {
            IType type = getType(pathExpression);
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

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.