public interface QueryStatement extends Cloneable
Example:
Calendar cal = ... Folder folder = ... QueryStatement qs = session.createQueryStatement("SELECT ?, ? FROM ? WHERE ? > TIMESTAMP ? AND IN_FOLDER(?) OR ? IN (?)"); qs.setProperty(1, "cmis:document", "cmis:name"); qs.setProperty(2, "cmis:document", "cmis:objectId"); qs.setType(3, "cmis:document"); qs.setProperty(4, "cmis:document", "cmis:creationDate"); qs.setDateTime(5, cal); qs.setId(6, folder); qs.setProperty(7, "cmis:document", "cmis:createdBy"); qs.setString(8, "bob", "tom", "lisa"); String statement = qs.toQueryString();
Modifier and Type | Method and Description |
---|---|
ItemIterable<QueryResult> |
query(boolean searchAllVersions)
Executes the query.
|
ItemIterable<QueryResult> |
query(boolean searchAllVersions,
OperationContext context)
Executes the query.
|
void |
setBoolean(int parameterIndex,
boolean... bool)
Sets the designated parameter to the given boolean.
|
void |
setDateTime(int parameterIndex,
Calendar... cal)
Sets the designated parameter to the given DateTime value.
|
void |
setDateTime(int parameterIndex,
Date... date)
Sets the designated parameter to the given DateTime value.
|
void |
setDateTime(int parameterIndex,
long... ms)
Sets the designated parameter to the given DateTime value.
|
void |
setDateTimeTimestamp(int parameterIndex,
Calendar... cal)
Sets the designated parameter to the given DateTime value with the prefix 'TIMESTAMP '.
|
void |
setDateTimeTimestamp(int parameterIndex,
Date... date)
Sets the designated parameter to the given DateTime value with the prefix 'TIMESTAMP '.
|
void |
setDateTimeTimestamp(int parameterIndex,
long... ms)
Sets the designated parameter to the given DateTime value with the prefix 'TIMESTAMP '.
|
void |
setId(int parameterIndex,
ObjectId... id)
Sets the designated parameter to the given object id.
|
void |
setNumber(int parameterIndex,
Number... num)
Sets the designated parameter to the given number.
|
void |
setProperty(int parameterIndex,
PropertyDefinition<?> propertyDefinition)
Sets the designated parameter to the query name of the given property.
|
void |
setProperty(int parameterIndex,
String typeId,
String propertyId)
Sets the designated parameter to the query name of the given property.
|
void |
setString(int parameterIndex,
String... str)
Sets the designated parameter to the given string.
|
void |
setStringContains(int parameterIndex,
String str)
Sets the designated parameter to the given string in a CMIS contains statement.
|
void |
setStringLike(int parameterIndex,
String str)
Sets the designated parameter to the given string.
|
void |
setType(int parameterIndex,
ObjectType type)
Sets the designated parameter to the query name of the given type.
|
void |
setType(int parameterIndex,
String typeId)
Sets the designated parameter to the query name of the given type id.
|
void |
setUri(int parameterIndex,
URI... uri)
Sets the designated parameter to the given URI.
|
void |
setUrl(int parameterIndex,
URL... url)
Sets the designated parameter to the given URL.
|
String |
toQueryString()
Returns the query statement.
|
void setType(int parameterIndex, String typeId)
void setType(int parameterIndex, ObjectType type)
void setProperty(int parameterIndex, String typeId, String propertyId)
void setProperty(int parameterIndex, PropertyDefinition<?> propertyDefinition)
void setNumber(int parameterIndex, Number... num)
void setString(int parameterIndex, String... str)
void setStringLike(int parameterIndex, String str)
void setStringContains(int parameterIndex, String str)
void setId(int parameterIndex, ObjectId... id)
void setUri(int parameterIndex, URI... uri)
void setUrl(int parameterIndex, URL... url)
void setBoolean(int parameterIndex, boolean... bool)
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)
String toQueryString()
ItemIterable<QueryResult> query(boolean searchAllVersions)
Session.query(String, boolean)
ItemIterable<QueryResult> query(boolean searchAllVersions, OperationContext context)
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.