public static List < Pair < String , TypeName > > orderContentValues ( final SQLiteModelMethod method , final List < Pair < String , TypeName > > updateableParams ) { final List < Pair < String , TypeName > > result = new ArrayList < Pair < String , TypeName > > ( ) ; JQLChecker checker = JQLChecker . getInstance ( ) ; final One < Boolean > inserMode = new One < Boolean > ( false ) ; checker . replace ( method , method . jql , new JQLReplacerListenerImpl ( method ) { // used in update @ Override public String onColumnNameToUpdate ( String columnName ) { String column = currentEntity . findPropertyByName ( columnName ) . columnName ; for ( Pair < String , TypeName > item : updateableParams ) { String paramNameInQuery = method . findParameterAliasByName ( item . value0 ) ; if ( paramNameInQuery . equalsIgnoreCase ( columnName ) ) { result . add ( item ) ; break ; } } return column ; } // used in insert @ Override public void onColumnNameSetBegin ( Column_name_setContext ctx ) { inserMode . value0 = true ; } @ Override public void onColumnNameSetEnd ( Column_name_setContext ctx ) { inserMode . value0 = false ; } @ Override public String onColumnName ( String columnName ) { if ( ! inserMode . value0 ) return columnName ; String column = currentEntity . findPropertyByName ( columnName ) . columnName ; for ( Pair < String , TypeName > item : updateableParams ) { String paramNameInQuery = method . findParameterAliasByName ( item . value0 ) ; if ( paramNameInQuery . equalsIgnoreCase ( columnName ) ) { result . add ( item ) ; break ; } } return column ; } } ) ; return result ; }
Order content values .