public static final PersistenceException newInstance(String s, Throwable rootCause) { if (rootCause instanceof DbException) { if (rootCause instanceof com.arsdigita.db.UniqueConstraintException) { return new UniqueConstraintException(s, (DbException)rootCause); } else if (rootCause instanceof com.arsdigita.db.DbNotAvailableException) { return new DbNotAvailableException(s, (DbException)rootCause); } } else if (rootCause instanceof com.redhat.persistence.DuplicateObjectException) { return new UniqueConstraintException (s, (com.redhat.persistence.DuplicateObjectException) rootCause); } else if (rootCause instanceof com.redhat.persistence.FlushException) { return new FlushException (s, (com.redhat.persistence.FlushException) rootCause); } return new PersistenceException(s, rootCause);
public static final PersistenceException newInstance(String s) { return new PersistenceException(s);
    public static final PersistenceException newInstance(String s,                                                         Throwable rootCause) {        if (rootCause instanceof DbException) {            if (rootCause instanceof                com.arsdigita.db.UniqueConstraintException) {                return new UniqueConstraintException(s, (DbException)rootCause);            } else if (rootCause instanceof                       com.arsdigita.db.DbNotAvailableException) {                return new DbNotAvailableException(s, (DbException)rootCause);            }        } else if (rootCause instanceof                   com.redhat.persistence.DuplicateObjectException) {            return new UniqueConstraintException                (s, (com.redhat.persistence.DuplicateObjectException)                 rootCause);        } else if (rootCause instanceof                   com.redhat.persistence.FlushException) {            return new FlushException                (s, (com.redhat.persistence.FlushException) rootCause);        }        return new PersistenceException(s, rootCause);    }