|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectJDBCFeatureSource
JDBCFeatureStore
PostgisFeatureStore
PostgisFeatureLocking
public class PostgisFeatureLocking
Extends PostgisFeatureLocking with support for Locking.
This class will be, horror, modey. While the are plenty of Object Oriented ways to fix this I have a deadline right now.
When the DataStore is constructed it will create a LockingManager only if the Postgis implementation does not support database locking. If the lockingManger is present it will be used.
If the lockingManger is not present, the this class will use Database locking
Nested Class Summary |
---|
Nested classes/interfaces inherited from class JDBCFeatureSource |
---|
JDBCFeatureSource.JDBCQueryCapabilities |
Nested classes/interfaces inherited from interface FeatureLocking |
---|
FeatureLocking.Response |
Field Summary |
---|
Fields inherited from class PostgisFeatureStore |
---|
CONN_ERROR, fidMapper, geometryFactory, geometryReader, geometryWriter, sqlBuilder, tableName |
Fields inherited from class JDBCFeatureStore |
---|
transaction |
Fields inherited from class JDBCFeatureSource |
---|
queryCapabilities |
Constructor Summary | |
---|---|
PostgisFeatureLocking(PostgisDataStore postgisDataStore,
SimpleFeatureType featureType)
|
Method Summary | |
---|---|
int |
lockFeature(SimpleFeature feature)
HACK HACK HACK!!! |
int |
lockFeatures()
Lock all Features |
int |
lockFeatures(Filter filter)
Lock features matching filter . |
int |
lockFeatures(Filter filter)
|
int |
lockFeatures(Query query)
Lock features matching Query. |
void |
setFeatureLock(FeatureLock lock)
Provide a FeatureLock for locking operations to operate against. |
void |
unLockFeatures()
Unlock all Features. |
void |
unLockFeatures(Filter filter)
Unlock Features specified by filter . |
void |
unLockFeatures(Query query)
Unlock features specified by the query . |
Methods inherited from class PostgisFeatureStore |
---|
bounds, getBounds, getBounds, getEnvelope, getPostgisDataStore, getSRID, makeSql, modifyFeatures, modifyFeatures, removeFeatures |
Methods inherited from class JDBCFeatureStore |
---|
addFeatures, addFeatures, assertFids, assertFilter, fids, getInProcessLockingManager, getTransaction, modifyFeatures, setFeatures, setTransaction |
Methods inherited from class JDBCFeatureSource |
---|
addFeatureListener, close, close, close, count, getConnection, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getJDBCDataStore, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListener |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface FeatureStore |
---|
addFeatures, getTransaction, modifyFeatures, modifyFeatures, removeFeatures, setFeatures, setTransaction |
Methods inherited from interface FeatureSource |
---|
addFeatureListener, getBounds, getBounds, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListener |
Constructor Detail |
---|
public PostgisFeatureLocking(PostgisDataStore postgisDataStore, SimpleFeatureType featureType) throws IOException
IOException
Method Detail |
---|
public void setFeatureLock(FeatureLock lock)
Initial Transactional duration locks can be restored with setFeatureLock( FetaureLock.TRANSACTION )
setFeatureLock
in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
lock
- FeatureLock (or FeatureLock.TRANSACTION );
NullPointerException
- If lock was null
FeatureLocking.setFeatureLock(org.geotools.data.FeatureLock)
public int lockFeatures() throws IOException
lockFeatures
in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
IOException
FeatureLocking.lockFeatures()
public int lockFeatures(Filter filter) throws IOException
filter
.
lockFeatures
in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
filter
-
IOException
org.geotools.data.FeatureLocking#lockFeatures(org.geotools.filter.Filter)
public int lockFeatures(Filter filter) throws IOException
IOException
public int lockFeatures(Query query) throws IOException
FeatureStores that have provided their own locking to will need to override this method.
lockFeatures
in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
query
-
IOException
- If we could not determine which feature to lock
based on Query
UnsupportedOperationException
- When DataStore does not provide a
LockingManager
DataSourceException
- If feature to be locked does not existFeatureLocking.lockFeatures(org.geotools.data.Query)
public int lockFeature(SimpleFeature feature) throws IOException
feature
- DOCUMENT ME!
IOException
- DOCUMENT ME!
UnsupportedOperationException
- DOCUMENT ME!public void unLockFeatures() throws IOException
unLockFeatures
in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
IOException
FeatureLocking.unLockFeatures()
public void unLockFeatures(Filter filter) throws IOException
filter
.
unLockFeatures
in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
filter
-
IOException
org.geotools.data.FeatureLocking#unLockFeatures(org.geotools.filter.Filter)
public void unLockFeatures(Query query) throws IOException
query
.
FeatureStores that have provided their own locking to will need to override this method.
unLockFeatures
in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
query
-
IOException
UnsupportedOperationException
- If lockingManager is not provided
by DataStore subclass
DataSourceException
- Filter describes an unlocked Feature, or
authorization not heldFeatureLocking.unLockFeatures(org.geotools.data.Query)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |