// 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: spi/src/main/java/org/jipijapa/management/spi/StatisticName.java
// public interface StatisticName {
//     /**
//      * returns the statistic name
//      * @return
//      */
//     String getName();
// }
// 
// Path: spi/src/main/java/org/jipijapa/management/spi/Statistics.java
// public interface Statistics {
// 
// 
//     /**
//      * Get the statistics names
//      *
//      * @return The value
//      */
//     Set<String> getNames();
// 
//     Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryAccess, PathAddress pathAddress);
// 
//     /**
//      * Get the type
//      *
//      * @param name of the statistic
//      * @return The value
//      */
//     Class getType(String name);
// 
//     /**
//      * return true if the specified name represents an operation.
//      *
//      * @param name of the statistic
//      * @return
//      */
//     boolean isOperation(String name);
// 
//     /**
//      * return true if the specified name represents an attribute.
//      *
//      * @param name of the statistic
//      * @return
//      */
//     boolean isAttribute(String name);
// 
//     /**
//      * return true if the specified name represents a writeable attribute
//      * @param name of the statistics
//      * @return
//      */
//     boolean isWriteable(String name);
// 
//     /**
//      * for loading descriptions of statistics/operations
//      *
//      * @return name of resource bundle name
//      */
//     String getResourceBundleName();
// 
//     /**
//      * gets the key prefix for referencing descriptions of statistics/operations
//      *
//      * @return
//      */
//     String getResourceBundleKeyPrefix();
// 
//     /**
//      * Get the value of the statistics
//      *
//      * @param name The name of the statistics
//      * @return The value
//      */
//     Object getValue(String name, EntityManagerFactoryAccess entityManagerFactoryAccess, StatisticName statisticName, PathAddress pathAddress);
// 
//     /**
//      * Set the value of the statistic (isWriteable must return true)
//      * @param name
//      * @param newValue
//      */
//     void setValue(String name, Object newValue, EntityManagerFactoryAccess entityManagerFactoryAccess, StatisticName statisticName, PathAddress pathAddress);
// 
//     /**
//      * get the names of the children statistic levels (if any)
//      * @return set of names
//      */
//     Set<String> getChildrenNames();
// 
//     /**
//      * get the specified children statistics
//      * @param childName name of the statistics to return
//      * @return
//      */
//     Statistics getChild(String childName);
// 
// 
// }


import org.jipijapa.management.spi.StatisticName;
import org.jipijapa.management.spi.Statistics;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;
import javax.persistence.EntityManagerFactory;
import org.jipijapa.management.spi.EntityManagerFactoryAccess;
import org.jipijapa.management.spi.Operation;
import org.jipijapa.management.spi.PathAddress;
/*
 * JBoss, Home of Professional Open Source
 * Copyright 2013, Red Hat Middleware LLC, and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.jboss.as.jpa.hibernate4.management;




/**
 * HibernateAbstractStatistics
 *
 * @author Scott Marlow
 */
public abstract class HibernateAbstractStatistics implements Statistics {

    private static final String RESOURCE_BUNDLE = HibernateAbstractStatistics.class.getPackage().getName() + ".LocalDescriptions";
    private static final String RESOURCE_BUNDLE_KEY_PREFIX = "hibernate";
// 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: spi/src/main/java/org/jipijapa/management/spi/StatisticName.java
// public interface StatisticName {
//     /**
//      * returns the statistic name
//      * @return
//      */
//     String getName();
// }
// 
// Path: spi/src/main/java/org/jipijapa/management/spi/Statistics.java
// public interface Statistics {
// 
// 
//     /**
//      * Get the statistics names
//      *
//      * @return The value
//      */
//     Set<String> getNames();
// 
//     Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryAccess, PathAddress pathAddress);
// 
//     /**
//      * Get the type
//      *
//      * @param name of the statistic
//      * @return The value
//      */
//     Class getType(String name);
// 
//     /**
//      * return true if the specified name represents an operation.
//      *
//      * @param name of the statistic
//      * @return
//      */
//     boolean isOperation(String name);
// 
//     /**
//      * return true if the specified name represents an attribute.
//      *
//      * @param name of the statistic
//      * @return
//      */
//     boolean isAttribute(String name);
// 
//     /**
//      * return true if the specified name represents a writeable attribute
//      * @param name of the statistics
//      * @return
//      */
//     boolean isWriteable(String name);
// 
//     /**
//      * for loading descriptions of statistics/operations
//      *
//      * @return name of resource bundle name
//      */
//     String getResourceBundleName();
// 
//     /**
//      * gets the key prefix for referencing descriptions of statistics/operations
//      *
//      * @return
//      */
//     String getResourceBundleKeyPrefix();
// 
//     /**
//      * Get the value of the statistics
//      *
//      * @param name The name of the statistics
//      * @return The value
//      */
//     Object getValue(String name, EntityManagerFactoryAccess entityManagerFactoryAccess, StatisticName statisticName, PathAddress pathAddress);
// 
//     /**
//      * Set the value of the statistic (isWriteable must return true)
//      * @param name
//      * @param newValue
//      */
//     void setValue(String name, Object newValue, EntityManagerFactoryAccess entityManagerFactoryAccess, StatisticName statisticName, PathAddress pathAddress);
// 
//     /**
//      * get the names of the children statistic levels (if any)
//      * @return set of names
//      */
//     Set<String> getChildrenNames();
// 
//     /**
//      * get the specified children statistics
//      * @param childName name of the statistics to return
//      * @return
//      */
//     Statistics getChild(String childName);
// 
// 
// }


// Path: hibernate4_3/src/main/java/org/jboss/as/jpa/hibernate4/management/HibernateAbstractStatistics.java
import org.jipijapa.management.spi.StatisticName;
import org.jipijapa.management.spi.Statistics;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;
import javax.persistence.EntityManagerFactory;
import org.jipijapa.management.spi.EntityManagerFactoryAccess;
import org.jipijapa.management.spi.Operation;
import org.jipijapa.management.spi.PathAddress;

/*
 * JBoss, Home of Professional Open Source
 * Copyright 2013, Red Hat Middleware LLC, and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.jboss.as.jpa.hibernate4.management;




/**
 * HibernateAbstractStatistics
 *
 * @author Scott Marlow
 */
public abstract class HibernateAbstractStatistics implements Statistics {

    private static final String RESOURCE_BUNDLE = HibernateAbstractStatistics.class.getPackage().getName() + ".LocalDescriptions";
    private static final String RESOURCE_BUNDLE_KEY_PREFIX = "hibernate";
    protected Map<String,Operation> operations = new HashMap<String, Operation>();