public class SessionSearchRestriction extends 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(String code,
String query,
ComposedTypeModel restrictedType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object another)
Session search restriction are considered equal if their codes and types match.
|
String |
getCode() |
String |
getQuery() |
ComposedTypeModel |
getRestrictedType() |
public SessionSearchRestriction(String code, String query, ComposedTypeModel restrictedType)
public String getCode()
public String getQuery()
public ComposedTypeModel getRestrictedType()
Copyright © 2017 SAP SE. All Rights Reserved.