*/
public <E, C extends Collection<E>> Predicate isNotMember(Expression<E> elem, Expression<C> collection){
if (((InternalSelection)elem).isFrom()){
((FromImpl)elem).isLeaf = false;
}
ReportQuery subQuery = new ReportQuery();
subQuery.setReferenceClass(((ExpressionImpl)elem).getJavaType());
org.eclipse.persistence.expressions.ExpressionBuilder elemBuilder = new org.eclipse.persistence.expressions.ExpressionBuilder();
org.eclipse.persistence.expressions.Expression collectionExp =((InternalSelection)collection).getCurrentNode();
org.eclipse.persistence.expressions.Expression elemExp =((InternalSelection)elem).getCurrentNode();
subQuery.setExpressionBuilder(elemBuilder);
subQuery.setShouldRetrieveFirstPrimaryKey(true);
subQuery.setSelectionCriteria(elemBuilder.equal(collectionExp).and(collectionExp.equal(elemExp)));
return new CompoundExpressionImpl(metamodel, ((InternalSelection)elem).getCurrentNode().notExists(subQuery), buildList(elem, collection), "isNotMemeber");
}