private void emitTableConstants() throws IOException
	{
		for ( Table table : mModel.getTables() )
		{
			writer.emitSingleLineComment( "Table " + table.name + " constants " );
			writer.emitField( "String", SqlUtil.IDENTIFIER( table ), EnumSet.of( Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL ), "\"" + table.name + "\"" );

			int index = 0;

			// default _ID field
			Field defaultrow = Table.getDefaultAndroidIdField();
			writer.emitField( "String", SqlUtil.ROW_COLUMN( table, defaultrow ), EnumSet.of( Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL ), "\"" + defaultrow.name + "\"" );
			writer.emitField( "int", SqlUtil.ROW_COLUMN_POSITION( table, defaultrow ), EnumSet.of( Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL ), "" + index );
			index++;

			for ( Field row : table.fields )
			{
				writer.emitField( "String", SqlUtil.ROW_COLUMN( table, row ), EnumSet.of( Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL ), "\"" + row.name + "\"" );
				writer.emitField( "int", SqlUtil.ROW_COLUMN_POSITION( table, row ), EnumSet.of( Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL ), "" + index );
				index++;
			}
			writer.emitEmptyLine();
		}

		for ( View view : mModel.getViews() )
		{
			writer.emitSingleLineComment( "View " + view.name + " constants " );
			int index = 0;
			for ( Pair<String, String> select : view.fields )
			{
				writer.emitField( "String", SqlUtil.ROW_COLUMN( view, (select.snd == null) ? select.fst : select.snd ), EnumSet.of( Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL ), "\"" + Util.sanitize( select.snd, false ) + "\"" );
				writer.emitField( "int", SqlUtil.ROW_COLUMN_POSITION( view, (select.snd == null) ? select.fst : select.snd ), EnumSet.of( Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL ), "" + index );
				index++;
			}
			writer.emitEmptyLine();
		}
	}