/** * Finds SQL for a named fragment key, without specifying parameters. * <p> * This finds, processes and returns a named block from the bundle. * Note that if the SQL contains tags that depend on variables, like AND or LIKE, * then an error will be thrown. * * @param name the name, not null * @return the SQL, not null * @throws IllegalArgumentException if there is no fragment with the specified name * @throws RuntimeException if a problem occurs */ public String getSql(String name) { return _fragments.getSql(name, EmptySqlParams.INSTANCE); }
/** * Finds SQL for a named fragment key, without specifying parameters. * <p> * This finds, processes and returns a named block from the bundle. * Note that if the SQL contains tags that depend on variables, like AND or LIKE, * then an error will be thrown. * * @param name the name, not null * @return the SQL, not null * @throws IllegalArgumentException if there is no fragment with the specified name * @throws RuntimeException if a problem occurs */ public String getSql(String name) { return _fragments.getSql(name, EmptySqlParams.INSTANCE); }
/** * Finds SQL for a named fragment key, providing the SQL parameters. * <p> * This finds, processes and returns a named block from the bundle. * The parameters are used to provide intelligent processing of SQL based on * the actual data in the request. * <p> * See {@link MapSqlParams} and {@link SpringSqlParams}. * * @param name the name, not null * @param params the SQL parameters, not null * @return the SQL, not null * @throws IllegalArgumentException if there is no fragment with the specified name * @throws RuntimeException if a problem occurs */ public String getSql(String name, SqlParams params) { return _fragments.getSql(name, params); }
/** * Finds SQL for a named fragment key. * <p> * This finds, processes and returns a named block from the bundle. * The parameters are used to provide intelligent processing of SQL based on * the actual data in the request. * * @param name the name, not null * @param paramSource the Spring SQL parameters, not null * @return the SQL, not null * @throws IllegalArgumentException if there is no fragment with the specified name * @throws RuntimeException if a problem occurs */ public String getSql(String name, SqlParameterSource paramSource) { return _fragments.getSql(name, new SpringSqlParams(paramSource)); }
/** * Finds SQL for a named fragment key, providing a map of SQL parameters. * <p> * This finds, processes and returns a named block from the bundle. * The parameters are used to provide intelligent processing of SQL based on * the actual data in the request. * * @param name the name, not null * @param params the SQL parameters, not null * @return the SQL, not null * @throws IllegalArgumentException if there is no fragment with the specified name * @throws RuntimeException if a problem occurs */ public String getSql(String name, Map<String, Object> params) { return _fragments.getSql(name, new MapSqlParams(params)); }