mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-21 18:45:09 +00:00
METAGEN-42 Updated persistence_2_0.xsd
This commit is contained in:
parent
cfba25db99
commit
b3a2c67317
32
tooling/metamodel-generator/.gitignore
vendored
Normal file
32
tooling/metamodel-generator/.gitignore
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# Typically *NIX text editors, by default, append '~' to files on saving to make backups
|
||||
*~
|
||||
|
||||
# Gradle work directory
|
||||
.gradle
|
||||
buildSrc/.gradle
|
||||
|
||||
# Build output directies
|
||||
/target
|
||||
*/target
|
||||
/build
|
||||
*/build
|
||||
|
||||
# IntelliJ specific files/directories
|
||||
/out
|
||||
.idea
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iml
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Eclipse specific files/directories
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
|
||||
# NetBeans specific files/directories
|
||||
.nbattrs
|
||||
|
||||
# Miscellaneous
|
||||
*.log
|
||||
.clover
|
@ -1,33 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- persistence.xml schema -->
|
||||
<?xml version="1.0" encoding="UTF-8"?> <!-- persistence.xml schema -->
|
||||
<xsd:schema targetNamespace="http://java.sun.com/xml/ns/persistence"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:persistence="http://java.sun.com/xml/ns/persistence"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.0">
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:persistence="http://java.sun.com/xml/ns/persistence"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
@(#)persistence_2_0.xsd 1.0 August 27 2008
|
||||
@(#)persistence_2_0.xsd 1.0 October 1 2009
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This is the XML Schema for the persistence configuration file.
|
||||
The file must be named "META-INF/persistence.xml" in the
|
||||
persistence archive.
|
||||
Persistence configuration files must indicate
|
||||
the persistence schema by using the persistence namespace:
|
||||
This is the XML Schema for the persistence configuration file. The file must be named "META-INF/persistence.xml" in the persistence archive.
|
||||
Persistence configuration files must indicate the persistence schema by using the persistence namespace:
|
||||
http://java.sun.com/xml/ns/persistence
|
||||
and indicate the version of the schema by
|
||||
using the version element as shown below:
|
||||
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
|
||||
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
|
||||
version="2.0">
|
||||
...
|
||||
</persistence>
|
||||
and indicate the version of the schema by using the version element as shown below:
|
||||
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
|
||||
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
|
||||
... </persistence>
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType name="versionType">
|
||||
@ -40,17 +31,16 @@ version="2.0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="persistence-unit"
|
||||
minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:element name="persistence-unit" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:complexType>
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Configuration of a persistence unit.
|
||||
<xsd:documentation>
|
||||
Configuration of a persistence unit.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="description" type="xsd:string"
|
||||
minOccurs="0">
|
||||
<xsd:element name="description" type="xsd:string" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Description of this persistence unit.
|
||||
@ -58,18 +48,15 @@ version="2.0">
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="provider" type="xsd:string"
|
||||
minOccurs="0">
|
||||
<xsd:element name="provider" type="xsd:string" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Provider class that supplies EntityManagers for this
|
||||
persistence unit.
|
||||
Provider class that supplies EntityManagers for this persistence unit.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="jta-data-source" type="xsd:string"
|
||||
minOccurs="0">
|
||||
<xsd:element name="jta-data-source" type="xsd:string" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The container-specific name of the JTA datasource to use.
|
||||
@ -77,8 +64,7 @@ version="2.0">
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="non-jta-data-source" type="xsd:string"
|
||||
minOccurs="0">
|
||||
<xsd:element name="non-jta-data-source" type="xsd:string" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The container-specific name of a non-JTA datasource to use.
|
||||
@ -86,71 +72,70 @@ version="2.0">
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="mapping-file" type="xsd:string"
|
||||
minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="mapping-file" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>File containing mapping information. Loaded as a resource
|
||||
by the persistence provider.
|
||||
<xsd:documentation>
|
||||
File containing mapping information. Loaded as a resource by the persistence
|
||||
provider.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="jar-file" type="xsd:string"
|
||||
minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="jar-file" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Jar file that should be scanned for entities.
|
||||
Not applicable to Java SE persistence units.
|
||||
Jar file that is to be scanned for managed classes.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="class" type="xsd:string"
|
||||
minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="class" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Class to scan for annotations. It should be annotated
|
||||
with either @Entity, @Embeddable or @MappedSuperclass.
|
||||
Managed class to be included in the persistence unit and to scan for
|
||||
annotations. It should be annotated with either @Entity, @Embeddable or
|
||||
@MappedSuperclass.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="exclude-unlisted-classes" type="xsd:boolean"
|
||||
default="false" minOccurs="0">
|
||||
<xsd:element name="exclude-unlisted-classes"
|
||||
type="xsd:boolean"
|
||||
default="true"
|
||||
minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
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.
|
||||
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.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element name="caching"
|
||||
type="persistence:persistence-unit-caching-type"
|
||||
minOccurs="0">
|
||||
<xsd:element name="shared-cache-mode" type="persistence:persistence-unit-caching-type"
|
||||
minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
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 toDISABLE_SELECTIVE, entities specified as not cacheable
|
||||
will not be cached.
|
||||
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
|
||||
JSR-317 Final Release
|
||||
323 11/10/09
|
||||
Sun Microsystems, Inc.
|
||||
Entity Packaging
|
||||
Java Persistence 2.0, Final Release persistence.xml Schema
|
||||
DISABLE_SELECTIVE, entities specified as not cacheable will not be cached. When
|
||||
not specified or when set to UNSPECIFIED, provider defaults may apply.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:element
|
||||
name="validation-mode"
|
||||
type="persistence:persistence-unit-validation-mode-type"
|
||||
minOccurs="0">
|
||||
<xsd:element name="validation-mode" type="persistence:persistence-unit-validation-mode-type"
|
||||
minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Specifies the validation mode to be used for the
|
||||
persistence unit.
|
||||
<xsd:documentation>The validation mode to be used for the persistence unit.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
@ -158,23 +143,19 @@ version="2.0">
|
||||
<xsd:element name="properties" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A list of vendor-specific properties.
|
||||
A list of standard and vendor-specific properties and hints.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="property"
|
||||
minOccurs="0" maxOccurs="unbounded">
|
||||
minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A name-value pair.
|
||||
</xsd:documentation>
|
||||
<xsd:documentation>A name-value pair.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="name" type="xsd:string"
|
||||
use="required"/>
|
||||
<xsd:attribute name="value" type="xsd:string"
|
||||
use="required"/>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="value" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
@ -184,17 +165,16 @@ version="2.0">
|
||||
<!-- **************************************************** -->
|
||||
<xsd:attribute name="name" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Name used in code to reference this persistence unit.
|
||||
<xsd:documentation>Name used in code to reference this persistence unit.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation></xsd:attribute>
|
||||
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:attribute name="transaction-type"
|
||||
type="persistence:persistence-unit-transaction-type">
|
||||
<xsd:attribute name="transaction-type" type="persistence:persistence-unit-transaction-type">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Type of transactions used by EntityManagers from this
|
||||
persistence unit.
|
||||
Type of transactions used by EntityManagers from this persistence unit.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
@ -202,14 +182,13 @@ version="2.0">
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="version" type="persistence:versionType"
|
||||
fixed="2.0" use="required"/>
|
||||
fixed="2.0" use="required"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<!-- **************************************************** -->
|
||||
<xsd:simpleType name="persistence-unit-transaction-type">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
public enum TransactionType { JTA, RESOURCE_LOCAL };
|
||||
<xsd:documentation>public enum PersistenceUnitTransactionType {JTA, RESOURCE_LOCAL};
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:token">
|
||||
@ -221,8 +200,7 @@ version="2.0">
|
||||
<xsd:simpleType name="persistence-unit-caching-type">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
public enum CachingType { ALL, NONE, ENABLE_SELECTIVE,
|
||||
DISABLE_SELECTIVE};
|
||||
public enum SharedCacheMode { ALL, NONE, ENABLE_SELECTIVE, DISABLE_SELECTIVE, UNSPECIFIED};
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:token">
|
||||
@ -230,8 +208,10 @@ version="2.0">
|
||||
<xsd:enumeration value="NONE"/>
|
||||
<xsd:enumeration value="ENABLE_SELECTIVE"/>
|
||||
<xsd:enumeration value="DISABLE_SELECTIVE"/>
|
||||
<xsd:enumeration value="UNSPECIFIED"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<!-- **************************************************** -->
|
||||
<xsd:simpleType name="persistence-unit-validation-mode-type">
|
||||
<xsd:annotation>
|
||||
|
Loading…
x
Reference in New Issue
Block a user