org.geotools.data.jdbc
Class JDBCFeatureLocking

Object
  extended by JDBCFeatureSource
      extended by JDBCFeatureStore
          extended by JDBCFeatureLocking
All Implemented Interfaces:
FeatureLocking<SimpleFeatureType,SimpleFeature>, FeatureSource<SimpleFeatureType,SimpleFeature>, FeatureStore<SimpleFeatureType,SimpleFeature>

Deprecated. scheduled for removal in 2.7, use classes in org.geotools.jdbc

public class JDBCFeatureLocking
extends JDBCFeatureStore
implements FeatureLocking<SimpleFeatureType,SimpleFeature>

A Starting point for your own FeatureLocking implementations.

This class extends JDBCFeatureSource and depends on getDataStore().

The implementation of the following functions depends on getDataStore().getLockingManger() not being null:

JDBCFeatureLocking that have provided their own locking to will need to override the above methods, or provide a custom LockingManger.

Author:
Jody Garnett, Refractions Research
Module:
modules/library/jdbc (gt-jdbc.jar)

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 JDBCFeatureStore
transaction
 
Fields inherited from class JDBCFeatureSource
queryCapabilities
 
Constructor Summary
JDBCFeatureLocking(JDBC1DataStore jdbcDataStore, SimpleFeatureType featureType)
          Deprecated.  
 
Method Summary
 int lockFeatures()
          Deprecated. Lock all Features
 int lockFeatures(Filter filter)
          Deprecated. Lock features matching filter.
 int lockFeatures(Query query)
          Deprecated. Lock features matching Query.
 void setFeatureLock(FeatureLock lock)
          Deprecated. Provide a FeatureLock for locking opperations to opperate against.
 void unLockFeatures()
          Deprecated. Unlock all Features.
 void unLockFeatures(Filter filter)
          Deprecated. Unlock Features specified by filter.
 void unLockFeatures(Query query)
          Deprecated. Unlock features specified by the query.
 
Methods inherited from class JDBCFeatureStore
addFeatures, addFeatures, assertFids, assertFilter, fids, getInProcessLockingManager, getTransaction, modifyFeatures, modifyFeatures, modifyFeatures, removeFeatures, setFeatures, setTransaction
 
Methods inherited from class JDBCFeatureSource
addFeatureListener, close, close, close, count, getBounds, getBounds, 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

JDBCFeatureLocking

public JDBCFeatureLocking(JDBC1DataStore jdbcDataStore,
                          SimpleFeatureType featureType)
Deprecated. 
Method Detail

setFeatureLock

public void setFeatureLock(FeatureLock lock)
Deprecated. 
Provide a FeatureLock for locking opperations to opperate against.

Initial Transactional duration locks can be restored with setFeatureLock( FetaureLock.TRANSACTION )

Specified by:
setFeatureLock in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
Parameters:
lock - FeatureLock (or FeatureLock.TRANSACTION );
Throws:
NullPointerException - DOCUMENT ME!
See Also:
FeatureLocking.setFeatureLock(org.geotools.data.FeatureLock)

lockFeatures

public int lockFeatures()
                 throws IOException
Deprecated. 
Lock all Features

Specified by:
lockFeatures in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
Returns:
Number of Locked features
Throws:
IOException
See Also:
FeatureLocking.lockFeatures()

lockFeatures

public int lockFeatures(Filter filter)
                 throws IOException
Deprecated. 
Lock features matching filter.

Specified by:
lockFeatures in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
Parameters:
filter -
Returns:
Number of locked Features
Throws:
IOException

lockFeatures

public int lockFeatures(Query query)
                 throws IOException
Deprecated. 
Lock features matching Query.

FeatureStores that have provided their own locking to will need to override this method.

Specified by:
lockFeatures in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
Parameters:
query -
Returns:
Number of locked Features
Throws:
IOException - DOCUMENT ME!
UnsupportedOperationException - DOCUMENT ME!
DataSourceException - If we have any lock conflicts
See Also:
FeatureLocking.lockFeatures(org.geotools.data.Query)

unLockFeatures

public void unLockFeatures()
                    throws IOException
Deprecated. 
Unlock all Features.

Specified by:
unLockFeatures in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
Throws:
IOException
See Also:
FeatureLocking.unLockFeatures()

unLockFeatures

public void unLockFeatures(Filter filter)
                    throws IOException
Deprecated. 
Unlock Features specified by filter.

Specified by:
unLockFeatures in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
Parameters:
filter -
Throws:
IOException

unLockFeatures

public void unLockFeatures(Query query)
                    throws IOException
Deprecated. 
Unlock features specified by the query.

FeatureStores that have provided their own locking to will need to override this method.

Specified by:
unLockFeatures in interface FeatureLocking<SimpleFeatureType,SimpleFeature>
Parameters:
query -
Throws:
IOException
UnsupportedOperationException - DOCUMENT ME!
DataSourceException - DOCUMENT ME!
See Also:
FeatureLocking.unLockFeatures(org.geotools.data.Query)


Copyright © 1996-2010 Geotools. All Rights Reserved.