|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0) E15995-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcenter.spaces.query.SpacesQueryFilter
public class SpacesQueryFilter
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.
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 |
---|
public static SpacesQueryFilter createWhereClauseFilter(java.lang.String whereClause)
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.
whereClause
- A JPQL (Java Persistence Query Language) condition expression defining the criteria to use for filtering spacespublic static SpacesQueryFilter createSearchFilter(java.lang.String searchString)
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}
  This EL returns a list of all group spaces a user has access on and whose name or display name etc matches 'gs1'
searchString
- Pattern to search for in the space attributespublic SpacesQueryFilter.FilterType getType()
public java.lang.String getFilterString()
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.6.0) E15995-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |