if(entity().restrictingQualifier() != null) { NSArray restrict = entity().restrictingQualifier().allQualifierKeys().allObjects();
if(entity.restrictingQualifier() != null) { NSArray restrict = entity.restrictingQualifier().allQualifierKeys().allObjects();
    public EOFetchSpecification primaryKeyFetchSpecificationForEntity(EOEditingContext ec, EOQualifier eoqualifier, NSArray sortOrderings, NSArray additionalKeys) {        String entityName = entityName();        EOFetchSpecification fs = new EOFetchSpecification(entityName, eoqualifier, sortOrderings);        fs.setFetchesRawRows(true);        NSMutableArray keys = new NSMutableArray(entity().primaryKeyAttributeNames());        if(additionalKeys != null) {            keys.addObjectsFromArray(additionalKeys);        }        if(entity().restrictingQualifier() != null) {            NSArray restrict = entity().restrictingQualifier().allQualifierKeys().allObjects();            keys.addObjectsFromArray(restrict);        }        if(entity().isAbstractEntity()) {            NSArray restrict = (NSArray)entity().subEntities().valueForKeyPath("restrictingQualifier.allQualifierKeys.allObjects.@flatten.@unique");            keys.addObjectsFromArray(restrict);        }        fs.setRawRowKeyPaths(keys);        return fs;    }