public int[] getNamedParameterLocs(String name) throws QueryException { Object o = namedParameters.get( name ); if ( o == null ) { QueryException qe = new QueryException( ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR + name ); qe.setQueryString( queryString ); throw qe; } if ( o instanceof Integer ) { return new int[]{( ( Integer ) o ).intValue()}; } else { return ArrayHelper.toIntArray( ( ArrayList ) o ); } }
public int[] getNamedParameterLocs(String name) throws QueryException { Object o = namedParameters.get( name ); if ( o == null ) { QueryException qe = new QueryException( ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR + name ); qe.setQueryString( queryString ); throw qe; } if ( o instanceof Integer ) { return new int[]{ ( ( Integer ) o ).intValue() }; } else { return ArrayHelper.toIntArray( ( ArrayList ) o ); } }
@Override public int[] getNamedParameterLocs(String name) throws QueryException { Object o = namedParameters.get( name ); if ( o == null ) { QueryException qe = new QueryException( ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR + name ); qe.setQueryString( queryString ); throw qe; } if ( o instanceof Integer ) { return new int[]{ ( ( Integer ) o ).intValue() }; } else { return ArrayHelper.toIntArray( ( ArrayList ) o ); } }
@Override public int[] getNamedParameterLocs(String name) throws QueryException { Object o = namedParameters.get( name ); if ( o == null ) { QueryException qe = new QueryException( ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR + name ); qe.setQueryString( queryString ); throw qe; } if ( o instanceof Integer ) { return new int[]{ ( ( Integer ) o ).intValue() }; } else { return ArrayHelper.toIntArray( ( ArrayList ) o ); } }
/** * Returns the locations of all occurrences of the named parameter. */ public int[] getNamedParameterLocations(String name) throws QueryException { Object o = namedParameters.get( name ); if ( o == null ) { QueryException qe = new QueryException( QueryTranslator.ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR + name ); qe.setQueryString( queryTranslatorImpl.getQueryString() ); throw qe; } if ( o instanceof Integer ) { return new int[]{( ( Integer ) o ).intValue()}; } else { return ArrayHelper.toIntArray( ( ArrayList ) o ); } }
/** * Returns the locations of all occurrences of the named parameter. */ int[] getNamedParameterLocs(String name) throws QueryException { Object o = namedParameters.get( name ); if ( o == null ) { QueryException qe = new QueryException( QueryTranslator.ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR + name ); qe.setQueryString( queryTranslatorImpl.getQueryString() ); throw qe; } if ( o instanceof Integer ) { return new int[]{( ( Integer ) o ).intValue()}; } else { return ArrayHelper.toIntArray( ( ArrayList ) o ); } }
/** * Returns the locations of all occurrences of the named parameter. */ public int[] getNamedParameterLocations(String name) throws QueryException { Object o = namedParameters.get( name ); if ( o == null ) { QueryException qe = new QueryException( QueryTranslator.ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR + name ); qe.setQueryString( queryTranslatorImpl.getQueryString() ); throw qe; } if ( o instanceof Integer ) { return new int[]{( ( Integer ) o ).intValue()}; } else { return ArrayHelper.toIntArray( (ArrayList) o ); } }
/** * Returns the locations of all occurrences of the named parameter. */ public int[] getNamedParameterLocations(String name) throws QueryException { Object o = namedParameters.get( name ); if ( o == null ) { QueryException qe = new QueryException( QueryTranslator.ERROR_NAMED_PARAMETER_DOES_NOT_APPEAR + name ); qe.setQueryString( queryTranslatorImpl.getQueryString() ); throw qe; } if ( o instanceof Integer ) { return new int[]{( ( Integer ) o ).intValue()}; } else { return ArrayHelper.toIntArray( (ArrayList) o ); } }
/** * Compile the query (generate the SQL). */ private void compile() throws QueryException, MappingException { log.trace( "compiling query" ); try { ParserHelper.parse( new PreprocessingParser( tokenReplacements ), queryString, ParserHelper.HQL_SEPARATORS, this ); renderSQL(); } catch ( QueryException qe ) { qe.setQueryString( queryString ); throw qe; } catch ( MappingException me ) { throw me; } catch ( Exception e ) { log.debug( "unexpected query compilation problem", e ); e.printStackTrace(); QueryException qe = new QueryException( "Incorrect query syntax", e ); qe.setQueryString( queryString ); throw qe; } postInstantiate(); compiled = true; }
/** * Compile the query (generate the SQL). */ private void compile() throws QueryException, MappingException { log.trace( "compiling query" ); try { ParserHelper.parse( new PreprocessingParser( tokenReplacements ), queryString, ParserHelper.HQL_SEPARATORS, this ); renderSQL(); } catch ( QueryException qe ) { qe.setQueryString( queryString ); throw qe; } catch ( MappingException me ) { throw me; } catch ( Exception e ) { log.debug( "unexpected query compilation problem", e ); e.printStackTrace(); QueryException qe = new QueryException( "Incorrect query syntax", e ); qe.setQueryString( queryString ); throw qe; } postInstantiate(); compiled = true; }
qe.setQueryString( queryString ); throw qe; e.printStackTrace(); QueryException qe = new QueryException( "Incorrect query syntax", e ); qe.setQueryString( queryString ); throw qe;
qe.setQueryString( queryString ); throw qe; e.printStackTrace(); QueryException qe = new QueryException( "Incorrect query syntax", e ); qe.setQueryString( queryString ); throw qe;
qe.setQueryString( hql ); throw qe;
qe.setQueryString( hql ); throw qe; qe.setQueryString( hql ); throw qe;
qe.setQueryString( hql ); throw qe;
qe.setQueryString( hql ); throw qe;