org.unitils.orm.jpa.util
Class JpaConfig
java.lang.Object
org.unitils.orm.common.util.OrmConfig
org.unitils.orm.jpa.util.JpaConfig
- All Implemented Interfaces:
- ResourceConfig
public class JpaConfig
- extends OrmConfig
Value object representing a test object's configuration of a JPA EntityManagerFactory
- Author:
- Filip Neven, Tim Ducheyne
JpaConfig
public JpaConfig(String persistenceUnitName,
String configFile,
Method configMethod)
- Creates a new instance
- Parameters:
persistenceUnitName
- The name of the persistence unit, as defined in the persistence config fileconfigFile
- The name of the persistence.xml file. May be null: in this case, we try to find a
persistence.xml file in the default location META-INF/persistence.xmlconfigMethod
- Custom configuration method, null if not available
getPersistenceUnitName
public String getPersistenceUnitName()
- Returns:
- The name of the persistence unit, defined in the persistence config file
hashCode
public int hashCode()
- Overrides:
hashCode
in class OrmConfig
equals
public boolean equals(Object obj)
- Overrides:
equals
in class OrmConfig
Copyright © 2011. All Rights Reserved.