01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data.postgis;
17:
18: import java.io.IOException;
19:
20: import org.geotools.data.FeatureLock;
21: import org.geotools.data.FeatureLocking;
22: import org.geotools.data.Query;
23: import org.opengis.filter.Filter;
24:
25: /**
26: * Really delegates everything to a wrapped feature locking, but allows to
27: * advertise a data store other than the original one
28: *
29: * @author aaime
30: * @since 2.4
31: *
32: */
33: class WrappingPostgisFeatureLocking extends WrappingPostgisFeatureStore
34: implements FeatureLocking {
35:
36: private FeatureLocking wrappedLocking;
37:
38: public WrappingPostgisFeatureLocking(FeatureLocking wrapped,
39: VersionedPostgisDataStore store) {
40: super (wrapped, store);
41: this .wrappedLocking = wrapped;
42: }
43:
44: public int lockFeatures() throws IOException {
45: return wrappedLocking.lockFeatures();
46: }
47:
48: public int lockFeatures(Filter filter) throws IOException {
49: return wrappedLocking.lockFeatures(filter);
50: }
51:
52: public int lockFeatures(Query query) throws IOException {
53: return wrappedLocking.lockFeatures(query);
54: }
55:
56: public void setFeatureLock(FeatureLock lock) {
57: wrappedLocking.setFeatureLock(lock);
58: }
59:
60: public void unLockFeatures() throws IOException {
61: wrappedLocking.unLockFeatures();
62: }
63:
64: public void unLockFeatures(Filter filter) throws IOException {
65: wrappedLocking.unLockFeatures(filter);
66: }
67:
68: public void unLockFeatures(Query query) throws IOException {
69: wrappedLocking.unLockFeatures(query);
70: }
71:
72: }
|