src/jdk.incubator.adba/share/classes/jdk/incubator/sql2/PrimitiveOperation.java
author lancea
Sat, 20 Oct 2018 08:17:38 -0400
branchJDK-8188051-branch
changeset 56997 c9cbac2979fb
parent 56824 62e92191354d
permissions -rw-r--r--
JDK-8188051-branch October 20 ABDA updates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56475
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     1
/*
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     2
 * Copyright (c)  2017, 2018, Oracle and/or its affiliates. All rights reserved.
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     4
 *
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    10
 *
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    15
 * accompanied this code).
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    16
 *
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    20
 *
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    23
 * questions.
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    24
 */
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    25
package jdk.incubator.sql2;
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    26
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    27
/**
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    28
 * A PrimitiveOperation can be submitted, nothing more. Used only by
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    29
 * {@link OperationGroup#catchOperation} and as a supertype to {@link Operation}.
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    30
 * 
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    31
 * References in JavaDoc to the "collection of Operations" and "member
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    32
 * Operations" should be understood to include PrimitiveOperations. The
56997
c9cbac2979fb JDK-8188051-branch October 20 ABDA updates
lancea
parents: 56824
diff changeset
    33
 * distinction between {@link Operation} and {@code PrimitiveOperation} in the
56475
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    34
 * API is strictly followed as it enables the compiler to catch a significant
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    35
 * class of errors. The two types are not distinguished in the JavaDoc as making 
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    36
 * such a distinction would not add clarity.
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    37
 * 
56797
fb523d4d9185 JDK-8188051-branch updates
lancea
parents: 56479
diff changeset
    38
 * @see Operation
fb523d4d9185 JDK-8188051-branch updates
lancea
parents: 56479
diff changeset
    39
 * @see OperationGroup#catchOperation
56475
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    40
 */
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    41
public interface PrimitiveOperation<T> {
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    42
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    43
  /**
56997
c9cbac2979fb JDK-8188051-branch October 20 ABDA updates
lancea
parents: 56824
diff changeset
    44
   * Add this {@code PrimitiveOperation} to the tail of the {@link Operation}
56824
62e92191354d JDK-8188051-branch latest updates
lancea
parents: 56797
diff changeset
    45
   * collection of the {@link Session} that created this
56997
c9cbac2979fb JDK-8188051-branch October 20 ABDA updates
lancea
parents: 56824
diff changeset
    46
   * {@code PrimitiveOperation}. A {@code PrimitiveOperation} can be submitted
c9cbac2979fb JDK-8188051-branch October 20 ABDA updates
lancea
parents: 56824
diff changeset
    47
   * only once. Once a {@code PrimitiveOperation} is submitted it is immutable.
c9cbac2979fb JDK-8188051-branch October 20 ABDA updates
lancea
parents: 56824
diff changeset
    48
   * Any attempt to modify a submitted {@code PrimitiveOperation} will throw
56475
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    49
   * {@link IllegalStateException}.
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    50
   *
56997
c9cbac2979fb JDK-8188051-branch October 20 ABDA updates
lancea
parents: 56824
diff changeset
    51
   * @return a {@link Submission} for this {@code PrimitiveOperation}
56475
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    52
   * @throws IllegalStateException if this method is called more than once on
56997
c9cbac2979fb JDK-8188051-branch October 20 ABDA updates
lancea
parents: 56824
diff changeset
    53
   * this {@code PrimitiveOperation}
56475
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    54
   */
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    55
  Submission<T> submit();
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    56
e700edfac7ad JDK-8188051-branch: Updates to sync with AOJ
lancea
parents:
diff changeset
    57
}