Package org.wicketstuff.javaee
Class EntityManagerFactoryLocator
- java.lang.Object
-
- org.wicketstuff.javaee.EntityManagerFactoryLocator
-
- All Implemented Interfaces:
Serializable
,IProxyTargetLocator
,IClusterable
public class EntityManagerFactoryLocator extends Object implements IProxyTargetLocator
Implementation ofIProxyTargetLocator
to locate Java EE 5 EntityManagerFactory To use this technique in a Wicket Page, just insert a line like
private @PersistenceUnit(unitName="defaultPersistenceContext") EntityManagerFactory emf; The 'unitName' attribute is mandatory, and refers to the name of the persistence unit you have declared in your persistence.xml file- Author:
- Filippo Diotalevi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EntityManagerFactoryLocator(String pUnit)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getPersistenceUnit()
int
hashCode()
Object
locateProxyTarget()
-
-
-
Constructor Detail
-
EntityManagerFactoryLocator
public EntityManagerFactoryLocator(String pUnit)
Constructor- Parameters:
pUnit
- - persistence unit
-
-
Method Detail
-
locateProxyTarget
public Object locateProxyTarget()
- Specified by:
locateProxyTarget
in interfaceIProxyTargetLocator
- See Also:
IProxyTargetLocator.locateProxyTarget()
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
getPersistenceUnit
public String getPersistenceUnit()
-
-