Class SubjectSettings2Sql

java.lang.Object
de.businesscode.bcdui.wrs.load.SubjectSettings2Sql
All Implemented Interfaces:
SqlConditionGenerator

public class SubjectSettings2Sql extends Object implements SqlConditionGenerator
Returns a where clause based on the SubjectFilters of the BindingSet and the current Subject's permissions Initially taken from WrsSqlGenerator. For change history see there We are instantiated per SQL generation for a SubjectFilters
  • Constructor Details

  • Method Details

    • getCondition

      public String getCondition() throws BindingException
      Returns a where clause based on the SubjectFilters of the BindingSet and the current Subject's permissions
      Specified by:
      getCondition in interface SqlConditionGenerator
      Returns:
      additional condition or empty string
      Throws:
      BindingException
    • generateCondition

      protected void generateCondition(StringBuilder subjectSettingsClause, org.apache.shiro.subject.Subject subject, SubjectFilterType ft, List<Element> boundVariables, String filterType, Set<String> permissions, BindingItem bi)
      generates single condition like "col in ('a','b','c')"
      Parameters:
      subjectSettingsClause - - to generate condition into
      subject - - current subject
      ft - - filter type to generate condition from
      boundVariables -
      filterType - - filter type name
      permissions - - permissions granted by subject
      bi - - the BindinItem on which the permission is to apply