// Path: spi/src/main/java/org/jipijapa/management/spi/EntityManagerFactoryAccess.java
// public interface EntityManagerFactoryAccess {
//     /**
//      * returns the entity manager factory that statistics should be obtained for.
//      *
//      * @throws IllegalStateException if scopedPersistenceUnitName is not found
//      *
//      * @param scopedPersistenceUnitName is persistence unit name scoped to the current platform
//      *
//      * @return EntityManagerFactory
//      */
//     EntityManagerFactory entityManagerFactory(String scopedPersistenceUnitName) throws IllegalStateException;
// 
// }
// 
// Path: spi/src/main/java/org/jipijapa/management/spi/Operation.java
// public interface Operation {
// 
//     /**
//      * Invoke operation
//      * @param args will be passed to invoked operation
//      * @return
//      */
//     Object invoke(Object... args);
// }
// 
// Path: spi/src/main/java/org/jipijapa/management/spi/PathAddress.java
// public interface PathAddress {
// 
//     int size();
// 
//     String getValue(String name);
//     String getValue(int index);
// }


import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import javax.persistence.EntityManagerFactory;
import org.hibernate.SessionFactory;
import org.hibernate.ejb.HibernateEntityManagerFactory;
import org.jipijapa.management.spi.EntityManagerFactoryAccess;
import org.jipijapa.management.spi.Operation;
import org.jipijapa.management.spi.PathAddress;
        }
        return null;
    }

    private Operation entityDeleteCount = new Operation() {
        @Override
        public Object invoke(Object... args) {
            org.hibernate.stat.EntityStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
            return Long.valueOf(statistics != null ? statistics.getDeleteCount() : 0);
        }
    };

    private Operation entityFetchCount = new Operation() {
        @Override
        public Object invoke(Object... args) {
            org.hibernate.stat.EntityStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
            return Long.valueOf(statistics != null ? statistics.getFetchCount() : 0);
        }
    };

    private Operation entityInsertCount = new Operation() {
        @Override
        public Object invoke(Object... args) {
            org.hibernate.stat.EntityStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
            return Long.valueOf(statistics != null ? statistics.getInsertCount() : 0);
        }
    };

    private Operation entityLoadCount = new Operation() {
        @Override
// Path: spi/src/main/java/org/jipijapa/management/spi/EntityManagerFactoryAccess.java
// public interface EntityManagerFactoryAccess {
//     /**
//      * returns the entity manager factory that statistics should be obtained for.
//      *
//      * @throws IllegalStateException if scopedPersistenceUnitName is not found
//      *
//      * @param scopedPersistenceUnitName is persistence unit name scoped to the current platform
//      *
//      * @return EntityManagerFactory
//      */
//     EntityManagerFactory entityManagerFactory(String scopedPersistenceUnitName) throws IllegalStateException;
// 
// }
// 
// Path: spi/src/main/java/org/jipijapa/management/spi/Operation.java
// public interface Operation {
// 
//     /**
//      * Invoke operation
//      * @param args will be passed to invoked operation
//      * @return
//      */
//     Object invoke(Object... args);
// }
// 
// Path: spi/src/main/java/org/jipijapa/management/spi/PathAddress.java
// public interface PathAddress {
// 
//     int size();
// 
//     String getValue(String name);
//     String getValue(int index);
// }


// Path: hibernate4_1/src/main/java/org/jboss/as/jpa/hibernate4/management/HibernateEntityStatistics.java
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import javax.persistence.EntityManagerFactory;
import org.hibernate.SessionFactory;
import org.hibernate.ejb.HibernateEntityManagerFactory;
import org.jipijapa.management.spi.EntityManagerFactoryAccess;
import org.jipijapa.management.spi.Operation;
import org.jipijapa.management.spi.PathAddress;

        }
        return null;
    }

    private Operation entityDeleteCount = new Operation() {
        @Override
        public Object invoke(Object... args) {
            org.hibernate.stat.EntityStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
            return Long.valueOf(statistics != null ? statistics.getDeleteCount() : 0);
        }
    };

    private Operation entityFetchCount = new Operation() {
        @Override
        public Object invoke(Object... args) {
            org.hibernate.stat.EntityStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
            return Long.valueOf(statistics != null ? statistics.getFetchCount() : 0);
        }
    };

    private Operation entityInsertCount = new Operation() {
        @Override
        public Object invoke(Object... args) {
            org.hibernate.stat.EntityStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
            return Long.valueOf(statistics != null ? statistics.getInsertCount() : 0);
        }
    };

    private Operation entityLoadCount = new Operation() {
        @Override
        public Object invoke(Object... args) {