// append Entity qualifiers, taking inheritance into account
ObjEntity entity = getObjEntity();
if (entity != null) {
EntityInheritanceTree tree = queryAssembler
.getEntityResolver()
.lookupInheritanceTree(entity);
Expression entityQualifier = (tree != null) ? tree
.qualifierForEntityAndSubclasses() : entity.getDeclaredQualifier();
if (entityQualifier != null) {
qualifier = (qualifier != null)
? qualifier.andExp(entityQualifier)
: entityQualifier;