@Test( expected = NullPointerException.class ) public void testHandleVariableLookupWithoutParams() { parser.handleVariableLookup( new StringBuilder(), null, "column_name" ); }
protected void handleVariableLookup( final StringBuilder result, final DataRow parameters, final String columnName ) { if ( parameters == null ) { throw new NullPointerException( "Parameters must never be null" ); } final String s = lookupVariable( columnName ); final Object propertyValue = parameters.get( columnName ); if ( expandArray && propertyValue instanceof Object[] ) { final Object[] parameterValues = (Object[]) propertyValue; for ( int j = 0; j < parameterValues.length - 1; j++ ) { result.append( s ); result.append( ',' ); } result.append( s ); } else { result.append( s ); } }
SQLParameterLookupParser extends PropertyLookupParser { protected void handleVariableLookup( final StringBuilder result, final DataRow parameters, final String columnName ) { if ( parameters == null ) { throw new NullPointerException( "Parameters must never be null" ); } final String s = lookupVariable( columnName ); final Object propertyValue = parameters.get( columnName ); if ( expandArray && propertyValue instanceof Object[] ) { final Object[] parameterValues = (Object[]) propertyValue; for ( int j = 0; j < parameterValues.length - 1; j++ ) { result.append( s ); result.append( ',' ); } result.append( s ); } else { result.append( s ); } } }
SQLParameterLookupParser extends PropertyLookupParser { protected void handleVariableLookup( final StringBuilder result, final DataRow parameters, final String columnName ) { if ( parameters == null ) { throw new NullPointerException( "Parameters must never be null" ); } final String s = lookupVariable( columnName ); final Object propertyValue = parameters.get( columnName ); if ( expandArray && propertyValue instanceof Object[] ) { final Object[] parameterValues = (Object[]) propertyValue; for ( int j = 0; j < parameterValues.length - 1; j++ ) { result.append( s ); result.append( ',' ); } result.append( s ); } else { result.append( s ); } } SQLParameterLookupParser( final boolean expandArray ); }
SQLParameterLookupParser extends PropertyLookupParser { protected void handleVariableLookup( final StringBuilder result, final DataRow parameters, final String columnName ) { if ( parameters == null ) { throw new NullPointerException( "Parameters must never be null" ); } final String s = lookupVariable( columnName ); final Object propertyValue = parameters.get( columnName ); if ( expandArray && propertyValue instanceof Object[] ) { final Object[] parameterValues = (Object[]) propertyValue; for ( int j = 0; j < parameterValues.length - 1; j++ ) { result.append( s ); result.append( ',' ); } result.append( s ); } else { result.append( s ); } } SQLParameterLookupParser( final boolean expandArray ); String[] getFields(); boolean isExpandArray(); }
SQLParameterLookupParser extends PropertyLookupParser { protected void handleVariableLookup( final StringBuilder result, final DataRow parameters, final String columnName ) { if ( parameters == null ) { throw new NullPointerException( "Parameters must never be null" ); } final String s = lookupVariable( columnName ); final Object propertyValue = parameters.get( columnName ); if ( expandArray && propertyValue instanceof Object[] ) { final Object[] parameterValues = (Object[]) propertyValue; for ( int j = 0; j < parameterValues.length - 1; j++ ) { result.append( s ); result.append( ',' ); } result.append( s ); } else { result.append( s ); } } SQLParameterLookupParser( final boolean expandArray ); String[] getFields(); boolean isExpandArray();  }