com.sapportals.wcm.service.relation
Interface IRelationQueryBuilder
- public interface IRelationQueryBuilder
A query builder wich creates IQueryExpressions to be used with
the relation service.
A 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"));
all
public IRelationQuery all()
- Return query expression to select all relations.
- Returns:
- a
IRelationQuery to select any relations.
all
public 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
public 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
public 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
public 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
public 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
public 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
public IRelationQueryOrder orderBySource()
- Get an order expression which sorts by source id.
- Returns:
- a
IRelationQueryOrder for the source id.
orderByTarget
public IRelationQueryOrder orderByTarget()
- Get an order expression which sorts by target id.
- Returns:
- a
IRelationQueryOrder for the target id.
orderByProperty
public 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.
Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.