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

org.eclipse.persistence.jpa.jpql.parser.IdentifierRole Maven / Gradle / Ivy

There is a newer version: 5.0.0-B03
Show newest version
/*
 * Copyright (c) 2006, 2018 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 role describes the purpose of the JPQL identifier.
 *
 * @version 2.5
 * @since 2.3
 * @author Pascal Filion
 */
public enum IdentifierRole {

    /**
     * Indicates the identifier aggregates two expressions together. The identifiers are AND,
     * OR, and the arithmetic operators.
     */
    AGGREGATE,

    /**
     * Indicates the identifier is used to create a clause. They are the root of a portion of the
     * query. An example is SELECT.
     */
    CLAUSE,

    /**
     * Indicates the identifier is used to complement an expression, it is not required for creating
     * an expression. Examples are AS or OUTER.
     */
    COMPLEMENT,

    /**
     * Indicates the identifier is a kind of function, it does not return a value but it is used to
     * perform some operation over an expression. The expression can have an expression before and
     * after but it's not used to aggregate those two expression. An example is x MEMBER y.
     */
    COMPOUND_FUNCTION,

    /**
     * Indicates the identifier is used to create a function, it has some parameters and returns a
     * value. An example is ABS(x), usually the identifier has some values encapsulated with
     * parenthesis.
     * 

* Note: TRUE, FALSE, NULL, CURRENT_DATE, CURRENT_TIME, * CURRENT_TIMESTAMP are considered functions. */ FUNCTION, /** * Indicates the identifier is not part of the language but it has been reserved for future use. * The identifiers are BIT_LENGTH, CHAR_LENGTH, CHARACTER_LENGTH, * POSITION, and UNKNOWN. */ UNUSED }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy