play.db.jpa
Class JPAPlugin

java.lang.Object
  extended by play.Plugin
      extended by play.db.jpa.JPAPlugin
All Implemented Interfaces:
play.api.Plugin, scala.ScalaObject

public class JPAPlugin
extends Plugin

A Play plugin that automatically manages JPA configuration.


Constructor Summary
JPAPlugin(Application application)
           
 
Method Summary
 javax.persistence.EntityManager em(java.lang.String key)
           
 boolean enabled()
          Is this plugin enabled.
 void onStart()
          Reads the configuration file and initialises required JPA EntityManagerFactories.
 void onStop()
          Called when the application stops.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPAPlugin

public JPAPlugin(Application application)
Method Detail

onStart

public void onStart()
Reads the configuration file and initialises required JPA EntityManagerFactories.

Specified by:
onStart in interface play.api.Plugin
Overrides:
onStart in class Plugin

enabled

public boolean enabled()
Description copied from class: Plugin
Is this plugin enabled.

Specified by:
enabled in interface play.api.Plugin
Overrides:
enabled in class Plugin

onStop

public void onStop()
Description copied from class: Plugin
Called when the application stops.

Specified by:
onStop in interface play.api.Plugin
Overrides:
onStop in class Plugin

em

public javax.persistence.EntityManager em(java.lang.String key)