/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.UpdateException
 *  com.l7tech.util.Functions$UnaryVoid
 *  org.hibernate.HibernateException
 *  org.hibernate.LockMode
 *  org.hibernate.Session
 *  org.springframework.orm.hibernate5.HibernateCallback
 */
package com.l7tech.server.security.keystore;

import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.server.security.keystore.KeystoreFile;
import com.l7tech.server.security.keystore.KeystoreFileManagerImpl;
import com.l7tech.util.Functions;
import java.io.Serializable;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
import org.hibernate.Session;
import org.springframework.orm.hibernate5.HibernateCallback;

class e
implements HibernateCallback<KeystoreFile> {
    final Goid val$id;
    final Functions.UnaryVoid val$mutator;
    final KeystoreFileManagerImpl this$0;

    e(KeystoreFileManagerImpl keystoreFileManagerImpl, Goid goid, Functions.UnaryVoid unaryVoid) {
        this.this$0 = keystoreFileManagerImpl;
        this.val$id = goid;
        this.val$mutator = unaryVoid;
    }

    public KeystoreFile doInHibernate(Session session) throws HibernateException {
        try {
            KeystoreFile keystoreFile = (KeystoreFile)((Object)session.load(KeystoreFile.class, (Serializable)this.val$id, LockMode.UPGRADE));
            this.val$mutator.call((Object)keystoreFile);
            this.this$0.update(keystoreFile);
            return keystoreFile;
        }
        catch (UpdateException updateException) {
            throw new HibernateException((Throwable)updateException);
        }
    }
}

