Examples of CollectionValuedPathExpression


Examples of org.eclipse.persistence.jpa.jpql.parser.CollectionValuedPathExpression

   * {@inheritDoc}
   */
  @Override
  public void visit(EmptyCollectionComparisonExpression expression) {

    CollectionValuedPathExpression collectionPath = (CollectionValuedPathExpression) expression.getExpression();
    int lastPathIndex = collectionPath.pathSize() - 1;
    String name = collectionPath.getPath(lastPathIndex);

    // Create the expression for the collection-valued path expression (except the last path)
    visitPathExpression(collectionPath, false, lastPathIndex);

    // Create the IS EMPTY expression
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.CollectionValuedPathExpression

   * {@inheritDoc}
   */
  @Override
  public void visit(SizeExpression expression) {

    CollectionValuedPathExpression pathExpression = (CollectionValuedPathExpression) expression.getExpression();
    int lastIndex = pathExpression.pathSize() - 1;

    // Create the right chain of expressions
    visitPathExpression(pathExpression, false, lastIndex - 1);

    // Now create the SIZE expression
    String name = pathExpression.getPath(lastIndex);
    queryExpression = queryExpression.size(name);

    // Set the expression type
    type[0] = Integer.class;
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.CollectionValuedPathExpression

                                                           boolean collectionTypeOnly) {

    boolean valid = true;

    // The path expression resolves to a collection-valued path expression
    CollectionValuedPathExpression collectionValuedPathExpression = getCollectionValuedPathExpression(expression);

    if (collectionValuedPathExpression != null &&
        collectionValuedPathExpression.hasIdentificationVariable() &&
       !collectionValuedPathExpression.endsWithDot()) {

      // 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
      Object mapping = helper.resolveMapping(expression);
      Object type = helper.getMappingType(mapping);
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.CollectionValuedPathExpression

    Expression rootObject = expression.getRootObject();

    // Special case, the path expression could be a fully qualified class name,
    // make sure to not validate it as collection-valued path expression
    CollectionValuedPathExpression pathExpression = getCollectionValuedPathExpression(rootObject);

    if (pathExpression != null) {
      String path = pathExpression.toActualText();

      // The path expression is not a fully qualified class name
      if (helper.getType(path) == null) {
        pathExpression.accept(this);
      }
    }
    else {
      rootObject.accept(this);
    }
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.