org.ops4j.pax.service.jpa
Class PersistenceBootstrap

java.lang.Object
  extended by org.ops4j.pax.service.jpa.PersistenceBootstrap

public final class PersistenceBootstrap
extends java.lang.Object

Since:
0.1.0
Author:
Edward Yakop

Nested Class Summary
 class PersistenceBootstrap.ConfigurationListener
           
 
Constructor Summary
PersistenceBootstrap(org.osgi.framework.BundleContext aContext, java.lang.String aPersistenceUnitName, java.lang.String aServicePID)
           
 
Method Summary
 void addRequiredTablesToDB()
          Convinient method to add required tables, columns, etcs to database.
 void dispose()
           
 javax.persistence.EntityManagerFactory getEntityManagerFactory()
           
 java.lang.Object getOveridingJPAProperty(java.lang.String aKey)
           
 java.util.Set<java.lang.String> getOveridingJPAPropertyKeys()
           
 java.util.Set<java.lang.String> getOveridingKeys()
           
 void setOveridingJPAProperty(java.lang.String aKey, java.lang.Object aValue)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceBootstrap

public PersistenceBootstrap(org.osgi.framework.BundleContext aContext,
                            java.lang.String aPersistenceUnitName,
                            java.lang.String aServicePID)
                     throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getOveridingKeys

public final java.util.Set<java.lang.String> getOveridingKeys()

setOveridingJPAProperty

public final void setOveridingJPAProperty(java.lang.String aKey,
                                          java.lang.Object aValue)

getOveridingJPAProperty

public final java.lang.Object getOveridingJPAProperty(java.lang.String aKey)
                                               throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getOveridingJPAPropertyKeys

public final java.util.Set<java.lang.String> getOveridingJPAPropertyKeys()

getEntityManagerFactory

public final javax.persistence.EntityManagerFactory getEntityManagerFactory()

start

public final void start()
                 throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

dispose

public final void dispose()

addRequiredTablesToDB

public final void addRequiredTablesToDB()
                                 throws java.sql.SQLException
Convinient method to add required tables, columns, etcs to database. This method does not drop any existing tables, columns, etcs. Only use this during testing. Invoke this after start.

Throws:
java.sql.SQLException - Thrown if refresh failed.
Since:
0.1.0


Copyright © 2008. All Rights Reserved.