if (!Hibernate.isInitialized(obj)) { throw new IllegalStateException( "If the return object is not initialized then we can't send it.");
if (null != obj) { if (obj instanceof OMEModel) { daoUtils.clean((OMEModel) obj); } else if (obj instanceof Set) { daoUtils.clean((Set) obj); } else if (obj instanceof HashMap) { daoUtils.clean(((Map) obj).keySet()); daoUtils.clean(new HashSet(((Map) obj).values())); } else { String msg = "Instances of " + obj.getClass().getName() + " not supported."; throw new IllegalArgumentException(msg); }
    Object clean(Object obj) {        if (!Hibernate.isInitialized(obj)) {            throw new IllegalStateException(                    "If the return object is not initialized then we can't send it.");        }        Set done = new HashSet();        hessianClean(obj, done);        return obj;    }