org.lazydog.repository.jpa.internal
Class ConnectionFactory

java.lang.Object
  extended by org.lazydog.repository.jpa.internal.ConnectionFactory

public class ConnectionFactory
extends Object

Connection factory.

Author:
Ron Rickard

Nested Class Summary
static class ConnectionFactory.Type
           
 
Method Summary
 Connection getConnection()
          Get the connection.
 Connection getConnection(ConnectionFactory.Type type)
          Get the connection for the type.
static ConnectionFactory newInstance(javax.persistence.EntityManager entityManager)
          Get a new instance of the connection factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnection

public Connection getConnection()
Get the connection.

Returns:
the connection.

getConnection

public Connection getConnection(ConnectionFactory.Type type)
Get the connection for the type.

Parameters:
type - the type.
Returns:
the connection.

newInstance

public static ConnectionFactory newInstance(javax.persistence.EntityManager entityManager)
Get a new instance of the connection factory.

Parameters:
entityManager - the entity manager.
Returns:
a new instance of the connection factory.


Copyright © 2013 Lazydog. All Rights Reserved.