Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.webcenter.spaces.query
Class SpacesQueryFilter

java.lang.Object
  extended by oracle.webcenter.spaces.query.SpacesQueryFilter

All Implemented Interfaces:
java.io.Serializable

public class SpacesQueryFilter
extends java.lang.Object
implements java.io.Serializable

Defines a filter to use as criteria for querying spaces.

Use the createXXX() methods to create instances of this class, and call SpacesQueryParameters.setFilter(oracle.webcenter.spaces.query.SpacesQueryFilter) to set this to be used on a SpacesQueryParameters instance.

Since:
release specific (what release of product did this appear in)
See Also:
Serialized Form

Nested Class Summary
static class SpacesQueryFilter.FilterType
          This type definition is liable to change across product releases and is not intended for consumer use.

 

Method Summary
static SpacesQueryFilter createSearchFilter(java.lang.String searchString)
          Creates a filter representing a text search on certail pre-designated space attributes.
static SpacesQueryFilter createWhereClauseFilter(java.lang.String whereClause)
          Creates a filter defined by a JPQL condition expression.
 java.lang.String getFilterString()
          This method is liable to change across product releases and is not intended for consumer use.
 SpacesQueryFilter.FilterType getType()
          This method is liable to change across product releases and is not intended for consumer use.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

createWhereClauseFilter

public static SpacesQueryFilter createWhereClauseFilter(java.lang.String whereClause)
Creates a filter defined by a JPQL condition expression.

The JPQL condition expression can reference space attributes using the idenitifier 'sp' representing the JPA entity for a space, WcSpaceHeader. For example, the following condition can be used to create a filter for all spaces created by users having user names starting with 'monty' on which self subscription is enabled: "sp.createdBy like 'monty%' and not (sp.selfSubEnabled is null or sp.selfSubEnabled = 'N')". You can use any field defined in WcSpaceHeader in the where-clause.

The EL equivalent for the where-clause, however, does not allow specifying freeform JPQL, but expects it to be specified in a structured way as a composition of special conditional expression constructs. A conditional expression construct can be either

An atomic condition can be expressed as wCond[p][op][v] where p is a space attribute (field in WcSpaceHeader), op is one among a restricted set of JPQL comparison operators ('=', 'like', '!=', '<', '>', '<=', '>=', 'is'), and v is a string whose interpretation depends on the operator op. If the operator is 'is', v can be the string 'null' or 'not null', and the condition understood as the attribute being checked for null or not null respectively in JPQL. If the operator is anything else, v is interpreted to be a literal and the condition understood to be the attribute being compared with the literal value.

A conjunction condition can be expressed as cond1['and'][cond2] where cond1 and cond2 are the expressions for the two conditions being conjoined.

A disjunction condition can be expressed as cond1['or'][cond2] where cond1 and cond2 are the expressions for the two conditions being disjoined.

A negation condition can be expressed as cond['not'] where cond is the expression for the condition being conjoined.


e.g. #{spaceContext.spacesQuery.unionOf.ALL_QUERIABLE.where[wCond['sp.createdBy']['like']['monty%'] ['and'] [wCond['sp.selfSubEnabled']['is']['null'] ['or'] [wCond['sp.selfSubEnabled']['=']['N']] ['not'] ] ].listSpaces}


  This EL returns a list of all spaces (which the current user can be aware of) that are created by users having names starting with 'monty' and on which self subscription is enabled.

Parameters:
whereClause - A JPQL (Java Persistence Query Language) condition expression defining the criteria to use for filtering spaces
Returns:
Filter defined by the specified JPQL condition expression

createSearchFilter

public static SpacesQueryFilter createSearchFilter(java.lang.String searchString)
Creates a filter representing a text search on certail pre-designated space attributes.

As of today the attributes that get searched on are display name, name, description, keywords, GUID, and creator user name.


EL- #{spaceContext.spacesQuery.unionOf.ALL_QUERIABLE.sortCriteria['sp.lastUpdateDate desc'].search['gs1'].listSpaces}

&nbsp This EL returns a list of all group spaces a user has access on and whose name or display name etc matches 'gs1'

Parameters:
searchString - Pattern to search for in the space attributes
Returns:
Filter representing a search on space attributes

getType

public SpacesQueryFilter.FilterType getType()
This method is liable to change across product releases and is not intended for consumer use.

getFilterString

public java.lang.String getFilterString()
This method is liable to change across product releases and is not intended for consumer use.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.