All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.persistence.jpa.jpql.tools.model.query.VariableDeclarationStateObject Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2011, 2020 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.tools.model.query;

import org.eclipse.persistence.jpa.jpql.tools.spi.IManagedType;
import org.eclipse.persistence.jpa.jpql.utility.iterable.ListIterable;

/**
 * This defines a variable declaration, which has a "root" object and an identification variable.
 *
 * @see CollectionMemberDeclarationStateObject
 * @see DerivedPathIdentificationVariableDeclarationStateObject
 * @see DerivedPathVariableDeclarationStateObject
 * @see IdentificationVariableDeclarationStateObject
 * @see RangeVariableDeclarationStateObject
 *
 * @version 2.5
 * @since 2.4
 * @author Pascal Filion
 */
public interface VariableDeclarationStateObject extends StateObject {

    /**
     * Returns the {@link IManagedType} for the given identification variable. The search does not
     * traverse up the query hierarchy if this declaration is for a subquery.
     *
     * 
SELECT e FROM Department d JOIN KEY(d.employees).addresses a
* In the above query, the managed type associated with the identification variable: *
    *
  • d is "Department" *
  • a is "Address" *
* * @param stateObject The {@link StateObject} that should be an simple identification variable or * an encapsulated identification variable with the identifier KEY or * VALUE * @return The {@link IManagedType} representing the domain object declared by the given * identification variable */ IManagedType getManagedType(StateObject stateObject); /** * Returns the {@link IdentificationVariableStateObject} that are used by this state object. It * is possible more than one declaration exists, like a range variable declaration has also joins * and join fetches. * * @return The list of {@link IdentificationVariableStateObject} */ ListIterable identificationVariables(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy