Example usage for org.hibernate.engine.spi SessionFactoryImplementor getAllClassMetadata

List of usage examples for org.hibernate.engine.spi SessionFactoryImplementor getAllClassMetadata

Introduction

In this page you can find the example usage for org.hibernate.engine.spi SessionFactoryImplementor getAllClassMetadata.

Prototype

@Deprecated
Map<String, ClassMetadata> getAllClassMetadata();

Source Link

Document

Retrieve the ClassMetadata for all mapped entities.

Usage

From source file:org.n52.series.db.DataModelUtil.java

License:Open Source License

public static boolean isEntitySupported(Class<?> clazz, Criteria criteria) {
    SessionFactoryImplementor factory = extractSessionFactory(criteria);

    if (factory != null) {
        return factory.getAllClassMetadata().keySet().contains(clazz.getName());
    }/*from w  ww  .j  a  v a  2  s . com*/
    return false;
}