org.unitils.orm.jpa.util
Class JpaConfig

java.lang.Object
  extended by org.unitils.orm.common.util.OrmConfig
      extended by 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

Constructor Summary
JpaConfig(String persistenceUnitName, String configFile, Method configMethod)
          Creates a new instance
 
Method Summary
 boolean equals(Object obj)
           
 String getPersistenceUnitName()
           
 int hashCode()
           
 
Methods inherited from class org.unitils.orm.common.util.OrmConfig
getConfigFiles, getConfigMethod
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 file
configFile - 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.xml
configMethod - Custom configuration method, null if not available
Method Detail

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.