/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.PersistentEntity
 *  org.hibernate.HibernateException
 *  org.hibernate.Session
 *  org.springframework.orm.hibernate5.HibernateCallback
 */
package com.l7tech.server;

import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.server.HibernateEntityManager;
import java.io.Serializable;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.springframework.orm.hibernate5.HibernateCallback;

class ae
implements HibernateCallback<Void> {
    final PersistentEntity val$et;
    final HibernateEntityManager this$0;

    /*
     * Ignored method signature, as it can't be verified against descriptor
     */
    ae(HibernateEntityManager hibernateEntityManager, PersistentEntity persistentEntity) {
        this.this$0 = hibernateEntityManager;
        this.val$et = persistentEntity;
    }

    public Void doInHibernate(Session session) throws HibernateException {
        block3: {
            PersistentEntity persistentEntity;
            block2: {
                persistentEntity = (PersistentEntity)session.get(this.this$0.getImpClass(), (Serializable)this.val$et.getGoid());
                try {
                    if (persistentEntity != null) break block2;
                    this.this$0.a(this.val$et);
                    session.delete((Object)this.val$et);
                    break block3;
                }
                catch (HibernateException hibernateException) {
                    throw ae.a(hibernateException);
                }
            }
            this.this$0.a(persistentEntity);
            session.delete((Object)persistentEntity);
        }
        return null;
    }

    private static HibernateException a(HibernateException hibernateException) {
        return hibernateException;
    }
}

