public interface IRelationQueryBuilder
IQueryExpressions to be used with
the relation service. IRelationQueryBuilder constructs IRelationQuery
s, which can be executed by IRelationService.getRelations(com.sapportals.wcm.repository.IResourceContext, IRelationQuery)
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"));
| Modifier and Type | Method and Description |
|---|---|
IRelationQuery |
all()
Return query expression to select all relations.
|
IRelationQuery |
all(String namespace)
Return query expression to selects all the relations for those relation
types which match the given namespace.
|
IRelationQueryOrder |
orderByProperty(IPropertyName propertyName)
Get an order expression which sorts by the value of a given property.
|
IRelationQueryOrder |
orderBySource()
Get an order expression which sorts by source id.
|
IRelationQueryOrder |
orderByTarget()
Get an order expression which sorts by target id.
|
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).
|
IRelationQuery |
relationType(IRelationType type)
Return query expression to select the relations of the given relation type.
|
IRelationOperandQuery |
source()
Return an expression for the source operand's id (select only those
relations with source id matching the given expression).
|
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).
|
IRelationOperandQuery |
target()
Return an expression for the target operand's id (select only those
relations with target id matching the given expression).
|
IRelationQuery all()
IRelationQuery to select any relations.IRelationQuery all(String namespace)
namespace - a String with the namespace of the relation
types. if null , all relation namespaces are selected.IRelationQuery to select the relations for the
relation types within the given namespace.IRelationQuery relationType(IRelationType type)
type - the IRelationType to use as selection criteria. if
null , all types are selected.IRelationQuery to select the relations for the given
relation type.IRelationOperandQuery source()
IRelationOperandQuery with the 'source' expression.IRelationOperandQuery target()
IRelationOperandQuery with the 'target' expression.IRelationOperandQuery sourceOrTarget()
query.source().equal(value ).or(query.target().equal(value ))
with query.sourceOrTarget().equal(value ) .IRelationOperandQuery with the 'target' expression.IRelationPropertyQuery property(IPropertyName propertyName)
propertyName - the IPropertyName of the property to use
for selection.IRelationPropertyQuery with the 'relation-property'
expression.IRelationQueryOrder orderBySource()
IRelationQueryOrder for the source id.IRelationQueryOrder orderByTarget()
IRelationQueryOrder for the target id.IRelationQueryOrder orderByProperty(IPropertyName propertyName)
propertyName - the IPropertyName of the property to use
for ordering.IRelationQueryOrder for the given property.| Access Rights |
|---|
| 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 2017 SAP AG Complete Copyright Notice