cuba.wired.jpa
Class PersistenceUnitDesc

java.lang.Object
  extended by cuba.wired.AbstractDescriptor
      extended by cuba.wired.ResourceFactoryDesc
          extended by cuba.wired.jpa.PersistenceUnitDesc
All Implemented Interfaces:
javax.persistence.spi.PersistenceUnitInfo

public class PersistenceUnitDesc
extends ResourceFactoryDesc
implements javax.persistence.spi.PersistenceUnitInfo


Field Summary
 
Fields inherited from class cuba.wired.AbstractDescriptor
globalName
 
Constructor Summary
PersistenceUnitDesc(java.lang.String globalName)
           
 
Method Summary
 void addJarFileURL(java.net.URL jarURL)
           
 void addManagedClass(java.lang.String entityClass)
           
 void addMappingFile(java.lang.String mappingFile)
           
 void addProperty(java.lang.String key, java.lang.String value)
           
 void addTransformer(javax.persistence.spi.ClassTransformer transformer)
          PersistenceUnitInfo
 java.lang.String checkImplements(java.lang.Class interfaze, boolean internal, boolean exact)
          Checks wether the component, described by this descriptor provides the passed interface
 boolean excludeUnlistedClasses()
           
 java.lang.ClassLoader getClassLoader()
           
 java.util.List<java.net.URL> getJarFileUrls()
           
 javax.sql.DataSource getJtaDataSource()
           
 java.lang.String getJtaDataSourceName()
           
 java.util.List<java.lang.String> getManagedClassNames()
           
 java.util.List<java.lang.String> getMappingFileNames()
           
 java.lang.ClassLoader getNewTempClassLoader()
           
 javax.sql.DataSource getNonJtaDataSource()
           
 java.lang.String getPersistenceProviderClassName()
           
 java.lang.String getPersistenceUnitName()
           
 java.net.URL getPersistenceUnitRootUrl()
           
 java.util.Properties getProperties()
           
 javax.persistence.spi.PersistenceUnitTransactionType getTransactionType()
           
 void setExcludeUnlistedClasses(boolean excludeUnlistedClasses)
           
 void setJarFileUrls(java.util.List<java.net.URL> jarFileUrls)
           
 void setJtaDataSource(javax.sql.DataSource jtaDataSource)
           
 void setJtaDataSourceName(java.lang.String jtaDataSourceName)
           
 void setManagedClasses(java.util.List<java.lang.String> managedClasses)
           
 void setMappingFileNames(java.util.List<java.lang.String> mappingFileNames)
           
 void setPersistenceProviderClassName(java.lang.String persistenceProviderClassName)
           
 void setRootUrl(java.net.URL rootUrl)
           
 void setTransactionType(javax.persistence.spi.PersistenceUnitTransactionType transactionType)
           
 
Methods inherited from class cuba.wired.AbstractDescriptor
getGlobalName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceUnitDesc

public PersistenceUnitDesc(java.lang.String globalName)
Method Detail

checkImplements

public java.lang.String checkImplements(java.lang.Class interfaze,
                                        boolean internal,
                                        boolean exact)
Description copied from class: AbstractDescriptor
Checks wether the component, described by this descriptor provides the passed interface

Specified by:
checkImplements in class AbstractDescriptor
Parameters:
interfaze - The required interface
internal - true when looking for an internal interface
exact - true when looking for an exact match, otherwise also a derived interface would be accepted.
Returns:
null if the components matches. Otherwise, the name of the component's interface, supposed to be used in an error message.

setExcludeUnlistedClasses

public void setExcludeUnlistedClasses(boolean excludeUnlistedClasses)

setPersistenceProviderClassName

public void setPersistenceProviderClassName(java.lang.String persistenceProviderClassName)

setRootUrl

public void setRootUrl(java.net.URL rootUrl)

setTransactionType

public void setTransactionType(javax.persistence.spi.PersistenceUnitTransactionType transactionType)

setJtaDataSourceName

public void setJtaDataSourceName(java.lang.String jtaDataSourceName)

addManagedClass

public void addManagedClass(java.lang.String entityClass)

addJarFileURL

public void addJarFileURL(java.net.URL jarURL)

addMappingFile

public void addMappingFile(java.lang.String mappingFile)

addProperty

public void addProperty(java.lang.String key,
                        java.lang.String value)

setJtaDataSource

public void setJtaDataSource(javax.sql.DataSource jtaDataSource)

getJtaDataSourceName

public java.lang.String getJtaDataSourceName()

setJarFileUrls

public void setJarFileUrls(java.util.List<java.net.URL> jarFileUrls)

setManagedClasses

public void setManagedClasses(java.util.List<java.lang.String> managedClasses)

setMappingFileNames

public void setMappingFileNames(java.util.List<java.lang.String> mappingFileNames)

addTransformer

public void addTransformer(javax.persistence.spi.ClassTransformer transformer)
PersistenceUnitInfo

Specified by:
addTransformer in interface javax.persistence.spi.PersistenceUnitInfo

excludeUnlistedClasses

public boolean excludeUnlistedClasses()
Specified by:
excludeUnlistedClasses in interface javax.persistence.spi.PersistenceUnitInfo

getClassLoader

public java.lang.ClassLoader getClassLoader()
Specified by:
getClassLoader in interface javax.persistence.spi.PersistenceUnitInfo

getJarFileUrls

public java.util.List<java.net.URL> getJarFileUrls()
Specified by:
getJarFileUrls in interface javax.persistence.spi.PersistenceUnitInfo

getJtaDataSource

public javax.sql.DataSource getJtaDataSource()
Specified by:
getJtaDataSource in interface javax.persistence.spi.PersistenceUnitInfo

getManagedClassNames

public java.util.List<java.lang.String> getManagedClassNames()
Specified by:
getManagedClassNames in interface javax.persistence.spi.PersistenceUnitInfo

getMappingFileNames

public java.util.List<java.lang.String> getMappingFileNames()
Specified by:
getMappingFileNames in interface javax.persistence.spi.PersistenceUnitInfo

getNewTempClassLoader

public java.lang.ClassLoader getNewTempClassLoader()
Specified by:
getNewTempClassLoader in interface javax.persistence.spi.PersistenceUnitInfo

getNonJtaDataSource

public javax.sql.DataSource getNonJtaDataSource()
Specified by:
getNonJtaDataSource in interface javax.persistence.spi.PersistenceUnitInfo

getPersistenceProviderClassName

public java.lang.String getPersistenceProviderClassName()
Specified by:
getPersistenceProviderClassName in interface javax.persistence.spi.PersistenceUnitInfo

getPersistenceUnitName

public java.lang.String getPersistenceUnitName()
Specified by:
getPersistenceUnitName in interface javax.persistence.spi.PersistenceUnitInfo

getPersistenceUnitRootUrl

public java.net.URL getPersistenceUnitRootUrl()
Specified by:
getPersistenceUnitRootUrl in interface javax.persistence.spi.PersistenceUnitInfo

getProperties

public java.util.Properties getProperties()
Specified by:
getProperties in interface javax.persistence.spi.PersistenceUnitInfo

getTransactionType

public javax.persistence.spi.PersistenceUnitTransactionType getTransactionType()
Specified by:
getTransactionType in interface javax.persistence.spi.PersistenceUnitInfo