public class SessionSearchRestriction
extends java.lang.Object
// We want to limit Language to active
final ComposedTypeModel restrictedType = typeService.getComposedTypeForClass(LanguageModel.class);
try
{
final SessionSearchRestriction restriction = new SessionSearchRestriction("someUniqueCode", "{active} IS TRUE", restrictedType);
final Collection<SessionSearchRestriction> restrictions = new ArrayList<SessionSearchRestriction>();
restrictions.add(restriction);
searchRestrictionService.addSessionSearchRestrictions(restrictions);
// ... business code goes here now ...
}
finally
{
// clear all dynamic restrictions
searchRestrictionService.clearSessionSearchRestrictions();
}
| Constructor and Description |
|---|
SessionSearchRestriction(java.lang.String code,
java.lang.String query,
ComposedTypeModel restrictedType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object another)
Session search restriction are considered equal if their codes and types match.
|
java.lang.String |
getCode() |
java.lang.String |
getQuery() |
ComposedTypeModel |
getRestrictedType() |
int |
hashCode()
Object equality is based on code and type.
|
public SessionSearchRestriction(java.lang.String code,
java.lang.String query,
ComposedTypeModel restrictedType)
public java.lang.String getCode()
public java.lang.String getQuery()
public ComposedTypeModel getRestrictedType()
public boolean equals(java.lang.Object another)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectequals(Object)Copyright © 2018 SAP SE. All Rights Reserved.