| java.lang.Object org.geotools.data.jdbc.FeatureTypeHandler
All known Subclasses: org.geotools.data.sql.BypassSqlFeatureTypeHandler, org.geotools.data.db2.DB2FeatureTypeHandler,
FeatureTypeHandler | public class FeatureTypeHandler (Code) | | 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 |
cacheTimeOut | long cacheTimeOut(Code) | | |
featureTypeMap | protected Map featureTypeMap(Code) | | |
featureTypeTimeoutMap | protected Map featureTypeTimeoutMap(Code) | | |
lastTypeNameRequestTime | long lastTypeNameRequestTime(Code) | | |
FeatureTypeHandler | public FeatureTypeHandler(JDBC1DataStore store, FIDMapperFactory fmFactory, long cacheTimeOut)(Code) | | Creates a new feature type handler
Parameters: store - the parent data store Parameters: fmFactory - the FIDMapper factory Parameters: cacheTimeOut - timeout used to purge possibly stale data from the caches |
forceRefresh | public void forceRefresh()(Code) | | Forces the type handler to throw away all cached information and parse again the database on
type requests
|
getFIDMapperFactory | public FIDMapperFactory getFIDMapperFactory()(Code) | | Returns the FIDMapperFactory used by this FeatureTypeHandler
|
getFeatureTypeInfo | public FeatureTypeInfo getFeatureTypeInfo(String featureTypeName) throws IOException(Code) | | Retreives the FeatureTypeInfo object for a FeatureType.
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. The FeatureTypeInfo object for the named feature type or null if the feature typedoes not exist. throws: IOException - If an error occurs creating the FeatureTypeInfo. |
getSchema | public FeatureType getSchema(String typeName) throws IOException(Code) | | 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: IOException - |
resetFIDMappers | public void resetFIDMappers()(Code) | | Clears the map between FeatureType name and FIDMappers
|
setFIDMapperFactory | public void setFIDMapperFactory(FIDMapperFactory factory)(Code) | | Sets the FIDMapperFactory used by this FeatureTypeHandler. It can't be null.
Parameters: factory - |
|
|