public static EOQualifier replaceQualifierWithQualifier(EOQualifier qualifier, EOQualifier searchFor, EOQualifier replaceWith) {
if (qualifier == null || searchFor == null) {
throw new IllegalStateException("The params qualifier and searchFor must not be null!");
}
if (replaceWith == null) {
replaceWith = new ERXTrueQualifier();
}
EOQualifier result = qualifier;
if (qualifier.equals(searchFor)) {
result = replaceWith;
} else if (qualifier instanceof EOAndQualifier) {