org.geotools.data.jdbc
Class FeatureTypeHandler

java.lang.Object
  extended by org.geotools.data.jdbc.FeatureTypeHandler

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

public class FeatureTypeHandler
extends java.lang.Object

This class acts as a manager for FIDMappers and FeatureTypeInfo on behalf of a JDBCDataStore.
At the same time, it acts as a FeatureTypeInfo cache, with a user selectable timeout. Set the timeout to 0 if you want each request to be in-line with the actual database state, to Long.MAX_VALUE in order to make it work basically in-memory, or to an intermediate value to make requests cached allowing at the same time to keep it in-line with a changing database.

Author:
wolf

Field Summary
protected  java.util.Map featureTypeMap
          Deprecated.  
protected  java.util.Map featureTypeTimeoutMap
          Deprecated.  
 
Constructor Summary
FeatureTypeHandler(JDBC1DataStore store, FIDMapperFactory fmFactory, long cacheTimeOut)
          Deprecated. Creates a new feature type handler
 
Method Summary
 void forceRefresh()
          Deprecated. Forces the type handler to throw away all cached information and parse again the database on type requests
 FeatureTypeInfo getFeatureTypeInfo(java.lang.String featureTypeName)
          Deprecated. Retreives the FeatureTypeInfo object for a SimpleFeatureType.
 FIDMapper getFIDMapper(java.lang.String typeName)
          Deprecated.  
 FIDMapperFactory getFIDMapperFactory()
          Deprecated. Returns the FIDMapperFactory used by this FeatureTypeHandler
 org.opengis.feature.simple.SimpleFeatureType getSchema(java.lang.String typeName)
          Deprecated. Will reverse engineer and return the schema from the database.
Performance warning: this request will always hit the database for unknown types
 java.lang.String[] getTypeNames()
          Deprecated. Returns a list of FeatureType names contained in the parent JDBCDataStore
 void resetFIDMappers()
          Deprecated. Clears the map between FeatureType name and FIDMappers
 void setFIDMapper(java.lang.String typeName, FIDMapper mapper)
          Deprecated.  
 void setFIDMapperFactory(FIDMapperFactory factory)
          Deprecated. Sets the FIDMapperFactory used by this FeatureTypeHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

featureTypeMap

protected java.util.Map featureTypeMap
Deprecated. 

featureTypeTimeoutMap

protected java.util.Map featureTypeTimeoutMap
Deprecated. 
Constructor Detail

FeatureTypeHandler

public FeatureTypeHandler(JDBC1DataStore store,
                          FIDMapperFactory fmFactory,
                          long cacheTimeOut)
Deprecated. 
Creates a new feature type handler

Parameters:
store - the parent data store
fmFactory - the FIDMapper factory
cacheTimeOut - timeout used to purge possibly stale data from the caches
Method Detail

getTypeNames

public java.lang.String[] getTypeNames()
                                throws java.io.IOException
Deprecated. 
Returns a list of FeatureType names contained in the parent JDBCDataStore

Throws:
java.io.IOException

resetFIDMappers

public void resetFIDMappers()
Deprecated. 
Clears the map between FeatureType name and FIDMappers


getSchema

public org.opengis.feature.simple.SimpleFeatureType getSchema(java.lang.String typeName)
                                                       throws java.io.IOException
Deprecated. 
Will reverse engineer and return the schema from the database.
Performance warning: this request will always hit the database for unknown types

Parameters:
typeName -
Throws:
java.io.IOException

getFeatureTypeInfo

public FeatureTypeInfo getFeatureTypeInfo(java.lang.String featureTypeName)
                                   throws java.io.IOException
Deprecated. 
Retreives the FeatureTypeInfo object for a SimpleFeatureType.

This allows subclasses to get access to the information about a feature type, this includes the schema and the fidColumnName.

Parameters:
featureTypeName - The name of the feature type to get the info for.
Returns:
The FeatureTypeInfo object for the named feature type or null if the feature type does not exist.
Throws:
java.io.IOException - If an error occurs creating the FeatureTypeInfo.

getFIDMapper

public FIDMapper getFIDMapper(java.lang.String typeName)
                       throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException
See Also:
getFIDMapper(java.lang.String)

setFIDMapper

public void setFIDMapper(java.lang.String typeName,
                         FIDMapper mapper)
Deprecated. 
See Also:
org.geotools.data.jdbc.FeatureTypeHandler#setFIDMapper(java.lang.String)

forceRefresh

public void forceRefresh()
Deprecated. 
Forces the type handler to throw away all cached information and parse again the database on type requests


getFIDMapperFactory

public FIDMapperFactory getFIDMapperFactory()
Deprecated. 
Returns the FIDMapperFactory used by this FeatureTypeHandler


setFIDMapperFactory

public void setFIDMapperFactory(FIDMapperFactory factory)
Deprecated. 
Sets the FIDMapperFactory used by this FeatureTypeHandler. It can't be null.

Parameters:
factory -


Copyright © 1996-2010 Geotools. All Rights Reserved.