public class SrampClientQuery extends Object
SrampAtomApiClient from an xpath template. The
xpath template is of the same form as a typical JDBC statement (using the ? character
for replacements). Following are same example usages:| Modifier | Constructor and Description |
|---|---|
protected |
SrampClientQuery(SrampAtomApiClient client,
String queryTemplate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SrampClientQuery |
ascending()
Sets ascending to true.
|
SrampClientQuery |
count(int count) |
SrampClientQuery |
descending()
Sets ascending to false.
|
SrampClientQuery |
orderBy(String orderBy) |
SrampClientQuery |
parameter(Calendar param)
Sets a parameter on the query.
|
SrampClientQuery |
parameter(Date param)
Sets a parameter on the query - this should match up to a ? in the
query template provided.
|
SrampClientQuery |
parameter(double param)
Sets a parameter on the query - this should match up to a ? in the
query template provided.
|
SrampClientQuery |
parameter(float param)
Sets a parameter on the query - this should match up to a ? in the
query template provided.
|
SrampClientQuery |
parameter(int param)
Sets a parameter on the query - this should match up to a ? in the
query template provided.
|
SrampClientQuery |
parameter(long param)
Sets a parameter on the query - this should match up to a ? in the
query template provided.
|
SrampClientQuery |
parameter(Number param)
Sets a parameter on the query - this should match up to a ? in the
query template provided.
|
SrampClientQuery |
parameter(String param)
Sets a parameter on the query - this should match up to a ? in the
query template provided.
|
SrampClientQuery |
propertyName(String propertyName) |
QueryResultSet |
query()
Formats the query given the replacement params, then issues the query
to the S-RAMP repository and returns the result.
|
SrampClientQuery |
startIndex(int startIndex) |
protected SrampClientQuery(SrampAtomApiClient client, String queryTemplate)
client - queryTemplate - public SrampClientQuery parameter(String param)
param - public SrampClientQuery parameter(int param)
param - public SrampClientQuery parameter(long param)
param - public SrampClientQuery parameter(double param)
param - public SrampClientQuery parameter(Date param)
parameter(Calendar param)param - public SrampClientQuery parameter(Calendar param)
param - public SrampClientQuery parameter(float param)
param - public SrampClientQuery parameter(Number param)
param - public SrampClientQuery startIndex(int startIndex)
startIndex - the startIndex to setpublic SrampClientQuery count(int count)
count - the count to setpublic SrampClientQuery orderBy(String orderBy)
orderBy - the orderBy to setpublic SrampClientQuery ascending()
public SrampClientQuery descending()
public SrampClientQuery propertyName(String propertyName)
propertyName - property name to include in the resultpublic QueryResultSet query() throws SrampClientException, org.overlord.sramp.atom.err.SrampAtomException
org.overlord.sramp.atom.err.SrampAtomExceptionSrampClientExceptionCopyright © 2011-2014 JBoss, a division of Red Hat. All Rights Reserved.