|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.jdbc.FeatureTypeHandler
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.
Field Summary | |
protected java.util.Map |
featureTypeMap
|
protected java.util.Map |
featureTypeTimeoutMap
|
Constructor Summary | |
FeatureTypeHandler(JDBC1DataStore store,
FIDMapperFactory fmFactory,
long cacheTimeOut)
Creates a new feature type handler |
Method Summary | |
void |
forceRefresh()
Forces the type handler to throw away all cached information and parse again the database on type requests |
FeatureTypeInfo |
getFeatureTypeInfo(java.lang.String featureTypeName)
Retreives the FeatureTypeInfo object for a FeatureType. |
FIDMapper |
getFIDMapper(java.lang.String typeName)
|
FIDMapperFactory |
getFIDMapperFactory()
Returns the FIDMapperFactory used by this FeatureTypeHandler |
FeatureType |
getSchema(java.lang.String typeName)
Will reverse engineer and return the schema from the database. |
java.lang.String[] |
getTypeNames()
Returns a list of FeatureType names contained in the parent JDBCDataStore |
void |
resetFIDMappers()
Clears the map between FeatureType name and FIDMappers |
void |
setFIDMapper(java.lang.String typeName,
FIDMapper mapper)
|
void |
setFIDMapperFactory(FIDMapperFactory factory)
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 |
protected java.util.Map featureTypeMap
protected java.util.Map featureTypeTimeoutMap
Constructor Detail |
public FeatureTypeHandler(JDBC1DataStore store, FIDMapperFactory fmFactory, long cacheTimeOut)
store
- the parent data storefmFactory
- the FIDMapper factorycacheTimeOut
- timeout used to purge possibly stale data from the cachesMethod Detail |
public java.lang.String[] getTypeNames() throws java.io.IOException
java.io.IOException
public void resetFIDMappers()
public FeatureType getSchema(java.lang.String typeName) throws java.io.IOException
typeName
-
java.io.IOException
public FeatureTypeInfo getFeatureTypeInfo(java.lang.String featureTypeName) throws java.io.IOException
This allows subclasses to get access to the information about a feature type, this includes the schema and the fidColumnName.
featureTypeName
- The name of the feature type to get the info for.
java.io.IOException
- If an error occurs creating the FeatureTypeInfo.public FIDMapper getFIDMapper(java.lang.String typeName) throws java.io.IOException
java.io.IOException
getFIDMapper(java.lang.String)
public void setFIDMapper(java.lang.String typeName, FIDMapper mapper)
org.geotools.data.jdbc.FeatureTypeHandler#setFIDMapper(java.lang.String)
public void forceRefresh()
public FIDMapperFactory getFIDMapperFactory()
public void setFIDMapperFactory(FIDMapperFactory factory)
factory
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |