All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tvd12.ezydata.jpa.EzySimpleJpaDatabaseContext Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
package com.tvd12.ezydata.jpa;

import com.tvd12.ezydata.database.EzySimpleDatabaseContext;
import lombok.Setter;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;

public class EzySimpleJpaDatabaseContext
    extends EzySimpleDatabaseContext
    implements EzyJpaDatabaseContext {

    @Setter
    protected EntityManagerFactory entityManagerFactory;

    @Override
    public EntityManager createEntityManager() {
        return entityManagerFactory.createEntityManager();
    }

    @Override
    public void close() {
        entityManagerFactory.close();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy