jdk/test/javax/sql/testng/util/StubSyncProvider.java
author lancea
Fri, 31 Oct 2014 13:21:51 -0400
changeset 27338 826d3d9a874a
child 28558 85050a596713
permissions -rw-r--r--
8062558: Add javax/sql/rowset/spi tests Reviewed-by: joehw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27338
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     1
/*
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     2
 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     4
 *
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     7
 * published by the Free Software Foundation.
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     8
 *
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    13
 * accompanied this code).
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    14
 *
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    18
 *
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    21
 * questions.
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    22
 */
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    23
package util;
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    24
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    25
import javax.sql.RowSetReader;
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    26
import javax.sql.RowSetWriter;
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    27
import javax.sql.rowset.spi.SyncProvider;
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    28
import javax.sql.rowset.spi.SyncProviderException;
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    29
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    30
public class StubSyncProvider extends SyncProvider {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    31
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    32
    /**
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    33
     * The unique provider identifier.
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    34
     */
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    35
    private String providerID = "util.StubSyncProvider";
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    36
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    37
    /**
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    38
     * The vendor name of this SyncProvider implementation
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    39
     */
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    40
    private String vendorName = "Oracle Corporation";
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    41
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    42
    /**
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    43
     * The version number of this SyncProvider implementation
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    44
     */
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    45
    private String versionNumber = "1.0";
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    46
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    47
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    48
    public String getProviderID() {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    49
        return providerID;
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    50
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    51
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    52
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    53
    public RowSetReader getRowSetReader() {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    54
        throw new UnsupportedOperationException("Not supported yet.");
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    55
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    56
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    57
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    58
    public RowSetWriter getRowSetWriter() {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    59
        throw new UnsupportedOperationException("Not supported yet.");
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    60
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    61
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    62
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    63
    public int getProviderGrade() {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    64
        throw new UnsupportedOperationException("Not supported yet.");
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    65
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    66
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    67
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    68
    public void setDataSourceLock(int datasource_lock) throws SyncProviderException {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    69
        throw new UnsupportedOperationException("Not supported yet.");
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    70
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    71
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    72
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    73
    public int getDataSourceLock() throws SyncProviderException {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    74
        throw new UnsupportedOperationException("Not supported yet.");
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    75
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    76
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    77
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    78
    public int supportsUpdatableView() {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    79
        throw new UnsupportedOperationException("Not supported yet.");
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    80
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    81
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    82
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    83
    public String getVersion() {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    84
        return versionNumber;
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    85
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    86
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    87
    @Override
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    88
    public String getVendor() {
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    89
        return vendorName;
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    90
    }
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    91
826d3d9a874a 8062558: Add javax/sql/rowset/spi tests
lancea
parents:
diff changeset
    92
}