private String extractSQLForJavaDoc ( final SQLiteModelMethod method ) { final One < Boolean > usedInWhere = new One <> ( false ) ; String sqlForJavaDoc = JQLChecker . getInstance ( ) . replace ( method , method . jql , new JQLReplacerListenerImpl ( method ) { @ Override public String onColumnNameToUpdate ( String columnName ) { return currentEntity . findPropertyByName ( columnName ) . columnName ; } @ Override public String onColumnName ( String columnName ) { return currentEntity . findPropertyByName ( columnName ) . columnName ; } @ Override public String onBindParameter ( String bindParameterName , boolean inStatement ) { if ( ! usedInWhere . value0 ) { if ( bindParameterName . contains ( "." ) ) { String [ ] a = bindParameterName . split ( "\\." ) ; if ( a . length == 2 ) { bindParameterName = a [ 1 ] ; } } return ":" + bindParameterName ; } else { return null ; } } @ Override public void onWhereStatementBegin ( Where_stmtContext ctx ) { usedInWhere . value0 = true ; } @ Override public void onWhereStatementEnd ( Where_stmtContext ctx ) { usedInWhere . value0 = false ; } ; } ) ; return sqlForJavaDoc ; }
Extract SQL for java doc .