public class QueryStatementImpl extends Object implements QueryStatement, Cloneable
| Constructor and Description |
|---|
QueryStatementImpl(Session session,
Collection<String> selectPropertyIds,
Map<String,String> fromTypes,
String whereClause,
List<String> orderByPropertyIds)
Creates a QueryStatement object for a query of one primary type joined by
zero or more secondary types.
|
QueryStatementImpl(Session session,
String statement)
Creates a QueryStatement object with a given statement.
|
| Modifier and Type | Method and Description |
|---|---|
protected QueryStatementImpl |
clone() |
ItemIterable<QueryResult> |
query() |
ItemIterable<QueryResult> |
query(boolean searchAllVersions) |
ItemIterable<QueryResult> |
query(boolean searchAllVersions,
OperationContext context) |
void |
setBoolean(int parameterIndex,
boolean... bool) |
protected void |
setDateTime(int parameterIndex,
boolean prefix,
Calendar... cal) |
protected void |
setDateTime(int parameterIndex,
boolean prefix,
Date... date) |
protected void |
setDateTime(int parameterIndex,
boolean prefix,
long... ms) |
void |
setDateTime(int parameterIndex,
Calendar... cal) |
void |
setDateTime(int parameterIndex,
Date... date) |
void |
setDateTime(int parameterIndex,
long... ms) |
void |
setDateTimeTimestamp(int parameterIndex,
Calendar... cal) |
void |
setDateTimeTimestamp(int parameterIndex,
Date... date) |
void |
setDateTimeTimestamp(int parameterIndex,
long... ms) |
void |
setId(int parameterIndex,
ObjectId... id) |
void |
setNumber(int parameterIndex,
Number... num) |
void |
setProperty(int parameterIndex,
PropertyDefinition<?> propertyDefinition) |
void |
setProperty(int parameterIndex,
String typeId,
String propertyId) |
void |
setString(int parameterIndex,
String... str) |
void |
setStringContains(int parameterIndex,
String str) |
void |
setStringLike(int parameterIndex,
String str) |
void |
setType(int parameterIndex,
ObjectType type) |
void |
setType(int parameterIndex,
String typeId) |
void |
setUri(int parameterIndex,
URI... uri) |
void |
setUrl(int parameterIndex,
URL... url) |
String |
toQueryString() |
String |
toString() |
public QueryStatementImpl(Session session, String statement)
session - the Session object, must not be nullstatement - the query statement with placeholders ('?'), see
QueryStatement for detailspublic QueryStatementImpl(Session session, Collection<String> selectPropertyIds, Map<String,String> fromTypes, String whereClause, List<String> orderByPropertyIds)
session - the Session object, must not be nullselectPropertyIds - the property IDs in the SELECT statement, if null all
properties are selectedfromTypes - a Map of type aliases (keys) and type IDs (values), the Map
must contain exactly one primary type and zero or more
secondary typeswhereClause - an optional WHERE clause with placeholders ('?'), see
QueryStatement for detailsorderByPropertyIds - an optional list of properties IDs for the ORDER BY clausepublic void setType(int parameterIndex,
String typeId)
setType in interface QueryStatementpublic void setType(int parameterIndex,
ObjectType type)
setType in interface QueryStatementpublic void setProperty(int parameterIndex,
String typeId,
String propertyId)
setProperty in interface QueryStatementpublic void setProperty(int parameterIndex,
PropertyDefinition<?> propertyDefinition)
setProperty in interface QueryStatementpublic void setNumber(int parameterIndex,
Number... num)
setNumber in interface QueryStatementpublic void setString(int parameterIndex,
String... str)
setString in interface QueryStatementpublic void setStringContains(int parameterIndex,
String str)
setStringContains in interface QueryStatementpublic void setStringLike(int parameterIndex,
String str)
setStringLike in interface QueryStatementpublic void setId(int parameterIndex,
ObjectId... id)
setId in interface QueryStatementpublic void setUri(int parameterIndex,
URI... uri)
setUri in interface QueryStatementpublic void setUrl(int parameterIndex,
URL... url)
setUrl in interface QueryStatementpublic void setBoolean(int parameterIndex,
boolean... bool)
setBoolean in interface QueryStatementpublic void setDateTime(int parameterIndex,
Calendar... cal)
setDateTime in interface QueryStatementpublic void setDateTimeTimestamp(int parameterIndex,
Calendar... cal)
setDateTimeTimestamp in interface QueryStatementprotected void setDateTime(int parameterIndex,
boolean prefix,
Calendar... cal)
public void setDateTime(int parameterIndex,
Date... date)
setDateTime in interface QueryStatementpublic void setDateTimeTimestamp(int parameterIndex,
Date... date)
setDateTimeTimestamp in interface QueryStatementprotected void setDateTime(int parameterIndex,
boolean prefix,
Date... date)
public void setDateTime(int parameterIndex,
long... ms)
setDateTime in interface QueryStatementpublic void setDateTimeTimestamp(int parameterIndex,
long... ms)
setDateTimeTimestamp in interface QueryStatementprotected void setDateTime(int parameterIndex,
boolean prefix,
long... ms)
public String toQueryString()
toQueryString in interface QueryStatementpublic ItemIterable<QueryResult> query()
query in interface QueryStatementpublic ItemIterable<QueryResult> query(boolean searchAllVersions)
query in interface QueryStatementpublic ItemIterable<QueryResult> query(boolean searchAllVersions, OperationContext context)
query in interface QueryStatementprotected QueryStatementImpl clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2009–2017 The Apache Software Foundation. All rights reserved.