org.eclipse.persistence.jpa.jpql.parser.StateFieldPathExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eclipselink Show documentation
Show all versions of eclipselink Show documentation
EclipseLink build based upon Git transaction f2b9fc5
/*
* Copyright (c) 2006, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// Oracle - initial API and implementation
//
package org.eclipse.persistence.jpa.jpql.parser;
/**
* A single_valued_association_field
is designated by the name of an association-field
* in a one-to-one or many-to-one relationship. The type of a single_valued_association_field
* and thus a single_valued_association_path_expression
is the abstract schema type of
* the related entity. A collection_valued_association_field
is designated by the name
* of an association-field in a one-to-many or a many-to-many relationship. The type of a
* collection_valued_association_field
is a collection of values of the abstract schema
* type of the related entity. An embedded_class_state_field
is designated by the name
* of an entity-state field that corresponds to an embedded class. Navigation to a related entity
* results in a value of the related entity's abstract schema type.
*
* BNF: state_field_path_expression ::= {identification_variable | single_valued_association_path_expression}.state_field
*
* BNF: single_valued_association_path_expression ::= identification_variable.{single_valued_association_field.}*single_valued_association_field
*
* @version 2.4
* @since 2.3
* @author Pascal Filion
*/
public final class StateFieldPathExpression extends AbstractPathExpression {
/**
* Creates a new StateFieldPathExpression
.
*
* @param parent The parent of this expression
* @param expression The identification variable that was already parsed, which means the
* beginning of the parsing should start with a dot
*/
public StateFieldPathExpression(AbstractExpression parent, AbstractExpression expression) {
super(parent, expression);
}
/**
* Creates a new StateFieldPathExpression
.
*
* @param parent The parent of this expression
* @param paths The path expression that is following the identification variable
*/
public StateFieldPathExpression(AbstractExpression parent, String paths) {
super(parent, paths);
}
/**
* Creates a new StateFieldPathExpression
.
*
* @param parent The parent of this expression
* @param expression The identification variable that was already parsed, which means the
* beginning of the parsing should start with a dot
* @param paths The path expression that is following the identification variable
*/
public StateFieldPathExpression(AbstractExpression parent,
AbstractExpression expression,
String paths) {
super(parent, expression, paths);
}
@Override
public void accept(ExpressionVisitor visitor) {
visitor.visit(this);
}
@Override
public JPQLQueryBNF getQueryBNF() {
return getQueryBNF(StateFieldPathExpressionBNF.ID);
}
}