Example usage for org.hibernate.persister.entity EntityPersister getMappedClass

List of usage examples for org.hibernate.persister.entity EntityPersister getMappedClass

Introduction

In this page you can find the example usage for org.hibernate.persister.entity EntityPersister getMappedClass.

Prototype

Class getMappedClass();

Source Link

Document

The persistent class, or null

Usage

From source file:es.logongas.ix3.dao.impl.rules.EventListenerImplRuleEngine.java

License:Apache License

Object getOriginalEntity(Object[] oldState, EntityPersister entityPersister) {
    try {/*from w w  w .ja  v a 2s  .  com*/
        Object originalEntity = entityPersister.getMappedClass().newInstance();
        stateToEntity(oldState, originalEntity, entityPersister);

        return originalEntity;
    } catch (InstantiationException ex) {
        throw new RuntimeException(ex);
    } catch (IllegalAccessException ex) {
        throw new RuntimeException(ex);
    }
}