public class QueryString extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
HINT_PATTERN |
protected static Pattern |
IMPORT_PATTERN |
protected static Pattern |
LIMIT_PATTERN |
protected static Pattern |
TRACE_PATTERN |
| Constructor and Description |
|---|
QueryString(Class<?> domainClass)
Creates a SELECT query for the given domain class.
|
QueryString(Class<?> domainClass,
boolean isCountQuery)
Creates a SELECT query for the given domain class.
|
QueryString(String source)
Creates a
QueryString from the given String query. |
| Modifier and Type | Method and Description |
|---|---|
QueryString |
bindIn(Collection<?> values)
Binds the given values to the IN parameter keyword by expanding the given values into a comma-separated
String. |
QueryString |
forRegion(Class<?> domainClass,
com.gemstone.gemfire.cache.Region<?,?> region)
Replaces the domain classes referenced inside the current query with the given
Region. |
Iterable<Integer> |
getInParameterIndexes()
Returns the parameter indexes used in this query.
|
QueryString |
orderBy(org.springframework.data.domain.Sort sort)
Appends the Sort order to this GemFire OQL Query string.
|
String |
toString() |
QueryString |
withHints(String... hints) |
QueryString |
withImport(String importExpression) |
QueryString |
withLimit(Integer limit) |
QueryString |
withTrace() |
protected static final Pattern HINT_PATTERN
protected static final Pattern IMPORT_PATTERN
protected static final Pattern LIMIT_PATTERN
protected static final Pattern TRACE_PATTERN
public QueryString(String source)
QueryString from the given String query.source - a String containing the OQL Query.public QueryString(Class<?> domainClass)
domainClass - must not be null.public QueryString(Class<?> domainClass, boolean isCountQuery)
domainClass - must not be null.isCountQuery - indicates if this is a count querypublic QueryString bindIn(Collection<?> values)
String.values - the values to bind, returns the QueryString as is if null is given.public QueryString forRegion(Class<?> domainClass, com.gemstone.gemfire.cache.Region<?,?> region)
Region.domainClass - the class type of the GemFire persistent entity to query; must not be null.region - the GemFire Region in which to query; must not be null.Regionpublic Iterable<Integer> getInParameterIndexes()
public QueryString orderBy(org.springframework.data.domain.Sort sort)
sort - the Sort object indicating the order by criteria.Sort,
QueryStringpublic QueryString withHints(String... hints)
public QueryString withImport(String importExpression)
public QueryString withLimit(Integer limit)
public QueryString withTrace()