void writeSQL(boolean revTableExists, boolean pageTableExists, GeneratorMode mode)
	{
		try (Writer writer = new BufferedWriter(new OutputStreamWriter(
				new BufferedOutputStream(new FileOutputStream(outputPath)), charset))){
			StringBuilder dataToDump = new StringBuilder();

			dataToDump.append(generateTemplateIdSQLStatement(this.tableExists));

			if (mode.active_for_pages) {
				dataToDump.append(generatePageSQLStatement(pageTableExists,
						mode.templateNameToPageId));
			}
			if (mode.active_for_revisions) {
				dataToDump.append(generateRevisionSQLStatement(revTableExists,
						mode.templateNameToRevId));
			}
			writer.write(dataToDump.toString());
		}
		catch (IOException e) {
			logger.error("Error writing SQL file: {}", e.getMessage(), e);
		}
	}
void writeSQL ( boolean revTableExists , boolean pageTableExists , GeneratorMode mode ) { try ( Writer writer = new BufferedWriter ( new OutputStreamWriter ( new BufferedOutputStream ( new FileOutputStream ( outputPath ) ) , charset ) ) ) { StringBuilder dataToDump = new StringBuilder ( ) ; dataToDump . append ( generateTemplateIdSQLStatement ( this . tableExists ) ) ; if ( mode . active_for_pages ) { dataToDump . append ( generatePageSQLStatement ( pageTableExists , mode . templateNameToPageId ) ) ; } if ( mode . active_for_revisions ) { dataToDump . append ( generateRevisionSQLStatement ( revTableExists , mode . templateNameToRevId ) ) ; } writer . write ( dataToDump . toString ( ) ) ; } catch ( IOException e ) { logger . error ( "Error writing SQL file: {}" , e . getMessage ( ) , e ) ; } }
Generate and write sql statements to output file

@param revTableExists
if revision table does not exists -&gt; create index
@param pageTableExists
if page table does not exists -&gt; create index
@param mode
generation mode