|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.io.datastore.sql.AbstractRequestHandler org.deegree.io.datastore.sql.FeatureFetcher
abstract class FeatureFetcher
The only implementation of this abstract class is the QueryHandler
class.
While the QueryHandler
class performs the initial SELECT, FeatureFetcher
is responsible for any
subsequent SELECTs that may be necessary.
QueryHandler
Field Summary | |
---|---|
protected java.util.Map<FeatureId,Feature> |
featureMap
|
protected java.util.Set<FeatureId> |
featuresInGeneration
|
protected java.util.Map<FeatureId,java.util.List<FeatureProperty>> |
fidToPropertyMap
|
protected Query |
query
|
protected VirtualContentProvider |
vcProvider
|
Fields inherited from class org.deegree.io.datastore.sql.AbstractRequestHandler |
---|
aliasGenerator, conn, datastore, FT_COLUMN, FT_PREFIX |
Constructor Summary | |
---|---|
FeatureFetcher(AbstractSQLDatastore datastore,
TableAliasGenerator aliasGenerator,
java.sql.Connection conn,
Query query)
|
Method Summary | |
---|---|
protected void |
appendQualifiedContentList(StatementBuffer query,
java.lang.String tableAlias,
java.util.List<java.util.List<SimpleContent>> fetchContents)
|
protected java.util.Map<SimpleContent,java.lang.Integer> |
buildResultPosMap(java.util.List<java.util.List<SimpleContent>> fetchContents)
Builds a lookup map that allows to find the index (position in the ResultSet ) by the
SimpleContent instance that makes it necessary to fetch it. |
protected java.util.List<java.util.List<SimpleContent>> |
determineFetchContents(MappedFeatureType ft,
PropertyType[] requestedProps)
Determines the columns / functions that have to be fetched from the table of the given MappedFeatureType
and associates identical columns / functions to avoid that the same column / function is SELECTed more than once. |
protected Feature |
extractFeature(FeatureId fid,
java.util.Map<MappedPropertyType,java.util.Collection<PropertyPath>> requestedPropertyMap,
java.util.Map<SimpleContent,java.lang.Integer> resultPosMap,
java.lang.Object[] resultValues)
Extracts a feature from the values of a result set row. |
protected FeatureId |
extractFeatureId(MappedFeatureType ft,
java.util.Map<SimpleContent,java.lang.Integer> mfMap,
java.lang.Object[] resultValues)
Extracts the feature id from the values of a result set row. |
Methods inherited from class org.deegree.io.datastore.sql.AbstractRequestHandler |
---|
appendColumnsList, appendFeatureIdColumns, appendFeatureIdConstraint, appendFeatureIdConstraint, appendJoinCondition, appendJoins, appendQualifiedColumn, appendQualifiedColumnsList, determineAffectedAndModifiableFIDs, determineAffectedFIDs, determineSubFeatures, determineSuperFeatures, extractFeatureId, extractFeatureIds, extractFeatureIdsForceUnique |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Set<FeatureId> featuresInGeneration
protected java.util.Map<FeatureId,Feature> featureMap
protected java.util.Map<FeatureId,java.util.List<FeatureProperty>> fidToPropertyMap
protected VirtualContentProvider vcProvider
protected Query query
Constructor Detail |
---|
FeatureFetcher(AbstractSQLDatastore datastore, TableAliasGenerator aliasGenerator, java.sql.Connection conn, Query query) throws DatastoreException
DatastoreException
Method Detail |
---|
protected Feature extractFeature(FeatureId fid, java.util.Map<MappedPropertyType,java.util.Collection<PropertyPath>> requestedPropertyMap, java.util.Map<SimpleContent,java.lang.Integer> resultPosMap, java.lang.Object[] resultValues) throws java.sql.SQLException, DatastoreException, UnknownCRSException
fid
- feature id of the featurerequestedPropertyMap
- requested MappedPropertyType
s mapped to Collection
of
PropertyPath
sresultPosMap
- key class: MappingField, value class: Integer (this is the associated index in resultValues)resultValues
- all retrieved columns from one result set row
java.sql.SQLException
- if a JDBC related error occurs
DatastoreException
UnknownCRSException
protected FeatureId extractFeatureId(MappedFeatureType ft, java.util.Map<SimpleContent,java.lang.Integer> mfMap, java.lang.Object[] resultValues) throws DatastoreException
ft
- feature type for which the id shall be extractedmfMap
- key class: MappingField, value class: Integer (this is the associated index in resultValues)resultValues
- all retrieved columns from one result set row
DatastoreException
protected java.util.List<java.util.List<SimpleContent>> determineFetchContents(MappedFeatureType ft, PropertyType[] requestedProps) throws DatastoreException
MappedFeatureType
and associates identical columns / functions to avoid that the same column / function is SELECTed more than once.
Identical columns are put into the same (inner) list.
The following SimpleContent
instances of the MappedFeatureType
s annotation are used to build the
list:
ft
- feature type for which the content list is builtrequestedProps
- requested properties
DatastoreException
protected void appendQualifiedContentList(StatementBuffer query, java.lang.String tableAlias, java.util.List<java.util.List<SimpleContent>> fetchContents)
protected java.util.Map<SimpleContent,java.lang.Integer> buildResultPosMap(java.util.List<java.util.List<SimpleContent>> fetchContents)
ResultSet
) by the
SimpleContent
instance that makes it necessary to fetch it.
fetchContents
-
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org