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

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

public class PersistenceUnit
extends java.lang.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  java.util.List<java.lang.String> clazz
           
protected  java.lang.String description
           
protected  java.lang.Boolean excludeUnlistedClasses
           
protected  java.util.List<java.lang.String> jarFile
           
protected  java.lang.String jtaDataSource
           
protected  java.util.List<java.lang.String> mappingFile
           
protected  java.lang.String name
           
protected  java.lang.String nonJtaDataSource
           
protected  java.util.Properties properties
           
protected  java.lang.String provider
           
protected  TransactionType transactionType
           
 
Constructor Summary
PersistenceUnit()
           
PersistenceUnit(java.lang.String unitName)
           
PersistenceUnit(java.lang.String name, java.lang.String provider)
           
 
Method Summary
 boolean addClass(java.lang.Class clazz)
           
 boolean addClass(java.lang.String s)
           
 java.util.List<java.lang.String> getClazz()
           
 java.lang.String getDescription()
           
 java.lang.String getId()
           
 java.util.List<java.lang.String> getJarFile()
           
 java.lang.String getJtaDataSource()
           
 java.util.List<java.lang.String> getMappingFile()
           
 java.lang.String getName()
           
 java.lang.String getNonJtaDataSource()
           
 java.util.Properties getProperties()
           
 java.lang.String getProperty(java.lang.String key)
           
 java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
           
 java.lang.String getProvider()
           
 TransactionType getTransactionType()
           
 java.lang.Boolean isExcludeUnlistedClasses()
           
 void setDescription(java.lang.String value)
           
 void setExcludeUnlistedClasses(java.lang.Boolean value)
           
 void setId(java.lang.String id)
           
 void setJtaDataSource(java.lang.String value)
           
 void setName(java.lang.String value)
           
 void setNonJtaDataSource(java.lang.String value)
           
 void setProperties(java.util.Properties properties)
           
 java.lang.Object setProperty(java.lang.String key, java.lang.String value)
           
 void setProvider(java.lang.Class value)
           
 void setProvider(java.lang.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 java.lang.String description

provider

protected java.lang.String provider

jtaDataSource

protected java.lang.String jtaDataSource

nonJtaDataSource

protected java.lang.String nonJtaDataSource

mappingFile

protected java.util.List<java.lang.String> mappingFile

jarFile

protected java.util.List<java.lang.String> jarFile

clazz

protected java.util.List<java.lang.String> clazz

excludeUnlistedClasses

protected java.lang.Boolean excludeUnlistedClasses

properties

protected java.util.Properties properties

name

protected java.lang.String name

transactionType

protected TransactionType transactionType
Constructor Detail

PersistenceUnit

public PersistenceUnit(java.lang.String name,
                       java.lang.String provider)

PersistenceUnit

public PersistenceUnit()

PersistenceUnit

public PersistenceUnit(java.lang.String unitName)
Method Detail

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String value)

getProvider

public java.lang.String getProvider()

setProvider

public void setProvider(java.lang.String value)

setProvider

public void setProvider(java.lang.Class value)

getJtaDataSource

public java.lang.String getJtaDataSource()

setJtaDataSource

public void setJtaDataSource(java.lang.String value)

getNonJtaDataSource

public java.lang.String getNonJtaDataSource()

setNonJtaDataSource

public void setNonJtaDataSource(java.lang.String value)

getMappingFile

public java.util.List<java.lang.String> getMappingFile()

getJarFile

public java.util.List<java.lang.String> getJarFile()

getClazz

public java.util.List<java.lang.String> getClazz()

addClass

public boolean addClass(java.lang.String s)

addClass

public boolean addClass(java.lang.Class clazz)

isExcludeUnlistedClasses

public java.lang.Boolean isExcludeUnlistedClasses()

setExcludeUnlistedClasses

public void setExcludeUnlistedClasses(java.lang.Boolean value)

getProperties

public java.util.Properties getProperties()

getProperty

public java.lang.String getProperty(java.lang.String key)

getProperty

public java.lang.String getProperty(java.lang.String key,
                                    java.lang.String defaultValue)

setProperty

public java.lang.Object setProperty(java.lang.String key,
                                    java.lang.String value)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String value)

getTransactionType

public TransactionType getTransactionType()

setTransactionType

public void setTransactionType(TransactionType value)

setProperties

public void setProperties(java.util.Properties properties)


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