private ColumnMetadataOld getColumn( TableName qTable, SQLIdentifier columnName ) throws SQLException, FeatureStoreException { ColumnMetadataOld md = getColumns( qTable ).get( columnName ); if ( md == null ) { throw new FeatureStoreException( "Table '" + qTable + "' does not have a column with name '" + columnName + "'" ); } return md; }
for ( ColumnMetadataOld md : getColumns( table ).values() ) { if ( fidColumnNames.contains( new SQLIdentifier( md.column.toLowerCase() ) ) ) { LOG.debug( "Omitting column '" + md.column + "' from properties. Used in FIDMapping." );
private void process( FeatureTypeJAXB ftDecl ) throws SQLException, FeatureStoreException { if ( ftDecl.getTable() == null || ftDecl.getTable().isEmpty() ) { String msg = "Feature type element without or with empty table attribute."; throw new FeatureStoreException( msg ); } TableName table = new TableName( ftDecl.getTable() ); LOG.debug( "Processing feature type mapping for table '" + table + "'." ); if ( getColumns( table ).isEmpty() ) { throw new FeatureStoreException( "No table with name '" + table + "' exists (or no columns defined)." ); } QName ftName = ftDecl.getName(); if ( ftName == null ) { LOG.debug( "Using table name for feature type." ); ftName = new QName( table.getTable() ); } ftName = makeFullyQualified( ftName, "app", "http://www.deegree.org/app" ); LOG.debug( "Feature type name: '" + ftName + "'." ); FIDMapping fidMapping = buildFIDMapping( table, ftName, ftDecl.getFIDMapping() ); List<JAXBElement<? extends AbstractPropertyJAXB>> propDecls = ftDecl.getAbstractProperty(); if ( propDecls != null && !propDecls.isEmpty() ) { process( table, ftName, fidMapping, propDecls ); } else { process( table, ftName, fidMapping ); } }
if ( columns.isEmpty() ) { for ( ColumnMetadataOld md : getColumns( table ).values() ) { if ( md.isAutoincrement ) { BaseType columnType = BaseType.valueOf( md.sqlType );