@Override public Feature buildFeature( ResultSet rs ) throws SQLException { Feature feature = null; try { String gmlId = rs.getString( 1 ); if ( fs.getCache() != null ) { feature = (Feature) fs.getCache().get( gmlId ); } if ( feature == null ) { LOG.debug( "Recreating object '" + gmlId + "' from db (BLOB/hybrid mode)." ); feature = (Feature) codec.decode( rs.getBinaryStream( 2 ), fs.getNamespaceContext(), fs.getSchema(), crs, fs.getResolver() ); if ( fs.getCache() != null ) { fs.getCache().add( feature ); } } else { LOG.debug( "Cache hit." ); } fs.checkIfFeatureTypIsRequested( typeNames, feature.getType() ); } catch ( Exception e ) { String msg = "Cannot recreate feature from result set: " + e.getMessage(); throw new SQLException( msg, e ); } return feature; }
valueFt = schema.getFeatureType( fm.getValueFtName() ); ParticleConverter<?> converter = new FeatureParticleConverter( fkColumn, hrefColumn, getResolver(), valueFt, schema ); particleMappingToConverter.put( particleMapping, converter );