writer.writeStartElement( CONFIG_NS, "Column" ); writer.writeAttribute( "name", column.getFirst().toString() ); writer.writeAttribute( "type", column.getSecond().getXSTypeName() ); writer.writeEndElement();
int j = 0; for ( Object o : idKernel.getIdKernels() ) { PrimitiveType pt = new PrimitiveType( fidMapping.getColumns().get( j++ ).getSecond() ); PrimitiveValue value = new PrimitiveValue( o, pt ); Object sqlValue = SQLValueMangler.internalToSQL( value );
private String retrieveTypeOfPrimaryKey( TableName fromTable, SQLIdentifier toColumn, FIDMapping fidMapping ) { if ( fidMapping != null ) { for ( Pair<SQLIdentifier, BaseType> column : fidMapping.getColumns() ) { if ( toColumn.equals( column.getFirst() ) ) { return getDBType( column.getSecond() ); } } } // in joins not connected to the main feature type table 'integer' is used by default if ( !fromTable.equals( currentFtTable ) ) { return "integer"; } return "varchar(2000)"; }
private String retrieveTypeOfPrimaryKey( TableName fromTable, SQLIdentifier toColumn, FIDMapping fidMapping ) { if ( fidMapping != null ) { for ( Pair<SQLIdentifier, BaseType> column : fidMapping.getColumns() ) { if ( toColumn.equals( column.getFirst() ) ) { return getDBType( column.getSecond() ); } } } // TODO implement this correctly // in joins not connected to the main feature type table 'integer' is used by default if ( !fromTable.equals( currentFtTable ) ) { return "integer"; } return "text"; }
private String retrieveTypeOfPrimaryKey( TableName fromTable, SQLIdentifier toColumn, FIDMapping fidMapping ) { if ( fidMapping != null ) { for ( Pair<SQLIdentifier, BaseType> column : fidMapping.getColumns() ) { if ( toColumn.equals( column.getFirst() ) ) { return getDBType( column.getSecond() ); } } } // TODO implement this correctly // in joins not connected to the main feature type table 'integer' is used by default if ( !fromTable.equals( currentFtTable ) ) { return "integer"; } return "varchar(2000)"; }