src/java.sql/share/classes/java/sql/PseudoColumnUsage.java
author herrick
Wed, 20 Nov 2019 10:17:37 -0500
branchJDK-8200758-branch
changeset 59160 e90068e7afa1
parent 47216 71c04702a3d5
permissions -rw-r--r--
JDK-8234402: revert change that stopped providing JPackageToolProvider Reviewed-by: asemenyuk, almatvee, kcr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6540
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     1
/*
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     2
 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     4
 *
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    10
 *
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    15
 * accompanied this code).
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    16
 *
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    20
 *
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    23
 * questions.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    24
 */
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    25
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    26
package java.sql;
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    27
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    28
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    29
/**
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    30
 * Enumeration for pseudo/hidden column usage.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    31
 *
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    32
 * @since 1.7
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    33
 * @see DatabaseMetaData#getPseudoColumns
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    34
 */
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    35
public enum PseudoColumnUsage {
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    36
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    37
    /**
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    38
     * The pseudo/hidden column may only be used in a SELECT list.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    39
     */
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    40
    SELECT_LIST_ONLY,
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    41
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    42
    /**
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    43
     * The pseudo/hidden column may only be used in a WHERE clause.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    44
     */
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    45
    WHERE_CLAUSE_ONLY,
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    46
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    47
    /**
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    48
     * There are no restrictions on the usage of the pseudo/hidden columns.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    49
     */
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    50
    NO_USAGE_RESTRICTIONS,
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    51
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    52
    /**
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    53
     * The usage of the pseudo/hidden column cannot be determined.
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    54
     */
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    55
    USAGE_UNKNOWN
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    56
a4ae668f6125 6589685: JDBC 4.1 updates
lancea
parents:
diff changeset
    57
}