Constructing a query is done like
query = service.getQueryBuilder();
memberOfType = service.getRelationType(context, "collaboration", "member-of");
attributeName = new PropertyName("office", "location");
queryExpression = query.relation(memberOfType).and(query.source(attributeName).equals("Walldorf"));
all
IRelationQuery all()
- Return query expression to select all relations.
- Returns:
- a
IRelationQuery to select any relations.
all
IRelationQuery all(String namespace)
- Return query expression to selects all the relations for those relation
types which match the given namespace.
- Parameters:
namespace - a String with the namespace of the relation
types. if null , all relation namespaces are selected.
- Returns:
- a
IRelationQuery to select the relations for the
relation types within the given namespace.
relationType
IRelationQuery relationType(IRelationType type)
- Return query expression to select the relations of the given relation type.
- Parameters:
type - the IRelationType to use as selection criteria. if
null , all types are selected.
- Returns:
- a
IRelationQuery to select the relations for the given
relation type.
source
IRelationOperandQuery source()
- Return an expression for the source operand's id (select only those
relations with source id matching the given expression).
- Returns:
- a
IRelationOperandQuery with the 'source' expression.
target
IRelationOperandQuery target()
- Return an expression for the target operand's id (select only those
relations with target id matching the given expression).
- Returns:
- a
IRelationOperandQuery with the 'target' expression.
sourceOrTarget
IRelationOperandQuery sourceOrTarget()
- Return an expression for the source operand's or target operand's id
(select only those relations with source id or target id matching the given
expression). This is just a shortcut, allowing to replace
query.source().equal(value ).or(query.target().equal(value ))
with query.sourceOrTarget().equal(value ) .
- Returns:
- a
IRelationOperandQuery with the 'target' expression.
property
IRelationPropertyQuery property(IPropertyName propertyName)
- Return an expression for the given relation property's value (select only
those relations with the given relation property matching the given
expression).
- Parameters:
propertyName - the IPropertyName<(/code> of the property to use
for selection.
- Returns:
- a
IRelationPropertyQuery with the 'relation-property'
expression.
orderBySource
IRelationQueryOrder orderBySource()
- Get an order expression which sorts by source id.
- Returns:
- a
IRelationQueryOrder for the source id.
orderByTarget
IRelationQueryOrder orderByTarget()
- Get an order expression which sorts by target id.
- Returns:
- a
IRelationQueryOrder for the target id.
orderByProperty
IRelationQueryOrder orderByProperty(IPropertyName propertyName)
- Get an order expression which sorts by the value of a given property.
- Parameters:
propertyName - the IPropertyName<(/code> of the property to use
for ordering.
- Returns:
- a
IRelationQueryOrder for the given property.
This class can be accessed from:
|
SC
|
DC
|
Public Part
|
ACH
|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2014 SAP AG Complete Copyright Notice