001 002package gudusoft.gsqlparser.pp.stmtformatter.builder.comm; 003 004import gudusoft.gsqlparser.pp.processor.ProcessorFactory; 005import gudusoft.gsqlparser.pp.stmtformatter.builder.AbstractStmtFormatterBuilder; 006import gudusoft.gsqlparser.pp.stmtformatter.type.comm.CreateViewStmtFormatter; 007 008public class CreateViewStmtFormatterBuilder extends 009 AbstractStmtFormatterBuilder<CreateViewStmtFormatter> 010{ 011 012 @Override 013 protected void initSpecialProcessorForFormatter( 014 CreateViewStmtFormatter formatter ) 015 { 016 // build the special processor 017 formatter.addSpecialProcessor( ProcessorFactory.createCapitalisationProcessor( getOption( ) ) ); 018 formatter.addSpecialProcessor( ProcessorFactory.createCombineWhitespaceAndClearReturnProcessor( getOption( ) ) ); 019 020 // formatter.addSpecialProcessor(ProcessorFactory.createCreateFuncLeftBEProcessor(getOption(), 021 // getOption().beStyleFunctionLeftBEOnNewline, 022 // getOption().beStyleFunctionLeftBEIndentSize)); 023 // formatter.addSpecialProcessor(ProcessorFactory.createCreateFuncRightBEProcessor(getOption(), 024 // getOption().beStyleFunctionRightBEOnNewline, 025 // getOption().beStyleFunctionRightBEIndentSize)); 026 // 027 // formatter.addSpecialProcessor(ProcessorFactory.createCreateFuncFirstParamInNewlineProcessor(getOption(), 028 // getOption().beStyleFunctionFirstParamInNewline)); 029 // 030 // formatter.addSpecialProcessor(ProcessorFactory.createCreateFuncReturnsTableProcessor(getOption())); 031 // 032 // formatter.addSpecialProcessor(ProcessorFactory.createCreateFuncWSPaddingParenthesesProcessor(getOption())); 033 // 034 formatter.addSpecialProcessor( ProcessorFactory.createCreateViewReturnProcessor( getOption( ) ) ); 035 // build all the item list processors 036 formatter.addParameterProcessor( ProcessorFactory.createColumnlistCommaProcessor( getOption( ), 037 getOption( ).parametersComma, 038 getOption( ).parametersStyle ) ); 039 040 formatter.addParameterProcessor( ProcessorFactory.createAlignAliasProcessor( getOption( ), 041 true, 042 getOption( ).parametersStyle ) ); 043 044 } 045 046 @Override 047 protected CreateViewStmtFormatter newInstanceFormatter( ) 048 { 049 return new CreateViewStmtFormatter( ); 050 } 051 052}