帆软使用的第三方框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

148 lines
6.8 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.hibernate.org/xsd/orm/cfg"
targetNamespace="http://www.hibernate.org/xsd/orm/cfg"
elementFormDefault="qualified"
version="4.0">
<xs:element name="hibernate-configuration">
<xs:complexType>
<xs:sequence>
<xs:element name="session-factory">
<xs:complexType>
<xs:sequence>
<xs:element name="property" minOccurs="0" maxOccurs="unbounded" type="ConfigPropertyType"/>
<xs:element name="mapping" minOccurs="0" maxOccurs="unbounded" type="MappingReferenceType"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="class-cache" type="EntityCacheType"/>
<xs:element name="collection-cache" type="CollectionCacheType"/>
</xs:choice>
<xs:element name="event" minOccurs="0" maxOccurs="unbounded" type="EventListenerGroupType" />
<xs:element name="listener" minOccurs="0" maxOccurs="unbounded" type="EventListenerType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<!-- the JNDI name -->
</xs:complexType>
</xs:element>
<xs:element name="security" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="grant" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="actions" use="required" type="xs:string"/>
<xs:attribute name="entity-name" use="required" type="xs:string"/>
<xs:attribute name="role" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="context" use="required" type="xs:string"/>
<!--the JACC contextID-->
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ConfigPropertyType" mixed="true">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" use="required" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="MappingReferenceType">
<xs:attribute name="class" type="xs:string"/>
<xs:attribute name="file" type="xs:string"/>
<xs:attribute name="jar" type="xs:string"/>
<xs:attribute name="package" type="xs:string"/>
<xs:attribute name="resource" type="xs:string"/>
</xs:complexType>
<xs:complexType name="EntityCacheType">
<xs:attribute name="class" use="required" type="xs:string"/>
<xs:attribute name="include" default="all">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="all"/>
<xs:enumeration value="non-lazy"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="region" type="xs:string"/>
<xs:attribute name="usage" use="required" type="CacheUsageEnum"/>
</xs:complexType>
<xs:complexType name="CollectionCacheType">
<xs:attribute name="collection" use="required" type="xs:string"/>
<xs:attribute name="region" type="xs:string"/>
<xs:attribute name="usage" use="required" type="CacheUsageEnum"/>
</xs:complexType>
<xs:complexType name="EventListenerGroupType">
<xs:sequence>
<xs:element name="listener" minOccurs="0" maxOccurs="unbounded" type="EventListenerType"/>
</xs:sequence>
<xs:attribute name="type" use="required" type="EventTypeEnum"/>
</xs:complexType>
<xs:complexType name="EventListenerType">
<xs:attribute name="class" use="required" type="xs:string"/>
<xs:attribute name="type" type="EventTypeEnum"/>
</xs:complexType>
<xs:simpleType name="EventTypeEnum">
<xs:restriction base="xs:token">
<xs:enumeration value="auto-flush"/>
<xs:enumeration value="create"/>
<xs:enumeration value="create-onflush"/>
<xs:enumeration value="delete"/>
<xs:enumeration value="dirty-check"/>
<xs:enumeration value="evict"/>
<xs:enumeration value="flush"/>
<xs:enumeration value="flush-entity"/>
<xs:enumeration value="load"/>
<xs:enumeration value="load-collection"/>
<xs:enumeration value="lock"/>
<xs:enumeration value="merge"/>
<xs:enumeration value="post-collection-recreate"/>
<xs:enumeration value="post-collection-remove"/>
<xs:enumeration value="post-collection-update"/>
<xs:enumeration value="post-commit-delete"/>
<xs:enumeration value="post-commit-insert"/>
<xs:enumeration value="post-commit-update"/>
<xs:enumeration value="post-delete"/>
<xs:enumeration value="post-insert"/>
<xs:enumeration value="post-load"/>
<xs:enumeration value="post-update"/>
<xs:enumeration value="pre-collection-recreate"/>
<xs:enumeration value="pre-collection-remove"/>
<xs:enumeration value="pre-collection-update"/>
<xs:enumeration value="pre-delete"/>
<xs:enumeration value="pre-insert"/>
<xs:enumeration value="pre-load"/>
<xs:enumeration value="pre-update"/>
<xs:enumeration value="refresh"/>
<xs:enumeration value="replicate"/>
<xs:enumeration value="save"/>
<xs:enumeration value="save-update"/>
<xs:enumeration value="update"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CacheUsageEnum">
<xs:restriction base="xs:token">
<xs:enumeration value="nonstrict-read-write"/>
<xs:enumeration value="read-only"/>
<xs:enumeration value="read-write"/>
<xs:enumeration value="transactional"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>