Hibernate的dtd文件和properties文件

hibernate-configuration-3.0.dtd

 1 <!-- Hibernate file-based configuration document.
 2 
 3 <!DOCTYPE hibernate-configuration PUBLIC
 4     "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
 5     "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
 6 
 7 An instance of this document contains property settings and references
 8 to mapping files for a number of SessionFactory instances to be listed
 9 in JNDI.
10 
11 -->
12 
13 <!ELEMENT hibernate-configuration (session-factory,security?)>
14 
15 <!ELEMENT property (#PCDATA)>
16 <!ATTLIST property name CDATA #REQUIRED>
17 
18 <!ELEMENT mapping EMPTY> <!-- reference to a mapping file -->
19 <!ATTLIST mapping resource CDATA #IMPLIED>
20 <!ATTLIST mapping file CDATA #IMPLIED>
21 <!ATTLIST mapping jar CDATA #IMPLIED>
22 <!ATTLIST mapping package CDATA #IMPLIED>
23 <!ATTLIST mapping class CDATA #IMPLIED>
24 
25 <!ELEMENT class-cache EMPTY>
26 <!ATTLIST class-cache class CDATA #REQUIRED>
27 <!ATTLIST class-cache region CDATA #IMPLIED>
28 <!ATTLIST class-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>
29 <!ATTLIST class-cache include (all|non-lazy) "all">
30 
31 <!ELEMENT collection-cache EMPTY>
32 <!ATTLIST collection-cache collection CDATA #REQUIRED>
33 <!ATTLIST collection-cache region CDATA #IMPLIED>
34 <!ATTLIST collection-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>
35 
36 <!ELEMENT event (listener*)>
37 <!ATTLIST event type (auto-flush|merge|create|create-onflush|delete|dirty-check|evict|flush|flush-entity|load|load-collection|lock|refresh|replicate|save-update|save|update|pre-load|pre-update|pre-insert|pre-delete|pre-collection-recreate|pre-collection-remove|pre-collection-update|post-load|post-update|post-insert|post-delete|post-collection-recreate|post-collection-remove|post-collection-update|post-commit-update|post-commit-insert|post-commit-delete) #REQUIRED>
38 
39 <!ELEMENT listener EMPTY>
40 <!ATTLIST listener type (auto-flush|merge|create|create-onflush|delete|dirty-check|evict|flush|flush-entity|load|load-collection|lock|refresh|replicate|save-update|save|update|pre-load|pre-update|pre-insert|pre-delete|pre-collection-recreate|pre-collection-remove|pre-collection-update|post-load|post-update|post-insert|post-delete|post-collection-recreate|post-collection-remove|post-collection-update|post-commit-update|post-commit-insert|post-commit-delete) #IMPLIED>
41 <!ATTLIST listener class CDATA #REQUIRED>
42 
43 <!ELEMENT session-factory (property*, mapping*, (class-cache|collection-cache)*, event*, listener*)>
44 <!ATTLIST session-factory name CDATA #IMPLIED> <!-- the JNDI name -->
45 
46 <!ELEMENT security (grant*)>
47 <!ATTLIST security context CDATA #REQUIRED> <!--the JACC contextID-->
48 
49 <!ELEMENT grant EMPTY>
50 <!ATTLIST grant role CDATA #REQUIRED>
51 <!ATTLIST grant entity-name CDATA #REQUIRED>
52 <!ATTLIST grant actions CDATA #REQUIRED>
hibernate-configuration-3.0.dtd

hibernate-mapping-3.0.dtd

   1 <!-- Hibernate Mapping DTD.
   2 
   3 <!DOCTYPE hibernate-mapping PUBLIC 
   4     "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
   5     "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
   6 
   7 An instance of this XML document may contain mappings for an arbitrary 
   8 number of classes. The class mappings may contain associations to classes
   9 mapped in the same document or in another document. No class may be 
  10 mapped more than once. Each document may also contain definitions of an
  11 arbitrary number of queries, and import declarations of arbitrary classes. 
  12 
  13 -->
  14 
  15 <!--
  16     The document root.
  17  -->
  18 
  19 <!ELEMENT hibernate-mapping (
  20     meta*,
  21     identifier-generator*,
  22     typedef*,
  23     filter-def*,
  24     import*,
  25     (class|subclass|joined-subclass|union-subclass)*,
  26     resultset*,
  27     (query|sql-query)*,
  28     filter-def*,
  29     fetch-profile*,
  30     database-object*
  31 )>
  32     <!ATTLIST hibernate-mapping schema CDATA #IMPLIED>                                    <!-- default: none -->
  33     <!ATTLIST hibernate-mapping catalog CDATA #IMPLIED>                                    <!-- default: none -->
  34     <!ATTLIST hibernate-mapping default-cascade CDATA "none">
  35     <!ATTLIST hibernate-mapping default-access CDATA "property">
  36     <!ATTLIST hibernate-mapping default-lazy (true|false) "true">
  37     <!ATTLIST hibernate-mapping auto-import (true|false) "true">
  38     <!ATTLIST hibernate-mapping package CDATA #IMPLIED>                                    <!-- default: none -->
  39 
  40 <!--
  41     <meta.../> is used to assign meta-level attributes to a class
  42     or property.  Is currently used by codegenerator as a placeholder for
  43     values that is not directly related to OR mappings.
  44 -->
  45 <!ELEMENT meta (#PCDATA)>
  46     <!ATTLIST meta attribute CDATA #REQUIRED>
  47     <!ATTLIST meta inherit (true|false) "true">
  48 
  49 <!--
  50     <identifier-generator.../> allows customized short-naming of IdentifierGenerator implementations.
  51 -->
  52 <!ELEMENT identifier-generator EMPTY>
  53     <!ATTLIST identifier-generator name CDATA #REQUIRED>
  54     <!ATTLIST identifier-generator class CDATA #REQUIRED>
  55 
  56 <!--
  57     <typedef.../> allows defining a customized type mapping for a Hibernate type. May
  58     contain parameters for parameterizable types.
  59 -->
  60 <!ELEMENT typedef (param*)>
  61     <!ATTLIST typedef class CDATA #REQUIRED>
  62     <!ATTLIST typedef name CDATA #REQUIRED>
  63 
  64 <!--
  65     IMPORT element definition; an explicit query language "import"
  66 -->
  67 <!ELEMENT import EMPTY>
  68     <!ATTLIST import class CDATA #REQUIRED>
  69     <!ATTLIST import rename CDATA #IMPLIED>    <!-- default: unqualified class name -->
  70 
  71 <!--
  72     Root entity mapping.  Poorly named as entities do not have to be represented by 
  73     classes at all.  Mapped entities may be represented via different methodologies 
  74     (POJO, Map, Dom4j).
  75 -->
  76 <!ELEMENT class (
  77      meta*,
  78     subselect?,
  79     cache?,
  80     synchronize*,
  81     comment?,
  82     tuplizer*,
  83     (id|composite-id),
  84     discriminator?,
  85     natural-id?,
  86     (version|timestamp)?,
  87     (property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,
  88     ((join*,subclass*)|joined-subclass*|union-subclass*),
  89     loader?,sql-insert?,sql-update?,sql-delete?,
  90     filter*,
  91     fetch-profile*,
  92     resultset*,
  93     (query|sql-query)*
  94 )>
  95     <!ATTLIST class entity-name CDATA #IMPLIED>
  96     <!ATTLIST class name CDATA #IMPLIED>                            <!-- this is the class name -->
  97     <!ATTLIST class proxy CDATA #IMPLIED>                            <!-- default: no proxy interface -->
  98     <!ATTLIST class lazy (true|false) #IMPLIED>
  99     <!ATTLIST class table CDATA #IMPLIED>                            <!-- default: unqualified classname -->
 100     <!ATTLIST class schema CDATA #IMPLIED>                            <!-- default: none -->
 101     <!ATTLIST class catalog CDATA #IMPLIED>                            <!-- default: none -->
 102     <!ATTLIST class subselect CDATA #IMPLIED>
 103     <!ATTLIST class discriminator-value CDATA #IMPLIED>                <!-- default: unqualified class name | none -->
 104     <!ATTLIST class mutable (true|false) "true">
 105     <!ATTLIST class abstract (true|false) #IMPLIED>
 106     <!ATTLIST class polymorphism (implicit|explicit) "implicit">
 107     <!ATTLIST class where CDATA #IMPLIED>                            <!-- default: none -->
 108     <!ATTLIST class persister CDATA #IMPLIED>
 109     <!ATTLIST class dynamic-update (true|false) "false">
 110     <!ATTLIST class dynamic-insert (true|false) "false">
 111     <!ATTLIST class batch-size CDATA #IMPLIED>
 112     <!ATTLIST class select-before-update (true|false) "false">
 113     <!ATTLIST class optimistic-lock (none|version|dirty|all) "version">
 114     <!ATTLIST class check CDATA #IMPLIED>                            <!-- default: none -->
 115     <!ATTLIST class rowid CDATA #IMPLIED>
 116     <!ATTLIST class node CDATA #IMPLIED>
 117 
 118 <!--
 119     TUPLIZER element; defines tuplizer to use for a component/entity for a given entity-mode
 120 -->
 121 <!ELEMENT tuplizer EMPTY>
 122     <!ATTLIST tuplizer entity-mode (pojo|dom4j|dynamic-map) #IMPLIED>   <!-- entity mode for which tuplizer is in effect -->
 123     <!ATTLIST tuplizer class CDATA #REQUIRED>                           <!-- the tuplizer class to use -->
 124 
 125 <!--
 126     FILTER-DEF element; top-level filter definition.
 127 -->
 128 <!ELEMENT filter-def (#PCDATA|filter-param)*>
 129     <!ATTLIST filter-def name CDATA #REQUIRED> <!-- The filter name -->
 130     <!ATTLIST filter-def condition CDATA #IMPLIED>
 131 
 132 <!--
 133     FILTER-PARAM element; qualifies parameters found within a FILTER-DEF
 134     condition.
 135 -->
 136 <!ELEMENT filter-param EMPTY>
 137     <!ATTLIST filter-param name CDATA #REQUIRED> <!-- The parameter name -->
 138     <!ATTLIST filter-param type CDATA #REQUIRED> <!-- The parameter type -->
 139 
 140 <!--
 141     FILTER element; used to apply a filter.
 142 -->
 143 <!ELEMENT filter (#PCDATA)>
 144     <!ATTLIST filter name CDATA #REQUIRED>
 145     <!ATTLIST filter condition CDATA #IMPLIED>
 146 
 147 <!--
 148 -->
 149 <!ELEMENT fetch-profile (fetch*)>
 150     <!ATTLIST fetch-profile name CDATA #REQUIRED>
 151 
 152 <!--
 153     The <fetch> element defines a single path to which the fetch
 154     refers, as well as the style of fetch to apply.  The 'root' of the
 155     path is different depending upon the context in which the
 156     containing <fetch-profile/> occurs; within a <class/> element,
 157     the entity-name of the containing class mapping is assumed...
 158 -->
 159 <!ELEMENT fetch EMPTY>
 160     <!ATTLIST fetch entity CDATA #IMPLIED> <!-- Implied as long as the containing fetch profile is contained in a class mapping -->
 161     <!ATTLIST fetch association CDATA #REQUIRED>
 162     <!ATTLIST fetch style (join|select) "join">
 163 
 164 <!-- A join allows some properties of a class to be persisted to a second table -->
 165 
 166 <!ELEMENT join ( 
 167     subselect?,
 168     comment?,
 169     key,
 170     (property|many-to-one|component|dynamic-component|any)*,
 171     sql-insert?,sql-update?,sql-delete?
 172 )>
 173     <!ATTLIST join table CDATA #REQUIRED>
 174     <!ATTLIST join schema CDATA #IMPLIED>                        <!-- default: none -->
 175     <!ATTLIST join catalog CDATA #IMPLIED>                        <!-- default: none -->
 176     <!ATTLIST join subselect CDATA #IMPLIED>
 177     <!ATTLIST join fetch (join|select) "join">
 178     <!ATTLIST join inverse (true|false) "false">
 179     <!ATTLIST join optional (true|false) "false">
 180 
 181 <!-- A natural-id element allows declaration of the unique business key -->
 182 
 183 <!ELEMENT natural-id ( (property|many-to-one|component|dynamic-component|any)* )>
 184     <!ATTLIST natural-id mutable (true|false) "false">
 185 
 186 <!-- Declares the id type, column and generation algorithm for an entity class.
 187 If a name attribut is given, the id is exposed to the application through the 
 188 named property of the class. If not, the id is only exposed to the application 
 189 via Session.getIdentifier() -->
 190 
 191 <!ELEMENT id (meta*,column*,type?,generator?)>
 192     <!ATTLIST id name CDATA #IMPLIED>
 193     <!ATTLIST id node CDATA #IMPLIED>
 194     <!ATTLIST id access CDATA #IMPLIED>
 195     <!ATTLIST id column CDATA #IMPLIED>
 196     <!ATTLIST id type CDATA #IMPLIED>
 197     <!ATTLIST id length CDATA #IMPLIED>
 198     <!ATTLIST id unsaved-value CDATA #IMPLIED>                    <!-- any|none|null|undefined|0|-1|... -->
 199 
 200 <!-- A composite key may be modelled by a java class with a property for each 
 201 key column. The class must implement java.io.Serializable and reimplement equals() 
 202 and hashCode(). -->
 203 
 204 <!ELEMENT composite-id ( meta*, (key-property|key-many-to-one)+, generator? )>
 205     <!ATTLIST composite-id class CDATA #IMPLIED>
 206     <!ATTLIST composite-id mapped (true|false) "false">
 207     <!ATTLIST composite-id name CDATA #IMPLIED>
 208     <!ATTLIST composite-id node CDATA #IMPLIED>
 209     <!ATTLIST composite-id access CDATA #IMPLIED>
 210     <!ATTLIST composite-id unsaved-value (undefined|any|none) "undefined"> 
 211 
 212 <!-- Polymorphic data requires a column holding a class discriminator value. This
 213 value is not directly exposed to the application. -->
 214 
 215 <!ELEMENT discriminator ((column|formula)?)>
 216     <!ATTLIST discriminator column CDATA #IMPLIED>                <!-- default: "class"|none -->
 217     <!ATTLIST discriminator formula CDATA #IMPLIED>
 218     <!ATTLIST discriminator type CDATA "string">
 219     <!ATTLIST discriminator not-null (true|false) "true">
 220     <!ATTLIST discriminator length CDATA #IMPLIED>
 221     <!ATTLIST discriminator force (true|false) "false">
 222     <!ATTLIST discriminator insert (true|false) "true">
 223     
 224 <!-- Versioned data requires a column holding a version number. This is exposed to the
 225 application through a property of the Java class. -->
 226 
 227 <!ELEMENT version (meta*,column*)>
 228     <!ATTLIST version name CDATA #REQUIRED>
 229     <!ATTLIST version node CDATA #IMPLIED>
 230     <!ATTLIST version access CDATA #IMPLIED>
 231     <!ATTLIST version column CDATA #IMPLIED>
 232     <!ATTLIST version type CDATA "integer">
 233     <!ATTLIST version unsaved-value (null|negative|undefined) "undefined">
 234     <!ATTLIST version generated (never|always) "never">
 235     <!ATTLIST version insert (true|false) #IMPLIED>
 236 
 237 <!ELEMENT timestamp (meta*)>
 238     <!ATTLIST timestamp name CDATA #REQUIRED>
 239     <!ATTLIST timestamp node CDATA #IMPLIED>
 240     <!ATTLIST timestamp column CDATA #IMPLIED>
 241     <!ATTLIST timestamp access CDATA #IMPLIED>
 242     <!ATTLIST timestamp unsaved-value (null|undefined) "null">
 243     <!ATTLIST timestamp source (vm|db) "vm">
 244     <!ATTLIST timestamp generated (never|always) "never">
 245 
 246 
 247 <!--
 248     Subclass declarations are nested beneath the root class declaration to achieve
 249     polymorphic persistence with the table-per-hierarchy mapping strategy.
 250 
 251     See the note on the class element regarding <pojo/> vs. @name usage...
 252 -->
 253 <!ELEMENT subclass (
 254      meta*,
 255     tuplizer*,
 256     synchronize*,
 257     (property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,
 258     join*, 
 259     subclass*,
 260     loader?,sql-insert?,sql-update?,sql-delete?,
 261     fetch-profile*,
 262     resultset*,
 263     (query|sql-query)*
 264 )>
 265     <!ATTLIST subclass entity-name CDATA #IMPLIED>
 266     <!ATTLIST subclass name CDATA #IMPLIED>
 267     <!ATTLIST subclass proxy CDATA #IMPLIED>                            <!-- default: no proxy interface -->
 268     <!ATTLIST subclass discriminator-value CDATA #IMPLIED>                <!-- default: unqualified class name | none -->
 269     <!ATTLIST subclass dynamic-update (true|false) "false">
 270     <!ATTLIST subclass dynamic-insert (true|false) "false">
 271     <!ATTLIST subclass select-before-update (true|false) "false">
 272     <!ATTLIST subclass extends CDATA #IMPLIED>                            <!-- default: empty when a toplevel, otherwise the nearest class definition -->
 273     <!ATTLIST subclass lazy (true|false) #IMPLIED>
 274     <!ATTLIST subclass abstract (true|false) #IMPLIED>
 275     <!ATTLIST subclass persister CDATA #IMPLIED>
 276     <!ATTLIST subclass batch-size CDATA #IMPLIED>
 277     <!ATTLIST subclass node CDATA #IMPLIED>
 278 
 279 <!--
 280     Joined subclasses are used for the normalized table-per-subclass mapping strategy
 281 
 282     See the note on the class element regarding <pojo/> vs. @name usage...
 283 -->
 284 <!ELEMENT joined-subclass (
 285     meta*,
 286     subselect?,
 287     synchronize*,
 288     comment?,
 289     tuplizer*,
 290     key,
 291     (property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*, 
 292     joined-subclass*,
 293     loader?,sql-insert?,sql-update?,sql-delete?,
 294     fetch-profile*,
 295     resultset*,
 296     (query|sql-query)*
 297 )>
 298     <!ATTLIST joined-subclass entity-name CDATA #IMPLIED>
 299     <!ATTLIST joined-subclass name CDATA #IMPLIED>
 300     <!ATTLIST joined-subclass proxy CDATA #IMPLIED>                         <!-- default: no proxy interface -->
 301     <!ATTLIST joined-subclass table CDATA #IMPLIED>                         <!-- default: unqualified class name -->
 302     <!ATTLIST joined-subclass schema CDATA #IMPLIED>
 303     <!ATTLIST joined-subclass catalog CDATA #IMPLIED>
 304     <!ATTLIST joined-subclass subselect CDATA #IMPLIED>
 305     <!ATTLIST joined-subclass dynamic-update (true|false) "false">
 306     <!ATTLIST joined-subclass dynamic-insert (true|false) "false">
 307     <!ATTLIST joined-subclass select-before-update (true|false) "false">
 308     <!ATTLIST joined-subclass extends CDATA #IMPLIED>                     <!-- default: none when toplevel, otherwise the nearest class definition -->
 309     <!ATTLIST joined-subclass lazy (true|false) #IMPLIED>
 310     <!ATTLIST joined-subclass abstract (true|false) #IMPLIED>
 311     <!ATTLIST joined-subclass persister CDATA #IMPLIED>
 312     <!ATTLIST joined-subclass check CDATA #IMPLIED>                         <!-- default: none -->
 313     <!ATTLIST joined-subclass batch-size CDATA #IMPLIED>
 314     <!ATTLIST joined-subclass node CDATA #IMPLIED>
 315 
 316 <!--
 317     Union subclasses are used for the table-per-concrete-class mapping strategy
 318 
 319     See the note on the class element regarding <pojo/> vs. @name usage...
 320 -->
 321 <!ELEMENT union-subclass (
 322      meta*,
 323     subselect?,
 324     synchronize*,
 325     comment?,
 326     tuplizer*,
 327     (property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,
 328     union-subclass*,
 329     loader?,sql-insert?,sql-update?,sql-delete?,
 330     fetch-profile*,
 331     resultset*,
 332     (query|sql-query)*
 333 )>
 334     <!ATTLIST union-subclass entity-name CDATA #IMPLIED>
 335     <!ATTLIST union-subclass name CDATA #IMPLIED>
 336     <!ATTLIST union-subclass proxy CDATA #IMPLIED>                        <!-- default: no proxy interface -->
 337     <!ATTLIST union-subclass table CDATA #IMPLIED>                        <!-- default: unqualified class name -->
 338     <!ATTLIST union-subclass schema CDATA #IMPLIED>
 339     <!ATTLIST union-subclass catalog CDATA #IMPLIED>
 340     <!ATTLIST union-subclass subselect CDATA #IMPLIED>
 341     <!ATTLIST union-subclass dynamic-update (true|false) "false">
 342     <!ATTLIST union-subclass dynamic-insert (true|false) "false">
 343     <!ATTLIST union-subclass select-before-update (true|false) "false">
 344     <!ATTLIST union-subclass extends CDATA #IMPLIED>                    <!-- default: none when toplevel, otherwise the nearest class definition -->
 345     <!ATTLIST union-subclass lazy (true|false) #IMPLIED>
 346     <!ATTLIST union-subclass abstract (true|false) #IMPLIED>
 347     <!ATTLIST union-subclass persister CDATA #IMPLIED>
 348     <!ATTLIST union-subclass check CDATA #IMPLIED>                        <!-- default: none -->
 349     <!ATTLIST union-subclass batch-size CDATA #IMPLIED>
 350     <!ATTLIST union-subclass node CDATA #IMPLIED>
 351 
 352 <!-- Property of an entity class or component, component-element, composite-id, etc. 
 353 JavaBeans style properties are mapped to table columns. -->
 354 
 355 <!ELEMENT property (meta*,(column|formula)*,type?)>
 356     <!ATTLIST property name CDATA #REQUIRED>
 357     <!ATTLIST property node CDATA #IMPLIED>
 358     <!ATTLIST property access CDATA #IMPLIED>
 359     <!ATTLIST property type CDATA #IMPLIED>
 360     <!ATTLIST property column CDATA #IMPLIED>
 361     <!ATTLIST property length CDATA #IMPLIED>
 362     <!ATTLIST property precision CDATA #IMPLIED>
 363     <!ATTLIST property scale CDATA #IMPLIED>
 364     <!ATTLIST property not-null (true|false) #IMPLIED>
 365     <!ATTLIST property unique (true|false) "false">
 366     <!ATTLIST property unique-key CDATA #IMPLIED>
 367     <!ATTLIST property index CDATA #IMPLIED>                <!-- include the columns spanned by this property in an index -->
 368     <!ATTLIST property update (true|false) #IMPLIED>
 369     <!ATTLIST property insert (true|false) #IMPLIED>
 370     <!ATTLIST property optimistic-lock (true|false) "true">    <!-- only supported for properties of a class (not component) -->
 371     <!ATTLIST property formula CDATA #IMPLIED>
 372     <!ATTLIST property lazy (true|false) "false">
 373     <!ATTLIST property generated (never|insert|always) "never">
 374 
 375 <!-- Declares the type of the containing property (overrides an eventually existing type
 376 attribute of the property). May contain param elements to customize a ParametrizableType. -->
 377 <!ELEMENT type (param*)>
 378     <!ATTLIST type name CDATA #REQUIRED>
 379     
 380 <!-- Declares an association between two entities (Or from a component, component element,
 381 etc. to an entity). -->
 382 
 383 <!ELEMENT many-to-one (meta*,(column|formula)*)>
 384     <!ATTLIST many-to-one name CDATA #REQUIRED>
 385     <!ATTLIST many-to-one access CDATA #IMPLIED>
 386     <!ATTLIST many-to-one class CDATA #IMPLIED>
 387     <!ATTLIST many-to-one entity-name CDATA #IMPLIED>
 388     <!ATTLIST many-to-one column CDATA #IMPLIED>
 389     <!ATTLIST many-to-one not-null (true|false) #IMPLIED>
 390     <!ATTLIST many-to-one unique (true|false) "false">
 391     <!ATTLIST many-to-one unique-key CDATA #IMPLIED>
 392     <!ATTLIST many-to-one index CDATA #IMPLIED>
 393     <!ATTLIST many-to-one cascade CDATA #IMPLIED>
 394     <!ATTLIST many-to-one outer-join (true|false|auto) #IMPLIED>
 395     <!ATTLIST many-to-one fetch (join|select) #IMPLIED>
 396     <!ATTLIST many-to-one update (true|false) "true">
 397     <!ATTLIST many-to-one insert (true|false) "true">
 398     <!ATTLIST many-to-one optimistic-lock (true|false) "true">    <!-- only supported for properties of a class (not component) -->
 399     <!ATTLIST many-to-one foreign-key CDATA #IMPLIED>
 400     <!ATTLIST many-to-one property-ref CDATA #IMPLIED>
 401     <!ATTLIST many-to-one formula CDATA #IMPLIED>
 402     <!ATTLIST many-to-one lazy (false|proxy|no-proxy) #IMPLIED>
 403     <!ATTLIST many-to-one not-found (exception|ignore) "exception">
 404     <!ATTLIST many-to-one node CDATA #IMPLIED>
 405     <!ATTLIST many-to-one embed-xml (true|false) "true">
 406     
 407 <!-- Declares a one-to-one association between two entities (Or from a component, 
 408 component element, etc. to an entity). -->
 409 
 410 <!ELEMENT one-to-one (meta*,formula*)>
 411     <!ATTLIST one-to-one name CDATA #REQUIRED>
 412     <!ATTLIST one-to-one formula CDATA #IMPLIED>
 413     <!ATTLIST one-to-one access CDATA #IMPLIED>
 414     <!ATTLIST one-to-one class CDATA #IMPLIED>
 415     <!ATTLIST one-to-one entity-name CDATA #IMPLIED>
 416     <!ATTLIST one-to-one cascade CDATA #IMPLIED>
 417     <!ATTLIST one-to-one outer-join (true|false|auto) #IMPLIED>
 418     <!ATTLIST one-to-one fetch (join|select) #IMPLIED>
 419     <!ATTLIST one-to-one constrained (true|false) "false">
 420     <!ATTLIST one-to-one foreign-key CDATA #IMPLIED>
 421     <!ATTLIST one-to-one property-ref CDATA #IMPLIED>
 422     <!ATTLIST one-to-one lazy (false|proxy|no-proxy) #IMPLIED>
 423     <!ATTLIST one-to-one node CDATA #IMPLIED>
 424     <!ATTLIST one-to-one embed-xml (true|false) "true">
 425     
 426 <!-- A property embedded in a composite identifier or map index (always not-null). -->
 427 
 428 <!ELEMENT key-property (meta*,column*,type?)>
 429     <!ATTLIST key-property name CDATA #REQUIRED>
 430     <!ATTLIST key-property access CDATA #IMPLIED>
 431     <!ATTLIST key-property type CDATA #IMPLIED>
 432     <!ATTLIST key-property column CDATA #IMPLIED>
 433     <!ATTLIST key-property length CDATA #IMPLIED>
 434     <!ATTLIST key-property node CDATA #IMPLIED>
 435 
 436 <!-- A many-to-one association embedded in a composite identifier or map index 
 437 (always not-null, never cascade). -->
 438 
 439 <!ELEMENT key-many-to-one (meta*,column*)>
 440     <!ATTLIST key-many-to-one name CDATA #REQUIRED>
 441     <!ATTLIST key-many-to-one access CDATA #IMPLIED>
 442     <!ATTLIST key-many-to-one class CDATA #IMPLIED>
 443     <!ATTLIST key-many-to-one entity-name CDATA #IMPLIED>
 444     <!ATTLIST key-many-to-one column CDATA #IMPLIED>
 445     <!ATTLIST key-many-to-one foreign-key CDATA #IMPLIED>
 446     <!ATTLIST key-many-to-one lazy (false|proxy) #IMPLIED>
 447 
 448 <!-- An "any" association is a polymorphic association to any table with
 449 the given identifier type. The first listed column is a VARCHAR column 
 450 holding the name of the class (for that row). -->
 451 
 452 <!ELEMENT any (meta*,meta-value*,column,column+)>
 453     <!ATTLIST any id-type CDATA #REQUIRED>
 454     <!ATTLIST any meta-type CDATA #IMPLIED>                 <!--- default: Hibernate.STRING -->
 455     <!ATTLIST any name CDATA #REQUIRED>
 456     <!ATTLIST any access CDATA #IMPLIED>
 457     <!ATTLIST any insert (true|false) "true">
 458     <!ATTLIST any update (true|false) "true">
 459     <!ATTLIST any cascade CDATA #IMPLIED>
 460     <!ATTLIST any index CDATA #IMPLIED>                    <!-- include the columns spanned by this association in an index -->
 461     <!ATTLIST any optimistic-lock (true|false) "true">    <!-- only supported for properties of a class (not component) -->
 462     <!ATTLIST any lazy (true|false) "false">
 463     <!ATTLIST any node CDATA #IMPLIED>
 464     
 465 <!ELEMENT meta-value EMPTY>
 466     <!ATTLIST meta-value value CDATA #REQUIRED>
 467     <!ATTLIST meta-value class CDATA #REQUIRED>
 468 
 469 <!-- A component is a user-defined class, persisted along with its containing entity
 470 to the table of the entity class. JavaBeans style properties of the component are
 471 mapped to columns of the table of the containing entity. A null component reference
 472 is mapped to null values in all columns and vice versa. Components do not support
 473 shared reference semantics. -->
 474 
 475 <!ELEMENT component (
 476     meta*,
 477     tuplizer*,
 478     parent?,
 479     (property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|array|primitive-array)*
 480 )>
 481     <!ATTLIST component class CDATA #IMPLIED>
 482     <!ATTLIST component name CDATA #REQUIRED>
 483     <!ATTLIST component access CDATA #IMPLIED>
 484     <!ATTLIST component unique (true|false) "false">
 485     <!ATTLIST component update (true|false) "true">
 486     <!ATTLIST component insert (true|false) "true">
 487     <!ATTLIST component lazy (true|false) "false">
 488     <!ATTLIST component optimistic-lock (true|false) "true">
 489     <!ATTLIST component node CDATA #IMPLIED>
 490     
 491 <!-- A dynamic-component maps columns of the database entity to a java.util.Map 
 492 at the Java level -->
 493 
 494 <!ELEMENT dynamic-component (
 495     (property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|array|primitive-array)*
 496 )>
 497     <!ATTLIST dynamic-component name CDATA #REQUIRED>
 498     <!ATTLIST dynamic-component access CDATA #IMPLIED>
 499     <!ATTLIST dynamic-component unique (true|false) "false">
 500     <!ATTLIST dynamic-component update (true|false) "true">
 501     <!ATTLIST dynamic-component insert (true|false) "true">
 502     <!ATTLIST dynamic-component optimistic-lock (true|false) "true">
 503     <!ATTLIST dynamic-component node CDATA #IMPLIED>
 504 
 505 <!-- properties declares that the contained properties form an alternate key. The name
 506 attribute allows an alternate key to be used as the target of a property-ref. -->
 507 
 508 <!ELEMENT properties (
 509     (property|many-to-one|component|dynamic-component)*
 510 )>
 511     <!ATTLIST properties name CDATA #REQUIRED>
 512     <!ATTLIST properties unique (true|false) "false">
 513     <!ATTLIST properties insert (true|false) "true">
 514     <!ATTLIST properties update (true|false) "true">
 515     <!ATTLIST properties optimistic-lock (true|false) "true">
 516     <!ATTLIST properties node CDATA #IMPLIED>
 517     
 518 <!-- The parent element maps a property of the component class as a pointer back to
 519 the owning entity. -->
 520 
 521 <!ELEMENT parent EMPTY>
 522     <!ATTLIST parent name CDATA #REQUIRED>
 523 
 524 <!-- Collection declarations nested inside a class declaration indicate a foreign key 
 525 relationship from the collection table to the enclosing class. -->
 526 
 527 <!ELEMENT map (
 528     meta*,
 529     subselect?,
 530     cache?,
 531     synchronize*,
 532     comment?,
 533     key, 
 534     (map-key|composite-map-key|map-key-many-to-many|index|composite-index|index-many-to-many|index-many-to-any), 
 535     (element|one-to-many|many-to-many|composite-element|many-to-any),
 536     loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
 537     filter*
 538 )>
 539     <!ATTLIST map name CDATA #REQUIRED>
 540     <!ATTLIST map access CDATA #IMPLIED>
 541     <!ATTLIST map table CDATA #IMPLIED>                                                                <!-- default: name -->
 542     <!ATTLIST map schema CDATA #IMPLIED>                                                            <!-- default: none -->
 543     <!ATTLIST map subselect CDATA #IMPLIED>
 544     <!ATTLIST map catalog CDATA #IMPLIED>                                                            <!-- default: none -->
 545     <!ATTLIST map lazy (true|false|extra) #IMPLIED>
 546     <!ATTLIST map mutable (true|false) "true">
 547     <!ATTLIST map inverse (true|false) "false">
 548     <!ATTLIST map sort CDATA "unsorted">                                                             <!-- unsorted|natural|"comparator class", default: unsorted -->
 549     <!ATTLIST map cascade CDATA #IMPLIED>
 550     <!ATTLIST map order-by CDATA #IMPLIED>                                                             <!-- default: none -->
 551     <!ATTLIST map where CDATA #IMPLIED>                                                                <!-- default: none -->
 552     <!ATTLIST map batch-size CDATA #IMPLIED>
 553     <!ATTLIST map outer-join (true|false|auto) #IMPLIED>
 554     <!ATTLIST map fetch (join|select|subselect) #IMPLIED>
 555     <!ATTLIST map check CDATA #IMPLIED>                                                                <!-- default: none -->    
 556     <!ATTLIST map persister CDATA #IMPLIED>                                                        
 557     <!ATTLIST map collection-type CDATA #IMPLIED>    
 558     <!ATTLIST map optimistic-lock (true|false) "true">        <!-- only supported for properties of a class (not component) -->
 559     <!ATTLIST map node CDATA #IMPLIED>
 560     <!ATTLIST map embed-xml (true|false) "true">
 561     
 562 <!ELEMENT set (
 563     meta*,
 564     subselect?,
 565     cache?,
 566     synchronize*,
 567     comment?,
 568     key, 
 569     (element|one-to-many|many-to-many|composite-element|many-to-any),
 570     loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
 571     filter*
 572 )>
 573     <!ATTLIST set name CDATA #REQUIRED>
 574     <!ATTLIST set access CDATA #IMPLIED>
 575     <!ATTLIST set table CDATA #IMPLIED>                                                                <!-- default: name -->
 576     <!ATTLIST set schema CDATA #IMPLIED>                                                            <!-- default: none -->
 577     <!ATTLIST set catalog CDATA #IMPLIED>                                                            <!-- default: none -->
 578     <!ATTLIST set subselect CDATA #IMPLIED>
 579     <!ATTLIST set lazy (true|false|extra) #IMPLIED>
 580     <!ATTLIST set sort CDATA "unsorted">                                                             <!-- unsorted|natural|"comparator class" -->
 581     <!ATTLIST set inverse (true|false) "false">
 582     <!ATTLIST set mutable (true|false) "true">
 583     <!ATTLIST set cascade CDATA #IMPLIED>
 584     <!ATTLIST set order-by CDATA #IMPLIED>                                                             <!-- default: none -->
 585     <!ATTLIST set where CDATA #IMPLIED>                                                                <!-- default: none -->
 586     <!ATTLIST set batch-size CDATA #IMPLIED>
 587     <!ATTLIST set outer-join (true|false|auto) #IMPLIED>
 588     <!ATTLIST set fetch (join|select|subselect) #IMPLIED>
 589     <!ATTLIST set persister CDATA #IMPLIED>    
 590     <!ATTLIST set collection-type CDATA #IMPLIED>                                                        
 591     <!ATTLIST set check CDATA #IMPLIED>                                                                <!-- default: none -->
 592     <!ATTLIST set optimistic-lock (true|false) "true">        <!-- only supported for properties of a class (not component) -->
 593     <!ATTLIST set node CDATA #IMPLIED>
 594     <!ATTLIST set embed-xml (true|false) "true">
 595 
 596 <!ELEMENT bag (
 597     meta*,
 598     subselect?,
 599     cache?,
 600     synchronize*,
 601     comment?,
 602     key, 
 603     (element|one-to-many|many-to-many|composite-element|many-to-any),
 604     loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
 605     filter*
 606 )>
 607     <!ATTLIST bag name CDATA #REQUIRED>
 608     <!ATTLIST bag access CDATA #IMPLIED>
 609     <!ATTLIST bag table CDATA #IMPLIED>                                                                <!-- default: name -->
 610     <!ATTLIST bag schema CDATA #IMPLIED>                                                            <!-- default: none -->
 611     <!ATTLIST bag catalog CDATA #IMPLIED>                                                            <!-- default: none -->
 612     <!ATTLIST bag subselect CDATA #IMPLIED>
 613     <!ATTLIST bag lazy (true|false|extra) #IMPLIED>
 614     <!ATTLIST bag inverse (true|false) "false">
 615     <!ATTLIST bag mutable (true|false) "true">
 616     <!ATTLIST bag cascade CDATA #IMPLIED>
 617     <!ATTLIST bag order-by CDATA #IMPLIED>                                                             <!-- default: none -->
 618     <!ATTLIST bag where CDATA #IMPLIED>                                                                <!-- default: none -->
 619     <!ATTLIST bag batch-size CDATA #IMPLIED>
 620     <!ATTLIST bag outer-join (true|false|auto) #IMPLIED>
 621     <!ATTLIST bag fetch (join|select|subselect) #IMPLIED>
 622     <!ATTLIST bag persister CDATA #IMPLIED>                                                            
 623     <!ATTLIST bag collection-type CDATA #IMPLIED>    
 624     <!ATTLIST bag check CDATA #IMPLIED>                                                                <!-- default: none -->
 625     <!ATTLIST bag optimistic-lock (true|false) "true">        <!-- only supported for properties of a class (not component) -->
 626     <!ATTLIST bag node CDATA #IMPLIED>
 627     <!ATTLIST bag embed-xml (true|false) "true">
 628 
 629 <!ELEMENT idbag (
 630     meta*,
 631     subselect?,
 632     cache?,
 633     synchronize*,
 634     comment?,
 635     collection-id,
 636     key, 
 637     (element|many-to-many|composite-element|many-to-any),
 638     loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
 639     filter*
 640 )>
 641     <!ATTLIST idbag name CDATA #REQUIRED>
 642     <!ATTLIST idbag access CDATA #IMPLIED>
 643     <!ATTLIST idbag table CDATA #IMPLIED>                                                            <!-- default: name -->
 644     <!ATTLIST idbag schema CDATA #IMPLIED>                                                             <!-- default: none -->
 645     <!ATTLIST idbag catalog CDATA #IMPLIED>                                                            <!-- default: none -->
 646     <!ATTLIST idbag subselect CDATA #IMPLIED>
 647     <!ATTLIST idbag lazy (true|false|extra) #IMPLIED>
 648     <!ATTLIST idbag mutable (true|false) "true">
 649     <!ATTLIST idbag cascade CDATA #IMPLIED>
 650     <!ATTLIST idbag order-by CDATA #IMPLIED>                                                         <!-- default: none -->
 651     <!ATTLIST idbag where CDATA #IMPLIED>                                                            <!-- default: none -->
 652     <!ATTLIST idbag batch-size CDATA #IMPLIED>
 653     <!ATTLIST idbag outer-join (true|false|auto) #IMPLIED>
 654     <!ATTLIST idbag fetch (join|select|subselect) #IMPLIED>
 655     <!ATTLIST idbag persister CDATA #IMPLIED>                                                            
 656     <!ATTLIST idbag collection-type CDATA #IMPLIED>
 657     <!ATTLIST idbag check CDATA #IMPLIED>                                                            <!-- default: none -->
 658     <!ATTLIST idbag optimistic-lock (true|false) "true">    <!-- only supported for properties of a class (not component) -->
 659     <!ATTLIST idbag node CDATA #IMPLIED>
 660     <!ATTLIST idbag embed-xml (true|false) "true">
 661 
 662 <!ELEMENT list (
 663     meta*,
 664     subselect?,
 665     cache?,
 666     synchronize*,
 667     comment?,
 668     key, 
 669     (index|list-index), 
 670     (element|one-to-many|many-to-many|composite-element|many-to-any),
 671     loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
 672     filter*
 673 )>
 674     <!ATTLIST list name CDATA #REQUIRED>
 675     <!ATTLIST list access CDATA #IMPLIED>
 676     <!ATTLIST list table CDATA #IMPLIED>                                                             <!-- default: name -->
 677     <!ATTLIST list schema CDATA #IMPLIED>                                                            <!-- default: none -->
 678     <!ATTLIST list catalog CDATA #IMPLIED>                                                            <!-- default: none -->
 679     <!ATTLIST list subselect CDATA #IMPLIED>
 680     <!ATTLIST list lazy (true|false|extra) #IMPLIED>
 681     <!ATTLIST list inverse (true|false) "false">
 682     <!ATTLIST list mutable (true|false) "true">
 683     <!ATTLIST list cascade CDATA #IMPLIED>
 684     <!ATTLIST list where CDATA #IMPLIED>                                                             <!-- default: none -->
 685     <!ATTLIST list batch-size CDATA #IMPLIED>
 686     <!ATTLIST list outer-join (true|false|auto) #IMPLIED>
 687     <!ATTLIST list fetch (join|select|subselect) #IMPLIED>
 688     <!ATTLIST list persister CDATA #IMPLIED>                                                                
 689     <!ATTLIST list collection-type CDATA #IMPLIED>
 690     <!ATTLIST list check CDATA #IMPLIED>                                                            <!-- default: none -->
 691     <!ATTLIST list optimistic-lock (true|false) "true">        <!-- only supported for properties of a class (not component) -->
 692     <!ATTLIST list node CDATA #IMPLIED>
 693     <!ATTLIST list embed-xml (true|false) "true">
 694 
 695 <!ELEMENT array (
 696     meta*,
 697     subselect?,
 698     cache?,
 699     synchronize*,
 700     comment?,
 701     key, 
 702     (index|list-index), 
 703     (element|one-to-many|many-to-many|composite-element|many-to-any),
 704     loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?
 705 )>
 706     <!ATTLIST array name CDATA #REQUIRED>
 707     <!ATTLIST array access CDATA #IMPLIED>
 708     <!ATTLIST array table CDATA #IMPLIED>                                                            <!-- default: name -->
 709     <!ATTLIST array schema CDATA #IMPLIED>                                                             <!-- default: none -->
 710     <!ATTLIST array catalog CDATA #IMPLIED>                                                            <!-- default: none -->
 711     <!ATTLIST array subselect CDATA #IMPLIED>
 712     <!ATTLIST array inverse (true|false) "false">
 713     <!ATTLIST array mutable (true|false) "true">
 714     <!ATTLIST array element-class CDATA #IMPLIED>
 715     <!ATTLIST array cascade CDATA #IMPLIED>
 716     <!ATTLIST array where CDATA #IMPLIED>                                                            <!-- default: none -->
 717     <!ATTLIST array batch-size CDATA #IMPLIED>
 718     <!ATTLIST array outer-join (true|false|auto) #IMPLIED>
 719     <!ATTLIST array fetch (join|select|subselect) #IMPLIED>
 720     <!ATTLIST array persister CDATA #IMPLIED>                                                            
 721     <!ATTLIST array collection-type CDATA #IMPLIED>
 722     <!ATTLIST array check CDATA #IMPLIED>                                                            <!-- default: none -->
 723     <!ATTLIST array optimistic-lock (true|false) "true">    <!-- only supported for properties of a class (not component) -->
 724     <!ATTLIST array node CDATA #IMPLIED>
 725     <!ATTLIST array embed-xml (true|false) "true">
 726 
 727 <!ELEMENT primitive-array (
 728     meta*, 
 729     subselect?,
 730     cache?, 
 731     synchronize*,
 732     comment?,
 733     key, 
 734     (index|list-index), 
 735     element,
 736     loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?
 737 )>
 738     <!ATTLIST primitive-array name CDATA #REQUIRED>
 739     <!ATTLIST primitive-array access CDATA #IMPLIED>
 740     <!ATTLIST primitive-array table CDATA #IMPLIED>                                    <!-- default: name -->
 741     <!ATTLIST primitive-array schema CDATA #IMPLIED>                                <!-- default: none -->
 742     <!ATTLIST primitive-array catalog CDATA #IMPLIED>                                <!-- default: none -->
 743     <!ATTLIST primitive-array subselect CDATA #IMPLIED>
 744     <!ATTLIST primitive-array mutable (true|false) "true">
 745     <!ATTLIST primitive-array where CDATA #IMPLIED>                                    <!-- default: none -->
 746     <!ATTLIST primitive-array batch-size CDATA #IMPLIED>
 747     <!ATTLIST primitive-array outer-join (true|false|auto) #IMPLIED>
 748     <!ATTLIST primitive-array fetch (join|select|subselect) #IMPLIED>
 749     <!ATTLIST primitive-array persister CDATA #IMPLIED>                                                                
 750     <!ATTLIST primitive-array collection-type CDATA #IMPLIED>
 751     <!ATTLIST primitive-array check CDATA #IMPLIED>                                    <!-- default: none -->
 752     <!ATTLIST primitive-array optimistic-lock (true|false) "true">        <!-- only supported for properties of a class (not component) -->
 753     <!ATTLIST primitive-array node CDATA #IMPLIED>
 754     <!ATTLIST primitive-array embed-xml (true|false) "true">
 755 
 756 <!-- Declares the element type of a collection of basic type -->
 757 
 758 <!ELEMENT element ( (column|formula)*, type? )>
 759     <!ATTLIST element column CDATA #IMPLIED>
 760     <!ATTLIST element node CDATA #IMPLIED>
 761     <!ATTLIST element formula CDATA #IMPLIED>
 762     <!ATTLIST element type CDATA #IMPLIED>
 763     <!ATTLIST element length CDATA #IMPLIED>
 764     <!ATTLIST element precision CDATA #IMPLIED>
 765     <!ATTLIST element scale CDATA #IMPLIED>
 766     <!ATTLIST element not-null (true|false) "false">
 767     <!ATTLIST element unique (true|false) "false">
 768 
 769 <!-- One to many association. This tag declares the entity-class
 770 element type of a collection and specifies a one-to-many relational model -->
 771 
 772 <!ELEMENT one-to-many EMPTY>
 773     <!ATTLIST one-to-many class CDATA #IMPLIED>
 774     <!ATTLIST one-to-many not-found (exception|ignore) "exception">
 775     <!ATTLIST one-to-many node CDATA #IMPLIED>
 776     <!ATTLIST one-to-many embed-xml (true|false) "true">
 777     <!ATTLIST one-to-many entity-name CDATA #IMPLIED>
 778     <!-- No column declaration attributes required in this case. The primary
 779     key column of the associated class is already mapped elsewhere.-->
 780 
 781 <!-- Many to many association. This tag declares the entity-class
 782 element type of a collection and specifies a many-to-many relational model -->
 783 
 784 <!ELEMENT many-to-many (meta*,(column|formula)*,filter*)>
 785     <!ATTLIST many-to-many class CDATA #IMPLIED>
 786     <!ATTLIST many-to-many node CDATA #IMPLIED>
 787     <!ATTLIST many-to-many embed-xml (true|false) "true">
 788     <!ATTLIST many-to-many entity-name CDATA #IMPLIED>
 789     <!ATTLIST many-to-many column CDATA #IMPLIED>
 790     <!ATTLIST many-to-many formula CDATA #IMPLIED>
 791     <!ATTLIST many-to-many not-found (exception|ignore) "exception">
 792     <!ATTLIST many-to-many outer-join (true|false|auto) #IMPLIED>
 793     <!ATTLIST many-to-many fetch (join|select) #IMPLIED>
 794     <!ATTLIST many-to-many lazy (false|proxy) #IMPLIED>
 795     <!ATTLIST many-to-many foreign-key CDATA #IMPLIED>
 796     <!ATTLIST many-to-many unique (true|false) "false">
 797     <!ATTLIST many-to-many where CDATA #IMPLIED>
 798     <!ATTLIST many-to-many order-by CDATA #IMPLIED>
 799     <!ATTLIST many-to-many property-ref CDATA #IMPLIED>
 800 
 801 <!-- A composite element allows a collection to hold instances of an arbitrary 
 802 class, without the requirement of joining to an entity table. Composite elements
 803 have component semantics - no shared references and ad hoc null value semantics. 
 804 Composite elements may not hold nested collections. -->
 805 
 806 <!ELEMENT composite-element ( 
 807     (meta*),
 808     parent?,
 809     tuplizer*,
 810     (property|many-to-one|any|nested-composite-element)* 
 811 )>
 812     <!ATTLIST composite-element class CDATA #REQUIRED>
 813     <!ATTLIST composite-element node CDATA #IMPLIED>
 814 
 815 <!ELEMENT nested-composite-element ( 
 816     parent?,
 817     tuplizer*,
 818     (property|many-to-one|any|nested-composite-element)* 
 819 )>
 820     <!ATTLIST nested-composite-element class CDATA #REQUIRED>
 821     <!ATTLIST nested-composite-element name CDATA #REQUIRED>
 822     <!ATTLIST nested-composite-element access CDATA #IMPLIED>
 823     <!ATTLIST nested-composite-element node CDATA #IMPLIED>
 824     
 825 <!-- Declares the column name of a foreign key. -->
 826 
 827 <!ELEMENT key (column*)>
 828     <!ATTLIST key column CDATA #IMPLIED>
 829     <!ATTLIST key property-ref CDATA #IMPLIED>
 830     <!ATTLIST key foreign-key CDATA #IMPLIED>
 831     <!ATTLIST key on-delete (cascade|noaction) "noaction">
 832     <!ATTLIST key not-null (true|false) #IMPLIED>
 833     <!ATTLIST key update (true|false) #IMPLIED>
 834     <!ATTLIST key unique (true|false) #IMPLIED>
 835     
 836 <!-- Declares the type and column mapping for a collection index (array or
 837 list index, or key of a map). -->
 838 
 839 <!ELEMENT list-index (column?)>
 840     <!ATTLIST list-index column CDATA #IMPLIED>
 841     <!ATTLIST list-index base CDATA "0">
 842 
 843 <!ELEMENT map-key ((column|formula)*,type?)>
 844     <!ATTLIST map-key column CDATA #IMPLIED>
 845     <!ATTLIST map-key formula CDATA #IMPLIED>
 846     <!ATTLIST map-key type CDATA #IMPLIED>
 847     <!ATTLIST map-key length CDATA #IMPLIED>
 848     <!ATTLIST map-key node CDATA #IMPLIED>
 849 
 850 <!ELEMENT index (column*)>
 851     <!ATTLIST index column CDATA #IMPLIED>
 852     <!ATTLIST index type CDATA #IMPLIED>            <!-- required for maps -->
 853     <!ATTLIST index length CDATA #IMPLIED>
 854 
 855 <!-- Many to many association mapped to the key of a map. ie. a map keyed
 856 on entities. -->
 857 
 858 <!ELEMENT map-key-many-to-many ((column|formula)*)>
 859     <!ATTLIST map-key-many-to-many class CDATA #IMPLIED>
 860     <!ATTLIST map-key-many-to-many entity-name CDATA #IMPLIED>
 861     <!ATTLIST map-key-many-to-many column CDATA #IMPLIED>
 862     <!ATTLIST map-key-many-to-many formula CDATA #IMPLIED>
 863     <!ATTLIST map-key-many-to-many foreign-key CDATA #IMPLIED>
 864 
 865 <!ELEMENT index-many-to-many (column*)>
 866     <!ATTLIST index-many-to-many class CDATA #REQUIRED>
 867     <!ATTLIST index-many-to-many entity-name CDATA #IMPLIED>
 868     <!ATTLIST index-many-to-many column CDATA #IMPLIED>
 869     <!ATTLIST index-many-to-many foreign-key CDATA #IMPLIED>
 870 
 871 <!-- Composite index of a map ie. a map keyed on components. -->
 872 
 873 <!ELEMENT composite-map-key ( (key-property|key-many-to-one)+ )>
 874     <!ATTLIST composite-map-key class CDATA #REQUIRED>
 875 
 876 <!ELEMENT composite-index ( (key-property|key-many-to-one)+ )>
 877     <!ATTLIST composite-index class CDATA #REQUIRED>
 878 
 879 <!-- A "many to any" defines a polymorphic association to any table 
 880 with the given identifier type. The first listed column is a VARCHAR column 
 881 holding the name of the class (for that row). -->
 882 
 883 <!ELEMENT many-to-any (meta-value*,column, column+)>
 884     <!ATTLIST many-to-any id-type CDATA #REQUIRED>
 885     <!ATTLIST many-to-any meta-type CDATA #IMPLIED>            <!--- default: Hibernate.CLASS -->
 886 
 887 <!ELEMENT index-many-to-any (column, column+)>
 888     <!ATTLIST index-many-to-any id-type CDATA #REQUIRED>
 889     <!ATTLIST index-many-to-any meta-type CDATA #IMPLIED>    <!--- default: Hibernate.CLASS -->
 890 
 891 <!ELEMENT collection-id (meta*, column*, generator)>
 892     <!ATTLIST collection-id column CDATA #REQUIRED>
 893     <!ATTLIST collection-id type CDATA #REQUIRED>
 894     <!ATTLIST collection-id length CDATA #IMPLIED>
 895     
 896 <!-- Generators generate unique identifiers. The class attribute specifies a Java 
 897 class implementing an id generation algorithm. -->
 898 
 899 <!ELEMENT generator (param*)>
 900     <!ATTLIST generator class CDATA #REQUIRED>
 901 <!ELEMENT param (#PCDATA)>
 902     <!ATTLIST param name CDATA #REQUIRED>
 903 
 904 <!-- The column element is an alternative to column attributes and required for 
 905 mapping associations to classes with composite ids. -->
 906 
 907 <!ELEMENT column (comment?)>
 908     <!ATTLIST column name CDATA #REQUIRED>
 909     <!ATTLIST column length CDATA #IMPLIED>                        <!-- default: 255 -->
 910     <!ATTLIST column precision CDATA #IMPLIED>
 911     <!ATTLIST column scale CDATA #IMPLIED>
 912     <!ATTLIST column not-null (true|false) #IMPLIED>             <!-- default: false (except for id properties) -->
 913     <!ATTLIST column unique (true|false) #IMPLIED>                 <!-- default: false (except for id properties) -->
 914     <!ATTLIST column unique-key CDATA #IMPLIED>                    <!-- default: no unique key -->
 915     <!ATTLIST column sql-type CDATA #IMPLIED>                    <!-- override default column type for hibernate type -->
 916     <!ATTLIST column index CDATA #IMPLIED>
 917     <!ATTLIST column check CDATA #IMPLIED>                        <!-- default: no check constraint -->
 918     <!ATTLIST column default CDATA #IMPLIED>                    <!-- default: no default value -->
 919     <!ATTLIST column read CDATA #IMPLIED>                       <!-- default: column name -->
 920     <!ATTLIST column write CDATA #IMPLIED>                      <!-- default: parameter placeholder ('?') -->
 921 
 922 <!-- The formula and subselect elements allow us to map derived properties and 
 923 entities. -->
 924 
 925 <!ELEMENT formula (#PCDATA)>
 926 <!ELEMENT subselect (#PCDATA)>
 927 
 928 <!-- The cache element enables caching of an entity class. -->
 929 <!ELEMENT cache EMPTY>
 930     <!ATTLIST cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>                
 931     <!ATTLIST cache region CDATA #IMPLIED>                        <!-- default: class or collection role name -->
 932     <!ATTLIST cache include (all|non-lazy) "all">
 933 
 934 <!-- The comment element allows definition of a database table or column comment. -->
 935 
 936 <!ELEMENT comment (#PCDATA)>
 937 
 938 <!-- The loader element allows specification of a named query to be used for fetching
 939 an entity or collection -->
 940 
 941 <!ELEMENT loader EMPTY>
 942     <!ATTLIST loader query-ref CDATA #REQUIRED>
 943 
 944 <!-- The query element declares a named Hibernate query string -->
 945 
 946 <!ELEMENT query (#PCDATA|query-param)*>
 947     <!ATTLIST query name CDATA #REQUIRED>
 948     <!ATTLIST query flush-mode (auto|never|always) #IMPLIED>
 949     <!ATTLIST query cacheable (true|false) "false">
 950     <!ATTLIST query cache-region CDATA #IMPLIED>
 951     <!ATTLIST query fetch-size CDATA #IMPLIED>
 952     <!ATTLIST query timeout CDATA #IMPLIED>
 953     <!ATTLIST query cache-mode (get|ignore|normal|put|refresh) #IMPLIED>
 954     <!ATTLIST query read-only (true|false) #IMPLIED>
 955     <!ATTLIST query comment CDATA #IMPLIED>
 956 
 957 <!-- The sql-query element declares a named SQL query string -->
 958 
 959 <!ELEMENT sql-query (#PCDATA|return-scalar|return|return-join|load-collection|synchronize|query-param)*>
 960     <!ATTLIST sql-query name CDATA #REQUIRED>
 961     <!ATTLIST sql-query resultset-ref CDATA #IMPLIED>
 962     <!ATTLIST sql-query flush-mode (auto|never|always) #IMPLIED>
 963     <!ATTLIST sql-query cacheable (true|false) "false">
 964     <!ATTLIST sql-query cache-region CDATA #IMPLIED>
 965     <!ATTLIST sql-query fetch-size CDATA #IMPLIED>
 966     <!ATTLIST sql-query timeout CDATA #IMPLIED>
 967     <!ATTLIST sql-query cache-mode (get|ignore|normal|put|refresh) #IMPLIED>
 968     <!ATTLIST sql-query read-only (true|false) #IMPLIED>
 969     <!ATTLIST sql-query comment CDATA #IMPLIED>
 970     <!ATTLIST sql-query callable (true|false) "false">
 971 
 972 <!-- The query-param element is used only by tools that generate
 973 finder methods for named queries -->
 974 
 975 <!ELEMENT query-param EMPTY>
 976     <!ATTLIST query-param name CDATA #REQUIRED>
 977     <!ATTLIST query-param type CDATA #REQUIRED>
 978 
 979 <!-- The resultset element declares a named resultset mapping definition for SQL queries -->
 980 <!ELEMENT resultset (return-scalar|return|return-join|load-collection)*>
 981     <!ATTLIST resultset name CDATA #REQUIRED>
 982 
 983 <!--
 984     Defines a return component for a sql-query.  Alias refers to the alias
 985     used in the actual sql query; lock-mode specifies the locking to be applied
 986     when the query is executed.  The class, collection, and role attributes are mutually exclusive;
 987     class refers to the class name of a "root entity" in the object result; collection refers
 988     to a collection of a given class and is used to define custom sql to load that owned collection
 989     and takes the form "ClassName.propertyName"; role refers to the property path for an eager fetch
 990     and takes the form "owningAlias.propertyName"
 991 -->
 992 <!ELEMENT return (return-discriminator?,return-property)*>
 993     <!ATTLIST return alias CDATA #IMPLIED>
 994     <!ATTLIST return entity-name CDATA #IMPLIED>
 995     <!ATTLIST return class CDATA #IMPLIED>
 996     <!ATTLIST return lock-mode (none|read|upgrade|upgrade-nowait|write) "read">    
 997 
 998 <!ELEMENT return-property (return-column*)> 
 999     <!ATTLIST return-property name CDATA #REQUIRED>
1000     <!ATTLIST return-property column CDATA #IMPLIED>
1001 
1002 <!ELEMENT return-column EMPTY> 
1003     <!ATTLIST return-column name CDATA #REQUIRED>
1004 
1005 <!ELEMENT return-discriminator EMPTY> 
1006     <!ATTLIST return-discriminator column CDATA #REQUIRED>
1007     
1008 <!ELEMENT return-join (return-property)*> 
1009     <!ATTLIST return-join alias CDATA #REQUIRED>
1010     <!ATTLIST return-join property CDATA #REQUIRED>
1011     <!ATTLIST return-join lock-mode (none|read|upgrade|upgrade-nowait|write) "read">
1012 
1013 <!ELEMENT load-collection (return-property)*> 
1014     <!ATTLIST load-collection alias CDATA #REQUIRED>
1015     <!ATTLIST load-collection role CDATA #REQUIRED>
1016     <!ATTLIST load-collection lock-mode (none|read|upgrade|upgrade-nowait|write) "read">
1017 
1018 <!ELEMENT return-scalar EMPTY>
1019     <!ATTLIST return-scalar column CDATA #REQUIRED>
1020     <!ATTLIST return-scalar type CDATA #IMPLIED>
1021 
1022 <!ELEMENT synchronize EMPTY>
1023     <!ATTLIST synchronize table CDATA #REQUIRED>
1024     
1025 <!-- custom sql operations -->
1026 <!ELEMENT sql-insert (#PCDATA)>
1027     <!ATTLIST sql-insert callable (true|false) "false">
1028     <!ATTLIST sql-insert check (none|rowcount|param) #IMPLIED>
1029 
1030 <!ELEMENT sql-update (#PCDATA)>
1031     <!ATTLIST sql-update callable (true|false) "false">
1032     <!ATTLIST sql-update check (none|rowcount|param) #IMPLIED>
1033 
1034 <!ELEMENT sql-delete (#PCDATA)>
1035     <!ATTLIST sql-delete callable (true|false) "false">
1036     <!ATTLIST sql-delete check (none|rowcount|param) #IMPLIED>
1037 
1038 <!ELEMENT sql-delete-all (#PCDATA)>
1039     <!ATTLIST sql-delete-all callable (true|false) "false">
1040     <!ATTLIST sql-delete-all check (none|rowcount|param) #IMPLIED>
1041 
1042 <!--
1043     Element for defining "auxiliary" database objects.  Must be one of two forms:
1044 
1045     #1 :
1046         <database-object>
1047             <definition class="CustomClassExtendingAuxiliaryObject"/>
1048         </database-object>
1049 
1050     #2 :
1051         <database-object>
1052             <create>CREATE OR REPLACE ....</create>
1053             <drop>DROP ....</drop>
1054         </database-object>
1055 -->
1056 <!ELEMENT database-object ( (definition|(create,drop)), dialect-scope* )>
1057 
1058 <!ELEMENT definition EMPTY>
1059     <!ATTLIST definition class CDATA #REQUIRED>
1060 
1061 <!ELEMENT create (#PCDATA)>
1062 <!ELEMENT drop (#PCDATA)>
1063 
1064 <!--
1065     dialect-scope element allows scoping auxiliary-objects to a particular
1066     Hibernate dialect implementation.
1067 -->
1068 <!ELEMENT dialect-scope (#PCDATA)>
1069     <!ATTLIST dialect-scope name CDATA #REQUIRED>
hibernate-mapping-3.0.dtd

hibernate.properties

  1 #
  2 # Hibernate, Relational Persistence for Idiomatic Java
  3 #
  4 # License: GNU Lesser General Public License (LGPL), version 2.1 or later.
  5 # See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
  6 #
  7 
  8 ######################
  9 ### Query Language ###
 10 ######################
 11 
 12 ## define query language constants / function names
 13 
 14 hibernate.query.substitutions yes 'Y', no 'N'
 15 
 16 
 17 ## select the classic query parser
 18 
 19 #hibernate.query.factory_class org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory
 20 
 21 
 22 
 23 #################
 24 ### Platforms ###
 25 #################
 26 
 27 ## JNDI Datasource
 28 
 29 #hibernate.connection.datasource jdbc/test
 30 #hibernate.connection.username db2
 31 #hibernate.connection.password db2
 32 
 33 
 34 ## HypersonicSQL
 35 
 36 hibernate.dialect org.hibernate.dialect.HSQLDialect
 37 hibernate.connection.driver_class org.hsqldb.jdbcDriver
 38 hibernate.connection.username sa
 39 hibernate.connection.password
 40 hibernate.connection.url jdbc:hsqldb:./build/db/hsqldb/hibernate
 41 #hibernate.connection.url jdbc:hsqldb:hsql://localhost
 42 #hibernate.connection.url jdbc:hsqldb:test
 43 
 44 ## H2 (www.h2database.com)
 45 #hibernate.dialect org.hibernate.dialect.H2Dialect
 46 #hibernate.connection.driver_class org.h2.Driver
 47 #hibernate.connection.username sa
 48 #hibernate.connection.password
 49 #hibernate.connection.url jdbc:h2:mem:./build/db/h2/hibernate
 50 #hibernate.connection.url jdbc:h2:testdb/h2test
 51 #hibernate.connection.url jdbc:h2:mem:imdb1
 52 #hibernate.connection.url jdbc:h2:tcp://dbserv:8084/sample;     
 53 #hibernate.connection.url jdbc:h2:ssl://secureserv:8085/sample;     
 54 #hibernate.connection.url jdbc:h2:ssl://secureserv/testdb;cipher=AES
 55 
 56 ## MySQL
 57 #org.hibernate.dialect.MySQLDialect 配置数据方言
 58 #hibernate.dialect org.hibernate.dialect.MySQLDialect
 59 
 60 #hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
 61 
 62 #hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect
 63 #数据的四大参数配置
 64 #hibernate.connection.driver_class com.mysql.jdbc.Driver
 65 #hibernate.connection.url jdbc:mysql:///test
 66 #hibernate.connection.username gavin
 67 #hibernate.connection.password
 68 
 69 
 70 ## Oracle
 71 
 72 #hibernate.dialect org.hibernate.dialect.Oracle8iDialect
 73 #hibernate.dialect org.hibernate.dialect.Oracle9iDialect
 74 #hibernate.dialect org.hibernate.dialect.Oracle10gDialect
 75 #hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
 76 #hibernate.connection.username ora
 77 #hibernate.connection.password ora
 78 #hibernate.connection.url jdbc:oracle:thin:@localhost:1521:orcl
 79 #hibernate.connection.url jdbc:oracle:thin:@localhost:1522:XE
 80 
 81 
 82 ## PostgreSQL
 83 
 84 #hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
 85 #hibernate.connection.driver_class org.postgresql.Driver
 86 #hibernate.connection.url jdbc:postgresql:template1
 87 #hibernate.connection.username pg
 88 #hibernate.connection.password
 89 
 90 
 91 ## DB2
 92 
 93 #hibernate.dialect org.hibernate.dialect.DB2Dialect
 94 #hibernate.connection.driver_class com.ibm.db2.jcc.DB2Driver
 95 #hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver
 96 #hibernate.connection.url jdbc:db2://localhost:50000/somename
 97 #hibernate.connection.url jdbc:db2:somename
 98 #hibernate.connection.username db2
 99 #hibernate.connection.password db2
100 
101 ## TimesTen
102 
103 #hibernate.dialect org.hibernate.dialect.TimesTenDialect
104 #hibernate.connection.driver_class com.timesten.jdbc.TimesTenDriver
105 #hibernate.connection.url jdbc:timesten:direct:test
106 #hibernate.connection.username
107 #hibernate.connection.password 
108 
109 ## DB2/400
110 
111 #hibernate.dialect org.hibernate.dialect.DB2400Dialect
112 #hibernate.connection.username user
113 #hibernate.connection.password password
114 
115 ## Native driver
116 #hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver
117 #hibernate.connection.url jdbc:db2://systemname
118 
119 ## Toolbox driver
120 #hibernate.connection.driver_class com.ibm.as400.access.AS400JDBCDriver
121 #hibernate.connection.url jdbc:as400://systemname
122 
123 
124 ## Derby (not supported!)
125 
126 #hibernate.dialect org.hibernate.dialect.DerbyDialect
127 #hibernate.connection.driver_class org.apache.derby.jdbc.EmbeddedDriver
128 #hibernate.connection.username
129 #hibernate.connection.password
130 #hibernate.connection.url jdbc:derby:build/db/derby/hibernate;create=true
131 
132 
133 ## Sybase
134 
135 #hibernate.dialect org.hibernate.dialect.SybaseDialect
136 #hibernate.connection.driver_class com.sybase.jdbc2.jdbc.SybDriver
137 #hibernate.connection.username sa
138 #hibernate.connection.password sasasa
139 #hibernate.connection.url jdbc:sybase:Tds:co3061835-a:5000/tempdb
140 
141 
142 ## Mckoi SQL
143 
144 #hibernate.dialect org.hibernate.dialect.MckoiDialect
145 #hibernate.connection.driver_class com.mckoi.JDBCDriver
146 #hibernate.connection.url jdbc:mckoi:///
147 #hibernate.connection.url jdbc:mckoi:local://C:/mckoi1.0.3/db.conf
148 #hibernate.connection.username admin
149 #hibernate.connection.password nimda
150 
151 
152 ## SAP DB
153 
154 #hibernate.dialect org.hibernate.dialect.SAPDBDialect
155 #hibernate.connection.driver_class com.sap.dbtech.jdbc.DriverSapDB
156 #hibernate.connection.url jdbc:sapdb://localhost/TST
157 #hibernate.connection.username TEST
158 #hibernate.connection.password TEST
159 #hibernate.query.substitutions yes 'Y', no 'N'
160 
161 
162 ## MS SQL Server
163 
164 #hibernate.dialect org.hibernate.dialect.SQLServerDialect
165 #hibernate.connection.username sa
166 #hibernate.connection.password sa
167 
168 ## JSQL Driver
169 #hibernate.connection.driver_class com.jnetdirect.jsql.JSQLDriver
170 #hibernate.connection.url jdbc:JSQLConnect://1E1/test
171 
172 ## JTURBO Driver
173 #hibernate.connection.driver_class com.newatlanta.jturbo.driver.Driver
174 #hibernate.connection.url jdbc:JTurbo://1E1:1433/test
175 
176 ## WebLogic Driver
177 #hibernate.connection.driver_class weblogic.jdbc.mssqlserver4.Driver
178 #hibernate.connection.url jdbc:weblogic:mssqlserver4:1E1:1433
179 
180 ## Microsoft Driver (not recommended!)
181 #hibernate.connection.driver_class com.microsoft.jdbc.sqlserver.SQLServerDriver
182 #hibernate.connection.url jdbc:microsoft:sqlserver://1E1;DatabaseName=test;SelectMethod=cursor
183 
184 ## The New Microsoft Driver 
185 #hibernate.connection.driver_class com.microsoft.sqlserver.jdbc.SQLServerDriver
186 #hibernate.connection.url jdbc:sqlserver://localhost
187 
188 ## jTDS (since version 0.9)
189 #hibernate.connection.driver_class net.sourceforge.jtds.jdbc.Driver
190 #hibernate.connection.url jdbc:jtds:sqlserver://1E1/test
191 
192 ## Interbase
193 
194 #hibernate.dialect org.hibernate.dialect.InterbaseDialect
195 #hibernate.connection.username sysdba
196 #hibernate.connection.password masterkey
197 
198 ## DO NOT specify hibernate.connection.sqlDialect
199 
200 ## InterClient
201 
202 #hibernate.connection.driver_class interbase.interclient.Driver
203 #hibernate.connection.url jdbc:interbase://localhost:3060/C:/firebird/test.gdb
204 
205 ## Pure Java
206 
207 #hibernate.connection.driver_class org.firebirdsql.jdbc.FBDriver
208 #hibernate.connection.url jdbc:firebirdsql:localhost/3050:/firebird/test.gdb
209 
210 
211 ## Pointbase
212 
213 #hibernate.dialect org.hibernate.dialect.PointbaseDialect
214 #hibernate.connection.driver_class com.pointbase.jdbc.jdbcUniversalDriver
215 #hibernate.connection.url jdbc:pointbase:embedded:sample
216 #hibernate.connection.username PBPUBLIC
217 #hibernate.connection.password PBPUBLIC
218 
219 
220 ## Ingres
221 
222 ## older versions (before Ingress 2006)
223 
224 #hibernate.dialect org.hibernate.dialect.IngresDialect
225 #hibernate.connection.driver_class ca.edbc.jdbc.EdbcDriver
226 #hibernate.connection.url jdbc:edbc://localhost:II7/database
227 #hibernate.connection.username user
228 #hibernate.connection.password password
229 
230 ## Ingres 2006 or later
231 
232 #hibernate.dialect org.hibernate.dialect.IngresDialect
233 #hibernate.connection.driver_class com.ingres.jdbc.IngresDriver
234 #hibernate.connection.url jdbc:ingres://localhost:II7/database;CURSOR=READONLY;auto=multi
235 #hibernate.connection.username user
236 #hibernate.connection.password password
237 
238 ## Mimer SQL
239 
240 #hibernate.dialect org.hibernate.dialect.MimerSQLDialect
241 #hibernate.connection.driver_class com.mimer.jdbc.Driver
242 #hibernate.connection.url jdbc:mimer:multi1
243 #hibernate.connection.username hibernate
244 #hibernate.connection.password hibernate
245 
246 
247 ## InterSystems Cache
248 
249 #hibernate.dialect org.hibernate.dialect.Cache71Dialect
250 #hibernate.connection.driver_class com.intersys.jdbc.CacheDriver
251 #hibernate.connection.username _SYSTEM
252 #hibernate.connection.password SYS
253 #hibernate.connection.url jdbc:Cache://127.0.0.1:1972/HIBERNATE
254 
255 
256 #################################
257 ### Hibernate Connection Pool ###
258 #################################
259 
260 hibernate.connection.pool_size 1
261 
262 
263 
264 ###########################
265 ### C3P0 Connection Pool###
266 ###########################
267 
268 #hibernate.c3p0.max_size 2
269 #hibernate.c3p0.min_size 2
270 #hibernate.c3p0.timeout 5000
271 #hibernate.c3p0.max_statements 100
272 #hibernate.c3p0.idle_test_period 3000
273 #hibernate.c3p0.acquire_increment 2
274 #hibernate.c3p0.validate false
275 
276 
277 
278 ##############################
279 ### Proxool Connection Pool###
280 ##############################
281 
282 ## Properties for external configuration of Proxool
283 
284 hibernate.proxool.pool_alias pool1
285 
286 ## Only need one of the following
287 
288 #hibernate.proxool.existing_pool true
289 #hibernate.proxool.xml proxool.xml
290 #hibernate.proxool.properties proxool.properties
291 
292 
293 
294 #################################
295 ### Plugin ConnectionProvider ###
296 #################################
297 
298 ## use a custom ConnectionProvider (if not set, Hibernate will choose a built-in ConnectionProvider using hueristics)
299 
300 #hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider
301 #hibernate.connection.provider_class org.hibernate.connection.DatasourceConnectionProvider
302 #hibernate.connection.provider_class org.hibernate.connection.C3P0ConnectionProvider
303 #hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider
304 
305 
306 
307 #######################
308 ### Transaction API ###
309 #######################
310 
311 ## Enable automatic flush during the JTA beforeCompletion() callback
312 ## (This setting is relevant with or without the Transaction API)
313 
314 #hibernate.transaction.flush_before_completion
315 
316 
317 ## Enable automatic session close at the end of transaction
318 ## (This setting is relevant with or without the Transaction API)
319 
320 #hibernate.transaction.auto_close_session
321 
322 
323 ## the Transaction API abstracts application code from the underlying JTA or JDBC transactions
324 
325 #hibernate.transaction.factory_class org.hibernate.transaction.JTATransactionFactory
326 #hibernate.transaction.factory_class org.hibernate.transaction.JDBCTransactionFactory
327 
328 
329 ## to use JTATransactionFactory, Hibernate must be able to locate the UserTransaction in JNDI
330 ## default is java:comp/UserTransaction
331 ## you do NOT need this setting if you specify hibernate.transaction.manager_lookup_class
332 
333 #jta.UserTransaction jta/usertransaction
334 #jta.UserTransaction javax.transaction.UserTransaction
335 #jta.UserTransaction UserTransaction
336 
337 
338 ## to use the second-level cache with JTA, Hibernate must be able to obtain the JTA TransactionManager
339 
340 #hibernate.transaction.manager_lookup_class org.hibernate.transaction.JBossTransactionManagerLookup
341 #hibernate.transaction.manager_lookup_class org.hibernate.transaction.WeblogicTransactionManagerLookup
342 #hibernate.transaction.manager_lookup_class org.hibernate.transaction.WebSphereTransactionManagerLookup
343 #hibernate.transaction.manager_lookup_class org.hibernate.transaction.OrionTransactionManagerLookup
344 #hibernate.transaction.manager_lookup_class org.hibernate.transaction.ResinTransactionManagerLookup
345 
346 
347 
348 ##############################
349 ### Miscellaneous Settings ###
350 ##############################
351 
352 ## print all generated SQL to the console
353 
354 #输出底层的sql语句:true输出,false不输出
355 #hibernate.show_sql true
356 
357 
358 ## format SQL in log and console
359 #对sql语句进行格式化
360 hibernate.format_sql true
361 
362 
363 ## add comments to the generated SQL
364 
365 #hibernate.use_sql_comments true
366 
367 
368 ## generate statistics
369 
370 #hibernate.generate_statistics true
371 
372 
373 ## auto schema export
374 #ddl数据定义语言
375 #hibernate.hbm2ddl.auto create-drop
376 #hibernate.hbm2ddl.auto create
377 #自动创建并更新表(有表,更新)
378 #hibernate.hbm2ddl.auto update
379 #hibernate.hbm2ddl.auto validate
380 
381 
382 ## specify a default schema and catalog for unqualified tablenames
383 
384 #hibernate.default_schema test
385 #hibernate.default_catalog test
386 
387 
388 ## enable ordering of SQL UPDATEs by primary key
389 
390 #hibernate.order_updates true
391 
392 
393 ## set the maximum depth of the outer join fetch tree
394 
395 hibernate.max_fetch_depth 1
396 
397 
398 ## set the default batch size for batch fetching
399 
400 #hibernate.default_batch_fetch_size 8
401 
402 
403 ## rollback generated identifier values of deleted entities to default values
404 
405 #hibernate.use_identifer_rollback true
406 
407 
408 ## enable bytecode reflection optimizer (disabled by default)
409 
410 #hibernate.bytecode.use_reflection_optimizer true
411 
412 
413 
414 #####################
415 ### JDBC Settings ###
416 #####################
417 
418 ## specify a JDBC isolation level
419 
420 #hibernate.connection.isolation 4
421 
422 
423 ## enable JDBC autocommit (not recommended!)
424 
425 #hibernate.connection.autocommit true
426 
427 
428 ## set the JDBC fetch size
429 
430 #hibernate.jdbc.fetch_size 25
431 
432 
433 ## set the maximum JDBC 2 batch size (a nonzero value enables batching)
434 
435 #hibernate.jdbc.batch_size 5
436 #hibernate.jdbc.batch_size 0
437 
438 
439 ## enable batch updates even for versioned data
440 
441 hibernate.jdbc.batch_versioned_data true
442 
443 
444 ## enable use of JDBC 2 scrollable ResultSets (specifying a Dialect will cause Hibernate to use a sensible default)
445 
446 #hibernate.jdbc.use_scrollable_resultset true
447 
448 
449 ## use streams when writing binary types to / from JDBC
450 
451 hibernate.jdbc.use_streams_for_binary true
452 
453 
454 ## use JDBC 3 PreparedStatement.getGeneratedKeys() to get the identifier of an inserted row
455 
456 #hibernate.jdbc.use_get_generated_keys false
457 
458 
459 ## choose a custom JDBC batcher
460 
461 # hibernate.jdbc.factory_class
462 
463 
464 ## enable JDBC result set column alias caching 
465 ## (minor performance enhancement for broken JDBC drivers)
466 
467 # hibernate.jdbc.wrap_result_sets
468 
469 
470 ## choose a custom SQL exception converter
471 
472 #hibernate.jdbc.sql_exception_converter
473 
474 
475 
476 ##########################
477 ### Second-level Cache ###
478 ##########################
479 
480 ## optimize cache for minimal "puts" instead of minimal "gets" (good for clustered cache)
481 
482 #hibernate.cache.use_minimal_puts true
483 
484 
485 ## set a prefix for cache region names
486 
487 hibernate.cache.region_prefix hibernate.test
488 
489 
490 ## disable the second-level cache
491 
492 #hibernate.cache.use_second_level_cache false
493 
494 
495 ## enable the query cache
496 
497 #hibernate.cache.use_query_cache true
498 
499 
500 ## store the second-level cache entries in a more human-friendly format
501 
502 #hibernate.cache.use_structured_entries true
503 
504 
505 ## choose a cache implementation
506 
507 #hibernate.cache.region.factory_class org.hibernate.cache.infinispan.InfinispanRegionFactory
508 #hibernate.cache.region.factory_class org.hibernate.cache.infinispan.JndiInfinispanRegionFactory
509 #hibernate.cache.region.factory_class org.hibernate.cache.internal.EhCacheRegionFactory
510 #hibernate.cache.region.factory_class org.hibernate.cache.internal.SingletonEhCacheRegionFactory
511 hibernate.cache.region.factory_class org.hibernate.cache.internal.NoCachingRegionFactory
512 
513 ## choose a custom query cache implementation
514 
515 #hibernate.cache.query_cache_factory
516 
517 
518 
519 ############
520 ### JNDI ###
521 ############
522 
523 ## specify a JNDI name for the SessionFactory
524 
525 #hibernate.session_factory_name hibernate/session_factory
526 
527 
528 ## Hibernate uses JNDI to bind a name to a SessionFactory and to look up the JTA UserTransaction;
529 ## if hibernate.jndi.* are not specified, Hibernate will use the default InitialContext() which
530 ## is the best approach in an application server
531 
532 #file system
533 #hibernate.jndi.class com.sun.jndi.fscontext.RefFSContextFactory
534 #hibernate.jndi.url file:/
535 
536 #WebSphere
537 #hibernate.jndi.class com.ibm.websphere.naming.WsnInitialContextFactory
538 #hibernate.jndi.url iiop://localhost:900/
hibernate.properties
原文地址:https://www.cnblogs.com/geore/p/7470454.html