01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.harmony.sql.internal.rowset;
19:
20: import javax.sql.RowSetReader;
21: import javax.sql.RowSetWriter;
22: import javax.sql.rowset.spi.SyncProvider;
23: import javax.sql.rowset.spi.SyncProviderException;
24:
25: import org.apache.harmony.luni.util.NotImplementedException;
26:
27: public class HYOptimisticProvider extends SyncProvider {
28:
29: private final static String providerID = "Apache Harmony";
30:
31: private final static int providerGrade = SyncProvider.DATASOURCE_NO_LOCK;
32:
33: private final static String vendor = "Apache Harmony";
34:
35: private final static String version = "";
36:
37: @Override
38: public int getDataSourceLock() throws SyncProviderException {
39: // TODO Auto-generated method stub
40: return 0;
41: }
42:
43: @Override
44: public int getProviderGrade() {
45: return providerGrade;
46: }
47:
48: @Override
49: public String getProviderID() {
50: return providerID;
51: }
52:
53: @Override
54: public RowSetReader getRowSetReader() {
55: throw new NotImplementedException();
56: }
57:
58: @Override
59: public RowSetWriter getRowSetWriter() {
60: return new CachedRowSetWriter();
61: }
62:
63: @Override
64: public String getVendor() {
65: return vendor;
66: }
67:
68: @Override
69: public String getVersion() {
70: return version;
71: }
72:
73: @Override
74: public void setDataSourceLock(int dataSourceLock)
75: throws SyncProviderException {
76: // TODO Auto-generated method stub
77:
78: }
79:
80: @Override
81: public int supportsUpdatableView() {
82: // TODO Auto-generated method stub
83: return 0;
84: }
85:
86: }
|