org.apache.openejb.jee.jpa.unit
Class PersistenceUnit

java.lang.Object
  extended by org.apache.openejb.jee.jpa.unit.PersistenceUnit

public class PersistenceUnit
extends Object

Configuration of a persistence unit.

Java class for anonymous complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType>
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="provider" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="jta-data-source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="non-jta-data-source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="mapping-file" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
         <element name="jar-file" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
         <element name="class" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
         <element name="exclude-unlisted-classes" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
         <element name="properties" minOccurs="0">
           <complexType>
             <complexContent>
               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
                 <sequence>
                   <element name="property" maxOccurs="unbounded" minOccurs="0">
                     <complexType>
                       <complexContent>
                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
                           <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
                           <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
                         </restriction>
                       </complexContent>
                     </complexType>
                   </element>
                 </sequence>
               </restriction>
             </complexContent>
           </complexType>
         </element>
       </sequence>
       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
       <attribute name="transaction-type" type="{http://java.sun.com/xml/ns/persistence}persistence-unit-transaction-type" />
     </restriction>
   </complexContent>
 </complexType>
 


Field Summary
protected  List<String> clazz
           
protected  String description
           
protected  Boolean excludeUnlistedClasses
           
protected  List<String> jarFile
           
protected  String jtaDataSource
           
protected  List<String> mappingFile
           
protected  String name
           
protected  String nonJtaDataSource
           
protected  Properties properties
           
protected  String provider
           
protected  TransactionType transactionType
           
 
Constructor Summary
PersistenceUnit()
           
PersistenceUnit(String unitName)
           
PersistenceUnit(String name, String provider)
           
 
Method Summary
 boolean addClass(Class clazz)
           
 boolean addClass(String s)
           
 List<String> getClazz()
           
 String getDescription()
           
 String getId()
           
 List<String> getJarFile()
           
 String getJtaDataSource()
           
 List<String> getMappingFile()
           
 String getName()
           
 String getNonJtaDataSource()
           
 Properties getProperties()
           
 String getProperty(String key)
           
 String getProperty(String key, String defaultValue)
           
 String getProvider()
           
 TransactionType getTransactionType()
           
 Boolean isExcludeUnlistedClasses()
           
 void setDescription(String value)
           
 void setExcludeUnlistedClasses(Boolean value)
           
 void setId(String id)
           
 void setJtaDataSource(String value)
           
 void setName(String value)
           
 void setNonJtaDataSource(String value)
           
 void setProperties(Properties properties)
           
 Object setProperty(String key, String value)
           
 void setProvider(Class value)
           
 void setProvider(String value)
           
 void setTransactionType(TransactionType value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

protected String description

provider

protected String provider

jtaDataSource

protected String jtaDataSource

nonJtaDataSource

protected String nonJtaDataSource

mappingFile

protected List<String> mappingFile

jarFile

protected List<String> jarFile

clazz

protected List<String> clazz

excludeUnlistedClasses

protected Boolean excludeUnlistedClasses

properties

protected Properties properties

name

protected String name

transactionType

protected TransactionType transactionType
Constructor Detail

PersistenceUnit

public PersistenceUnit(String name,
                       String provider)

PersistenceUnit

public PersistenceUnit()

PersistenceUnit

public PersistenceUnit(String unitName)
Method Detail

getId

public String getId()

setId

public void setId(String id)

getDescription

public String getDescription()

setDescription

public void setDescription(String value)

getProvider

public String getProvider()

setProvider

public void setProvider(String value)

setProvider

public void setProvider(Class value)

getJtaDataSource

public String getJtaDataSource()

setJtaDataSource

public void setJtaDataSource(String value)

getNonJtaDataSource

public String getNonJtaDataSource()

setNonJtaDataSource

public void setNonJtaDataSource(String value)

getMappingFile

public List<String> getMappingFile()

getJarFile

public List<String> getJarFile()

getClazz

public List<String> getClazz()

addClass

public boolean addClass(String s)

addClass

public boolean addClass(Class clazz)

isExcludeUnlistedClasses

public Boolean isExcludeUnlistedClasses()

setExcludeUnlistedClasses

public void setExcludeUnlistedClasses(Boolean value)

getProperties

public Properties getProperties()

getProperty

public String getProperty(String key)

getProperty

public String getProperty(String key,
                          String defaultValue)

setProperty

public Object setProperty(String key,
                          String value)

getName

public String getName()

setName

public void setName(String value)

getTransactionType

public TransactionType getTransactionType()

setTransactionType

public void setTransactionType(TransactionType value)

setProperties

public void setProperties(Properties properties)


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.