/** * Binds the given {@link Collection} of values into the {@literal IN} parameters of the OQL Query by expanding * the given values into a comma-separated {@link String}. * * @param values the values to bind, returns the {@link QueryString} as is if {@literal null} is given. * @return a Query String having "in" parameters bound with values. */ public QueryString bindIn(Collection<?> values) { if (!nullSafeIsEmpty(values)) { return QueryString.of(this.query.replaceFirst(IN_PATTERN, String.format("(%s)", StringUtils.collectionToDelimitedString(values, ", ", "'", "'")))); } return this; }
/** * Binds the given {@link Collection} of values into the {@literal IN} parameters of the OQL Query by expanding * the given values into a comma-separated {@link String}. * * @param values the values to bind, returns the {@link QueryString} as is if {@literal null} is given. * @return a Query String having "in" parameters bound with values. */ public QueryString bindIn(Collection<?> values) { if (!nullSafeIsEmpty(values)) { return QueryString.of(this.query.replaceFirst(IN_PATTERN, String.format("(%s)", StringUtils.collectionToDelimitedString(values, ", ", "'", "'")))); } return this; }