Class JaxbPersistenceImpl.JaxbPersistenceUnitImpl

java.lang.Object
org.hibernate.boot.jaxb.configuration.spi.JaxbPersistenceImpl.JaxbPersistenceUnitImpl
Enclosing class:
JaxbPersistenceImpl

public static class JaxbPersistenceImpl.JaxbPersistenceUnitImpl 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="qualifier" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
         <element name="scope" 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="shared-cache-mode" type="{http://www.hibernate.org/xsd/orm/configuration}persistence-unit-caching-type" minOccurs="0"/>
         <element name="validation-mode" type="{http://www.hibernate.org/xsd/orm/configuration}persistence-unit-validation-mode-type" 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://www.hibernate.org/xsd/orm/configuration}persistence-unit-transaction-type" />
     </restriction>
   </complexContent>
 </complexType>
 
  • Field Details

    • description

      protected String description
      Description of this persistence unit.
    • provider

      protected String provider
      Provider class that supplies EntityManagers for this persistence unit.
    • qualifier

      protected List<String> qualifier
      Qualifier annotation class used for dependency injection.
    • scope

      protected String scope
      Scope annotation class used for dependency injection.
    • jtaDataSource

      protected String jtaDataSource
      The container-specific name of the JTA datasource to use.
    • nonJtaDataSource

      protected String nonJtaDataSource
      The container-specific name of a non-JTA datasource to use.
    • mappingFiles

      protected List<String> mappingFiles
      File containing mapping information. Loaded as a resource by the persistence provider.
    • jarFiles

      protected List<String> jarFiles
      Jar file that is to be scanned for managed classes.
    • classes

      protected List<String> classes
      Managed class to be included in the persistence unit and to scan for annotations. It should be annotated with either @Entity, @Embeddable or @MappedSuperclass.
    • excludeUnlistedClasses

      protected Boolean excludeUnlistedClasses
      When set to true then only listed classes and jars will be scanned for persistent classes, otherwise the enclosing jar or directory will also be scanned. Not applicable to Java SE persistence units.
    • sharedCacheMode

      protected SharedCacheMode sharedCacheMode
      Defines whether caching is enabled for the persistence unit if caching is supported by the persistence provider. When set to ALL, all entities will be cached. When set to NONE, no entities will be cached. When set to ENABLE_SELECTIVE, only entities specified as cacheable will be cached. When set to DISABLE_SELECTIVE, entities specified as not cacheable will not be cached. When not specified or when set to UNSPECIFIED, provider defaults may apply.
    • validationMode

      protected ValidationMode validationMode
      The validation mode to be used for the persistence unit.
    • propertyContainer

      A list of standard and vendor-specific properties and hints.
    • name

      protected String name
      Name used in code to reference this persistence unit.
    • transactionType

      protected PersistenceUnitTransactionType transactionType
      Type of transactions used by EntityManagers from this persistence unit.
  • Constructor Details

    • JaxbPersistenceUnitImpl

      public JaxbPersistenceUnitImpl()
  • Method Details

    • getDescription

      public String getDescription()
      Description of this persistence unit.
      Returns:
      possible object is String
    • setDescription

      public void setDescription(String value)
      Sets the value of the description property.
      Parameters:
      value - allowed object is String
      See Also:
    • getProvider

      public String getProvider()
      Provider class that supplies EntityManagers for this persistence unit.
      Returns:
      possible object is String
    • setProvider

      public void setProvider(String value)
      Sets the value of the provider property.
      Parameters:
      value - allowed object is String
      See Also:
    • getQualifier

      public List<String> getQualifier()
      Qualifier annotation class used for dependency injection. Gets the value of the qualifier property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the qualifier property.

      For example, to add a new item, do as follows:

       getQualifier().add(newItem);
       

      Objects of the following type(s) are allowed in the list String

      Returns:
      The value of the qualifier property.
    • getScope

      public String getScope()
      Scope annotation class used for dependency injection.
      Returns:
      possible object is String
    • setScope

      public void setScope(String value)
      Sets the value of the scope property.
      Parameters:
      value - allowed object is String
      See Also:
    • getJtaDataSource

      public String getJtaDataSource()
      The container-specific name of the JTA datasource to use.
      Returns:
      possible object is String
    • setJtaDataSource

      public void setJtaDataSource(String value)
      Sets the value of the jtaDataSource property.
      Parameters:
      value - allowed object is String
      See Also:
    • getNonJtaDataSource

      public String getNonJtaDataSource()
      The container-specific name of a non-JTA datasource to use.
      Returns:
      possible object is String
    • setNonJtaDataSource

      public void setNonJtaDataSource(String value)
      Sets the value of the nonJtaDataSource property.
      Parameters:
      value - allowed object is String
      See Also:
    • getMappingFiles

      public List<String> getMappingFiles()
      File containing mapping information. Loaded as a resource by the persistence provider. Gets the value of the mappingFiles property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the mappingFiles property.

      For example, to add a new item, do as follows:

       getMappingFiles().add(newItem);
       

      Objects of the following type(s) are allowed in the list String

      Returns:
      The value of the mappingFiles property.
    • getJarFiles

      public List<String> getJarFiles()
      Jar file that is to be scanned for managed classes. Gets the value of the jarFiles property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the jarFiles property.

      For example, to add a new item, do as follows:

       getJarFiles().add(newItem);
       

      Objects of the following type(s) are allowed in the list String

      Returns:
      The value of the jarFiles property.
    • getClasses

      public List<String> getClasses()
      Managed class to be included in the persistence unit and to scan for annotations. It should be annotated with either @Entity, @Embeddable or @MappedSuperclass. Gets the value of the classes property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the classes property.

      For example, to add a new item, do as follows:

       getClasses().add(newItem);
       

      Objects of the following type(s) are allowed in the list String

      Returns:
      The value of the classes property.
    • isExcludeUnlistedClasses

      public Boolean isExcludeUnlistedClasses()
      When set to true then only listed classes and jars will be scanned for persistent classes, otherwise the enclosing jar or directory will also be scanned. Not applicable to Java SE persistence units.
      Returns:
      possible object is Boolean
    • setExcludeUnlistedClasses

      public void setExcludeUnlistedClasses(Boolean value)
      Sets the value of the excludeUnlistedClasses property.
      Parameters:
      value - allowed object is Boolean
      See Also:
    • getSharedCacheMode

      public SharedCacheMode getSharedCacheMode()
      Defines whether caching is enabled for the persistence unit if caching is supported by the persistence provider. When set to ALL, all entities will be cached. When set to NONE, no entities will be cached. When set to ENABLE_SELECTIVE, only entities specified as cacheable will be cached. When set to DISABLE_SELECTIVE, entities specified as not cacheable will not be cached. When not specified or when set to UNSPECIFIED, provider defaults may apply.
      Returns:
      possible object is String
    • setSharedCacheMode

      public void setSharedCacheMode(SharedCacheMode value)
      Sets the value of the sharedCacheMode property.
      Parameters:
      value - allowed object is String
      See Also:
    • getValidationMode

      public ValidationMode getValidationMode()
      The validation mode to be used for the persistence unit.
      Returns:
      possible object is String
    • setValidationMode

      public void setValidationMode(ValidationMode value)
      Sets the value of the validationMode property.
      Parameters:
      value - allowed object is String
      See Also:
    • getPropertyContainer

      A list of standard and vendor-specific properties and hints.
      Returns:
      possible object is JaxbPersistenceImpl.JaxbPersistenceUnitImpl.JaxbPropertiesImpl
    • setPropertyContainer

      public void setPropertyContainer(JaxbPersistenceImpl.JaxbPersistenceUnitImpl.JaxbPropertiesImpl value)
      Sets the value of the propertyContainer property.
      Parameters:
      value - allowed object is JaxbPersistenceImpl.JaxbPersistenceUnitImpl.JaxbPropertiesImpl
      See Also:
    • getName

      public String getName()
      Name used in code to reference this persistence unit.
      Returns:
      possible object is String
    • setName

      public void setName(String value)
      Sets the value of the name property.
      Parameters:
      value - allowed object is String
      See Also:
    • getTransactionType

      public PersistenceUnitTransactionType getTransactionType()
      Type of transactions used by EntityManagers from this persistence unit.
      Returns:
      possible object is String
    • setTransactionType

      public void setTransactionType(PersistenceUnitTransactionType value)
      Sets the value of the transactionType property.
      Parameters:
      value - allowed object is String
      See Also: