Class Restriction<T extends ObjectFilter>

  • Direct Known Subclasses:
    FullTextRestriction, InOidRestriction, ItemRestriction, LogicalRestriction, OrgRestriction, TypeRestriction

    public abstract class Restriction<T extends ObjectFilter>
    extends Object
    An image of an ObjectFilter, forming a restriction tree. Preserves some state related to the interpretation (translation). Provides functionality related to the translation. As for the state, we maintain (or, more precisely, we are able to determine) the following: - base HQL property path for the restriction - base EntityDefinition for the restriction - chain of translation states that led to the starting HQL property path (if applicable) This is stored in baseHqlEntity. Most restrictions do not change the above properties when propagating them to their children. However, Type and Exists restrictions do. The former changes EntityDefinition, the latter all three. Also, item-related restrictions may, at their own discretion, use an EntityDefinition that points to a subclass of the one provided by the parent restriction. They do that if the item referenced (e.g. location) is not available in the provided entity (e.g. RObject or RFocus or RAbstractRole), but has to be found deeper. There is one known problem in this respect, though: locality attribute. It is present in UserType as well as in OrgType. So, if having query like ObjectType: Equals(locality, 'abc') it might be narrowed as o.localityUser or o.locality. (Maybe there are other attributes like that, I don't know.)
    Author:
    lazyman, mederly