home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / repository.dtd < prev    next >
Encoding:
Text File  |  2004-07-12  |  34.6 KB  |  925 lines

  1. <!-- @version $Id: repository.dtd,v 1.2 2004/02/16 19:51:47 joerg Exp $ -->
  2. <!--
  3.     ObJectRelationalBridge - Bridging Java objects and relational dabatases
  4.     This DTD describes the grammar of the Descriptor repository
  5.     Author: Thomas Mahler, (c) 2000, 2001, 2002, 2003
  6.   -->
  7.  
  8. <!--
  9.     The descriptor-repository is the root element of a
  10.     repository.xml file.
  11.     It consists of one jdbc-connection-descriptor and at least one
  12.     class-descriptor element.
  13.  
  14.     The attribute element allows to add custom attributes.
  15.  
  16.     The jdbc-connection-descriptor element specifies the default jdbc
  17.     connection for the repository.
  18.  
  19.     class-descriptor elements specify o/r mapping information for
  20.     persistent classes.
  21.   -->
  22. <!ELEMENT descriptor-repository (documentation?, attribute*,
  23.         jdbc-connection-descriptor*, class-descriptor*)>
  24.  
  25. <!--
  26.     The version attribute is used to bind a repository.xml
  27.     file to a given version of this dtd. This will help to
  28.     avoid versions conflicts.
  29.  
  30.     The isolation attribute defines the default isolation level for
  31.     class-descriptor on ODMG api level that do not define a
  32.     specific isolation level (this does NOT touch the jdbc-level
  33.     of the connection).
  34.   -->
  35. <!ATTLIST descriptor-repository
  36.     version (1.0) #REQUIRED
  37.     isolation-level (read-uncommitted | read-committed | repeatable-read |
  38.                      serializable | optimistic) "read-uncommitted"
  39.     proxy-prefetching-limit CDATA "50"
  40. >
  41.  
  42. <!--
  43.     The documentation element can be used to store arbitrary
  44.     information on all repository entries.
  45. -->
  46. <!ELEMENT documentation (#PCDATA)>
  47.  
  48. <!--
  49.     The attribute element allows to add custom attributes.
  50.  
  51.     The jdbc-connection-descriptor element specifies the a jdbc
  52.     connection for the repository.
  53.  
  54.     The object-cache element specifies the object-cache implementation
  55.     class associated with this class.
  56.  
  57.     A connection-pool element may be used to define connection pool
  58.     properties for the specified JDBC connection.
  59.  
  60.     A sequence-manager element may be used to
  61.     define which sequence manager implementation should be used within
  62.     the defined connection.
  63.   -->
  64. <!ELEMENT jdbc-connection-descriptor (documentation?, attribute*,
  65.                 object-cache?, connection-pool?, sequence-manager?)>
  66.  
  67. <!--
  68.     The jcdAlias attribute is a shortcut name for the defined connection
  69.     descriptor. OJB use jcdAlias as key for the defined connections.
  70.  
  71.     The default-connection attribute used to define if this connection
  72.     should used as default connection with OJB. You could define only
  73.     one connection as default connection. It is also possible to set
  74.     the default connection at runtime using
  75.     PersistenceBrokerFactory#setDefaultKey(...) method.
  76.     If set 'true' you could use on PB-api a shortcut-method of the
  77.     PersistenceBrokerFactory to lookup PersistenceBroker instances.
  78.  
  79.     The platform attribute is used to define the specific RDBMS
  80.     Platform. This attribute corresponds to a
  81.     org.apache.ojb.broker.platforms.PlatformXXXImpl class.
  82.  
  83.     The jdbc-level attribute is used to specify the Jdbc compliance
  84.     level of the used Jdbc driver.
  85.  
  86.     The eager-release attribute was adopt to solve a problem occured when
  87.     using OJB within JBoss (3.0 <= version < 3.2.2, seems to be fixed in jboss 3.2.2).
  88.     Only use within JBoss.
  89.  
  90.     The batch-mode attribute allow to set batch mode modus global
  91.     from the used connection. It is also possible to change
  92.     batch mode at runtime, using the
  93.     PB.serviceConnectionManager.setBatchMode(...) method.
  94.  
  95.     The useAutoCommit attribute allow to set how OJB uses
  96.     the autoCommit state of the used connections. The default mode
  97.     was 1. When using mode 0 or 2 with the PB-api, you must use PB
  98.     transaction demarcation.
  99.     0 - OJB ignores the autoCommit setting of the connection and do not
  100.         try to change it. This mode could be helpfully if the
  101.         connection don't let you set the autoCommit state
  102.         (e.g. using datasources from application server).
  103.     1 - set autoCommit explicit 'true' when connection was created
  104.         and temporary set to 'false' when necessary (default mode).
  105.     2 - set autoCommit explicit 'false' when connection was created.
  106.  
  107.     If the ignoreAutoCommitExceptions attribute is set 'true', all
  108.     exceptions caused by setting autocommit state, will be ignored.
  109.     Default mode 'false'.
  110.  
  111.     If a jndi-datasource-name for JNDI based lookup of Jdbc
  112.     connections is specified, the four attributes driver, protocol,
  113.     subprotocol, dbalias used for Jdbc DriverManager based construction
  114.     of Jdbc Connections must not be declared.
  115.  
  116.     The username and password attributes are used as credentials
  117.     for obtaining a jdbc connections.
  118.     If users don't want to keep this information the
  119.     repository.xml file, they could pass user/password
  120.     using PBKey.java to obtain a PersistenceBroker
  121.   -->
  122. <!ATTLIST jdbc-connection-descriptor
  123.     jcd-alias CDATA #REQUIRED
  124.     default-connection (true | false) "false"
  125.     platform (Db2 | Hsqldb | Informix | MsAccess | MsSQLServer |
  126.               MySQL | Oracle | PostgreSQL | Sybase | SybaseASE |
  127.               SybaseASA | Sapdb | Firebird | Axion | NonstopSql |
  128.               Oracle9i | MaxDB ) "Hsqldb"
  129.     jdbc-level (1.0 | 2.0 | 3.0) "1.0"
  130.     eager-release (true | false) "false"
  131.     batch-mode (true | false) "false"
  132.     useAutoCommit (0 | 1 | 2) "1"
  133.     ignoreAutoCommitExceptions (true | false) "false"
  134.  
  135.     jndi-datasource-name CDATA #IMPLIED
  136.  
  137.     driver CDATA #IMPLIED
  138.     protocol CDATA #IMPLIED
  139.     subprotocol CDATA #IMPLIED
  140.     dbalias CDATA #IMPLIED
  141.  
  142.     username CDATA #IMPLIED
  143.     password CDATA #IMPLIED
  144. >
  145.  
  146.  
  147. <!--
  148.     The object-cache element can be used to specify the ObjectCache
  149.     implementation used by OJB. There are three levels of
  150.     declaration:
  151.         1. in OJB.properties file, to declare the standard (default)
  152.         ObjectCache implementation.
  153.         2. on jdbc-connection-descriptor level, to declare ObjectCache implementation
  154.         on a per connection/user level
  155.         3. on class-descriptor level, to declare ObjectCache implementation
  156.         on a per class level
  157.  
  158.     The priority of the declared object-cache elements are:
  159.     per class > per jdbc descriptor > standard
  160.  
  161.     E.g. if you declare ObjectCache 'cacheDef' as standard, set
  162.     ObjectCache 'cacheA' in class-descriptor for class A and class B
  163.     does not declare an object-cache element. Then OJB use cacheA as ObjectCache
  164.     for class A and cacheDef for class B
  165. -->
  166. <!ELEMENT object-cache (documentation?, attribute*)>
  167.  
  168. <!--
  169.     Attribute 'class' specifies the full qualified class name of
  170.     the used ObjectCache implementation.
  171. -->
  172. <!ATTLIST object-cache
  173.     class                          CDATA #REQUIRED
  174. >
  175.  
  176.  
  177. <!--
  178.     The connection-pool element specifies the connection pooling
  179.     parameter.
  180. -->
  181. <!ELEMENT connection-pool (documentation?)>
  182.  
  183.  
  184. <!--
  185.     maxActive
  186.     maximum number of connections that can be borrowed from the
  187.     pool at one time. When non-positive, there is no limit.
  188.  
  189.     maxIdle
  190.     controls the maximum number of connections that can sit idle in the
  191.     pool at any time. When non-positive, there is no limit
  192.  
  193.     maxWait
  194.     max time block to get connection instance from pool, after that exception is thrown.
  195.     When non-positive, block till last judgement
  196.  
  197.     whenExhaustedAction
  198.     0 - fail when pool is exhausted
  199.     1 - block when pool is exhausted
  200.     2 - grow when pool is exhausted
  201.  
  202.     testOnBorrow
  203.     The pool will attempt to validate each object before it is returned from the pool
  204.  
  205.     testOnReturn
  206.     The pool will attempt to validate each object before it is returned to the pool
  207.  
  208.     testWhileIdle
  209.     Indicates whether or not idle objects should be validated.
  210.     Objects that fail to validate will be dropped from the pool
  211.  
  212.     timeBetweenEvictionRunsMillis
  213.     indicates how long the eviction thread should sleep before "runs" of examining
  214.     idle objects. When non-positive, no eviction thread will be launched.
  215.  
  216.     minEvictableIdleTimeMillis
  217.     specifies the minimum amount of time that a connection may sit idle
  218.     in the pool before it is eligable for eviction due to idle time.
  219.     When non-positive, no connection will be dropped from the pool due
  220.     to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
  221.  
  222.     numTestsPerEvictionRun
  223.     The number of connections to examine during each run of the
  224.     idle object evictor thread (if any)
  225.  
  226.     validationQuery
  227.     Here you could specify a validation query used by pool to test a
  228.     obtained connection (e.g. "select 1 from dual"), else a default query was
  229.     used - if defined in the platform class for your database.
  230.  
  231.     logAbandoned
  232.     Only supported when using
  233.     org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
  234.     ConnectionFactory implementation.
  235.     Flag to log stack traces for application code which abandoned
  236.     a Statement or Connection. Defaults to false. Logging of
  237.     abandoned Statements and Connections adds overhead for
  238.     every Connection open or new Statement because a
  239.     stack trace has to be generated.
  240.  
  241.     removeAbandoned/removeAbandonedTimeout
  242.     Only supported when using
  243.     org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
  244.     ConnectionFactory implementation.
  245.     Flag to remove abandoned connections if they exceed the
  246.     removeAbandonedTimeout. Set to true or false, default false.
  247.     If set to true a connection is considered abandoned and
  248.     eligible for removal if it has been idle longer than the
  249.     removeAbandonedTimeout. Setting this to true can recover
  250.     db connections from poorly written applications which
  251.     fail to close a connection.
  252.  
  253. -->
  254. <!ATTLIST connection-pool
  255.     maxActive                       CDATA #IMPLIED
  256.     maxIdle                         CDATA #IMPLIED
  257.     maxWait                         CDATA #IMPLIED
  258.     minEvictableIdleTimeMillis      CDATA #IMPLIED
  259.     numTestsPerEvictionRun          CDATA #IMPLIED
  260.     testOnBorrow                    (true|false) #IMPLIED
  261.     testOnReturn                    (true|false) #IMPLIED
  262.     testWhileIdle                   (true|false) #IMPLIED
  263.     timeBetweenEvictionRunsMillis   CDATA #IMPLIED
  264.     whenExhaustedAction             (0|1|2) #IMPLIED
  265.     validationQuery                 CDATA #IMPLIED
  266.  
  267.     logAbandoned                    (true|false) #IMPLIED
  268.     removeAbandoned                 (true|false) #IMPLIED
  269.     removeAbandonedTimeout          CDATA #IMPLIED
  270. >
  271.  
  272.  
  273.  
  274. <!--
  275.     The sequence-manager element specifies the sequence
  276.     manager implementation used for key generation. All
  277.     sequence manager implementations shipped with OJB
  278.     you will find under org.apache.ojb.broker.util.sequence
  279.     If no sequence-manager is defined, OJB use a default one.
  280.     For configuration examples please consult documentation.
  281.  
  282.     Use the attribute element to pass implementation specific
  283.     properties. This depends on the used implementation class.
  284. -->
  285. <!ELEMENT sequence-manager (documentation?, attribute*)>
  286.  
  287. <!--
  288.     The className attribute represents the full qualified class name
  289.     of the desired sequence manager implementation - it is mandatory
  290.     when using the sequence-manager element.
  291.     All sequence manager implementations you find will under
  292.     org.apache.ojb.broker.util.sequence package named as SequenceManagerXXXImpl.
  293.     For configuration examples please consult documentation.
  294. -->
  295. <!ATTLIST sequence-manager
  296.     className                       CDATA #REQUIRED
  297. >
  298.  
  299.  
  300.  
  301. <!--
  302.     For interfaces or abstract classes a class-descriptor holds a sequence of
  303.     extent-class elements.
  304.  
  305.     For concrete classes it must have field-descriptors that describe primitive
  306.     typed instance variables.
  307.     References to other persistent entity classes are specified by
  308.     reference-descriptor elements.
  309.     Collections or arrays attributes that contain other persistent entity
  310.     classes are specified by collection-descriptor elements
  311.  
  312.     Concrete base classes, may specify a sequence of extent-class elements,
  313.     naming the derived classes.
  314.  
  315.     A class-descriptor may contain user defined custom attribute elements.
  316.  
  317.     The insert-procedure, update-procedure and delete-procedure elements
  318.     identify the procedure/function that is defined in the database which
  319.     will handle the insertion, update or deletion of an instance of this
  320.     class.  These elements are all optional.  If they are absent then basic
  321.     sql statements (INSERT INTO xxx..., UPDATE xxx, DELETE FROM xxx) will
  322.     be utilized.
  323.  
  324.   -->
  325. <!ELEMENT class-descriptor
  326.     ((documentation?, extent-class+, attribute*) |
  327.     (documentation?, object-cache?, extent-class*, field-descriptor+,
  328.      reference-descriptor*, collection-descriptor*,
  329.      index-descriptor*, attribute*,
  330.      insert-procedure?, update-procedure?, delete-procedure?))>
  331.  
  332.  
  333. <!--
  334.     The class attribute contains the full qualified name of the specified class.
  335.     As this attribute is of type ID there can only be one class-descriptor per
  336.     class.
  337.  
  338.     The isolation-level attribute specifies the transactional isolation to be
  339.     used for this class on ODMG api level (this does NOT touch the jdbc-level
  340.     of the connection).
  341.  
  342.     If the proxy attribute is set, proxies are used for all loading operations
  343.     of instances of this class. If set to "dynamic", dynamic proxies are used.
  344.     If set to another value this value is interpreted as the full-qualified
  345.     name of the proxy class to use.
  346.  
  347.     If the proxy-prefetching-limit attribute (used with the proxy attribute)
  348.     is set to the value > 0, the collections of objects of this class are materialized
  349.     by groups of the specified size, say when user tries to access the first
  350.     object of the collection, next proxy-prefetching-limit objects are loaded
  351.     by one database query.
  352.     Set this parameter to 0 if you want to turn this feature off.
  353.  
  354.     The schema attribute may contain the database schema owning the table
  355.     mapped to this class.
  356.  
  357.     The table attribute specifies the table name this class is mapped to.
  358.  
  359.     The row-reader attribute may contain a full qualified class name.
  360.     This class will be used as the RowReader implementation used to
  361.     materialize instances of the persistent class.
  362.  
  363.     The accept-locks attribute specifies whether implicit locking should
  364.     propagate to this class.  Currently relevant for the ODMG layer only.
  365.  
  366.     The optional initialization-method specifies a no-argument instance
  367.     method that is invoked after reading an instance from a database row.
  368.     It can be used to do initialization and validations.
  369.  
  370.     The optional factory-class specifies a factory-class that
  371.     that is to be used instead of a no argument constructor.
  372.     If the factory-class is specified the factory-method
  373.     also must be defined.
  374.     factory-method refers to a static no-argument method
  375.     of the factory-class class.
  376.  
  377.     The refresh attribute can be set to true to force OJB to refresh
  378.     instances when loaded from cache. It's set to false by default.
  379.   -->
  380. <!ATTLIST class-descriptor
  381.     class ID #REQUIRED
  382.     isolation-level (read-uncommitted | read-committed | repeatable-read |
  383.                      serializable | optimistic) "read-uncommitted"
  384.     proxy CDATA #IMPLIED
  385.     proxy-prefetching-limit CDATA #IMPLIED
  386.     schema CDATA #IMPLIED
  387.     table CDATA #IMPLIED
  388.     row-reader CDATA #IMPLIED
  389.     extends IDREF #IMPLIED
  390.     accept-locks (true | false) "true"
  391.     initialization-method CDATA #IMPLIED
  392.     factory-class CDATA #IMPLIED
  393.     factory-method CDATA #IMPLIED
  394.     refresh (true | false) "false"
  395. >
  396.  
  397.  
  398. <!--
  399.     An extent-class element is used to specify an implementing class or a
  400.     derived class that belongs to the extent of all instances of the interface
  401.     or base class.
  402.   -->
  403. <!ELEMENT extent-class (documentation?)>
  404. <!--
  405.     The class-ref attribute must contain a fully qualified classname.
  406.     The repository file must contain a class-descriptor for this class.
  407.   -->
  408. <!ATTLIST extent-class
  409.     class-ref IDREF #REQUIRED
  410. >
  411.  
  412. <!--
  413.   A field descriptor contains mapping info for a primitive typed
  414.   attribute of a persistent class.
  415.  
  416.   A field descriptor may contain custom attribute elements.
  417.   -->
  418. <!ELEMENT field-descriptor (documentation?, attribute*)>
  419. <!--
  420.     <b>The id attribute is optional.</b> If not specified, OJB internally
  421.     sorts field-descriptors according to their order of appearance in the
  422.     repository file.
  423.     If a different sort order is intended the id attribute may be used to
  424.     hold a unique number identifying the decriptors position in the sequence of
  425.     field-descriptors.
  426.     The order of the numbers for the field-descriptors must correspond to
  427.     the order of columns in the mapped table.
  428.  
  429.     The name attribute holds the name of the persistent classes attribute.
  430.     If the PersistentFieldDefaultImpl is used there must be an attribute
  431.     in the persistent class with this name.
  432.     If the PersistentFieldPropertyImpl is used there must be a JavaBeans
  433.     compliant property of this name.
  434.  
  435.     The table attribute may specify a table different from the mapped
  436.     table for the persistent class. (currently not implemented).
  437.  
  438.     The column attribute specifies the column the persistent classes field
  439.     is mapped to.
  440.  
  441.     The optional jdbc-type attribute specifies the JDBC type of the column.
  442.     If not specified OJB tries to identify the JDBC type by inspecting the
  443.     Java attribute by reflection.
  444.  
  445.     The primarykey specifies if the column is a primary key column.
  446.  
  447.     The nullable attribute specifies if the column may contain null values.
  448.  
  449.     The indexed attribute specifies if there is an index on this column
  450.  
  451.     The autoincrement attribute specifies if the values for the persistent
  452.     attribute are automatically generated by OJB.
  453.  
  454.     The sequence-name attribute can be used to state explicitly a sequence
  455.     name used by the sequence manager implementations. Check the docs/javadocs
  456.     of the used sequence manager implementation to get information if this
  457.     is a mandatory attribute. OJB standard sequence manager implementations
  458.     build a sequence name by its own, if the attribute was not set.
  459.  
  460.     The locking attribute is set to true if the persistent attribute is
  461.     used for optimistic locking. can only be set for TIMESTAMP and INTEGER
  462.     columns.
  463.  
  464.     The updatelock attribute is set to false if the persistent attribute is
  465.     used for optimistic locking AND the dbms should update the lock column
  466.     itself. The default is true which means that when locking is true then
  467.     OJB will update the locking fields. Can only be set for TIMESTAMP and INTEGER
  468.     columns.
  469.  
  470.     The default-fetch attribute specifies whether the persistent attribute
  471.     belongs to the JDO default fetch group.
  472.  
  473.     The conversion attribute contains a fully qualified class name.
  474.     This class must implement the interface
  475.     org.apache.ojb.accesslayer.conversions.FieldConversion.
  476.     A FieldConversion can be used to implement conversions between Java-
  477.     attributes and database columns.
  478.  
  479.     The length attribute can be used to specify a length setting, if
  480.     required by the jdbc-type of the underlying database column.
  481.  
  482.     The precision attribute can be used to specify a precision setting, if
  483.     required by the jdbc-type of the underlying database column.
  484.  
  485.     The scale attribute can be used to specify a scale setting, if
  486.     required by the jdbc-type of the underlying database column.
  487.  
  488.     The access attribute specifies the accessibility of the field.
  489.     "readonly" marks fields that are not to modified. "readwrite" marks
  490.     fields that may be read and written to. "anonymous" marks anonymous fields.
  491.     An anonymous field has a database representation (column) but no
  492.     corresponding Java attribute. Hence the name of such a field does not
  493.     refer to a Java attribute of the class, but is used as a unique
  494.     identifier only.
  495.  
  496.   -->
  497. <!ATTLIST field-descriptor
  498.     id CDATA #IMPLIED
  499.     name CDATA #REQUIRED
  500.     table CDATA #IMPLIED
  501.     column CDATA #REQUIRED
  502.     jdbc-type (BIT | TINYINT | SMALLINT | INTEGER | BIGINT | DOUBLE |
  503.                FLOAT | REAL | NUMERIC | DECIMAL | CHAR | VARCHAR |
  504.                LONGVARCHAR | DATE | TIME | TIMESTAMP | BINARY |
  505.                VARBINARY | LONGVARBINARY | CLOB | BLOB | STRUCT |
  506.                ARRAY | REF | BOOLEAN | DATALINK) #IMPLIED
  507.     primarykey (true | false) "false"
  508.     nullable (true | false) "true"
  509.     indexed (true | false) "false"
  510.     autoincrement (true | false) "false"
  511.     sequence-name CDATA #IMPLIED
  512.     locking (true | false) "false"
  513.     update-lock (true | false) "true"
  514.     default-fetch (true | false) "false"
  515.     conversion CDATA #IMPLIED
  516.     length CDATA #IMPLIED
  517.     precision CDATA #IMPLIED
  518.     scale CDATA #IMPLIED
  519.     access (readonly | readwrite | anonymous) "readwrite"
  520. >
  521.  
  522.  
  523. <!--
  524.   An attribute element allows arbitrary name/value pairs to
  525.   be represented in the repository.
  526.   -->
  527. <!ELEMENT attribute (documentation?)>
  528.  
  529. <!--
  530.     The attribute-name identifies the name of the attribute.
  531.     The attribute-value identifies the value of the attribute.
  532. -->
  533. <!ATTLIST attribute
  534.     attribute-name CDATA #REQUIRED
  535.     attribute-value CDATA #REQUIRED
  536. >
  537.  
  538. <!--
  539.     A reference-descriptor contains mapping info for an attribute of a
  540.     persistent class that is not primitive but references another
  541.     persistent entity Object.
  542.  
  543.     A foreignkey element contains information on foreign key columns that
  544.     implement the association on the database level.
  545.  
  546.     A reference-decriptor may contain user defined attribute elements.
  547.   -->
  548. <!ELEMENT reference-descriptor (documentation?, foreignkey+, attribute*)>
  549. <!--
  550.     The name attribute holds the name of the persistent classes attribute.
  551.     If the PersistentFieldDefaultImpl is used there must be an attribute
  552.     in the persistent class with this name.
  553.     If the PersistentFieldPropertyImpl is used there must be a JavaBeans
  554.     compliant property of this name.
  555.  
  556.     The class-ref attribute contains a fully qualified class name.
  557.     This class is the Object type of the persistent reference attribute.
  558.     As this is an IDREF there must be a class-descriptor for this class
  559.     in the repository too.
  560.  
  561.     The proxy attribute can be set to true to specify that proxy based
  562.     lazy loading should be used for this attribute.
  563.  
  564.     If the proxy-prefetching-limit attribute (used with the proxy attribute)
  565.     is set to the value > 0, then loading of the reference for the first
  566.     object of some collection causes loading of the references for
  567.     the next proxy-prefetching-limit objects.
  568.     Set this parameter to 0 if you want to turn this feature off.
  569.  
  570.     The refresh attribute can be set to true to force OJB to refresh
  571.     object references on instance loading.
  572.  
  573.     The auto-retrieve attribute specifies whether OJB automatically retrieves
  574.     this reference attribute on loading the persistent object.
  575.     If set to false the reference attribute is set to null. In this case the
  576.     user is responsible to fill the reference attribute.
  577.  
  578.     The auto-update attribute specifies whether OJB automatically stores
  579.     this reference attribute on storing the persistent object.
  580.     This attribute must be set to false if using the OTM, ODMG or JDO layer.
  581.  
  582.     The auto-delete attribute specifies whether OJB automatically deletes
  583.     this reference attribute on deleting the persistent object.
  584.     This attribute must be set to false if using the OTM, ODMG or JDO layer.
  585.  
  586.     The otm-dependent attribute specifies whether the OTM layer automatically
  587.     creates the referred object or deletes it if the reference field is set to null.
  588.     Also otm-dependent references behave as if auto-update and auto-delete
  589.     were set to true, but the auto-update and auto-delete attributes themself
  590.     must be always set to false for use with OTM layer.
  591.  
  592.   -->
  593. <!ATTLIST reference-descriptor
  594.     name CDATA #REQUIRED
  595.     class-ref IDREF #REQUIRED
  596.  
  597.     proxy (true | false) "false"
  598.     proxy-prefetching-limit CDATA #IMPLIED
  599.     refresh (true | false) "false"
  600.  
  601.     auto-retrieve (true | false) "true"
  602.     auto-update (true | false) "false"
  603.     auto-delete (true | false) "false"
  604.     otm-dependent (true | false) "false"
  605. >
  606.  
  607. <!--
  608.     A foreignkey element contains information on a foreign-key persistent
  609.     attribute that implement the association on the database level.
  610.   -->
  611. <!ELEMENT foreignkey (documentation?)>
  612. <!--
  613.     The field-id-ref contains the id attribute of the field-descriptor
  614.     used as a foreign key.
  615.   -->
  616. <!ATTLIST foreignkey
  617.     field-id-ref CDATA #IMPLIED
  618.     field-ref CDATA #IMPLIED
  619. >
  620.  
  621.  
  622. <!--
  623.     A collection-descriptor contains mapping info for a Collection- or
  624.     Array-attribute of a  persistent class that contains persistent
  625.     entity Objects.
  626.  
  627.     The inverse-foreignkey elements contains information on foreign-key
  628.     attributes that implement the association on the database level.
  629.  
  630.     The fk-pointing-to-this-class and fk-pointing-to-element-class elements
  631.     are only needed if the Collection or array implements a m:n association.
  632.     In this case they contain information on the foreign-key columns of
  633.     the intermediary table.
  634.  
  635.     A collection-descriptor may contain user defined attribute elements.
  636.   -->
  637. <!ELEMENT collection-descriptor (
  638.     documentation?,
  639.     orderby*,
  640.     inverse-foreignkey*,
  641.     fk-pointing-to-this-class*,
  642.     fk-pointing-to-element-class*,
  643.     query-customizer?,
  644.     attribute*)>
  645.  
  646.  
  647. <!--
  648.     The name attribute holds the name of the persistent classes attribute.
  649.     If the PersistentFieldDefaultImpl is used there must be an attribute
  650.     in the persistent class with this name.
  651.     If the PersistentFieldPropertyImpl is used there must be a JavaBeans
  652.     compliant property of this name.
  653.  
  654.     The collection-class may hold a fully qualified class name.
  655.     This class must be the Java type of the Collection attribute.
  656.     This attribute must only specified if the attribute type is not
  657.     a java.util.Collection (or subclass) or Array type.
  658.  
  659.     The element-class-ref attribute contains a fully qualified class name.
  660.     This class is the Object type of the elements of persistent collection
  661.     or Array attribute.
  662.     As this is an IDREF there must be a class-descriptor for this class
  663.     in the repository too.
  664.  
  665.     The orderby attribute may specify a field of the element class.
  666.     The Collection or Array will be sorted according to the specified attribute.
  667.     The sort attribute may be used to specify ascending or descending order for
  668.     this operation.
  669.  
  670.     The indirection-table must specify the name of an intermediary table,
  671.     if the persistent collection attribute implements a m:n association.
  672.  
  673.     The proxy attribute can be set to true to specify that proxy based
  674.     lazy loading should be used for this attribute.
  675.  
  676.     If the proxy-prefetching-limit attribute (used with the proxy attribute)
  677.     is set to the value > 0, then loading of the collection for the first
  678.     object of some other collection causes loading of the collections for
  679.     the next proxy-prefetching-limit objects.
  680.     Set this parameter to 0 if you want to turn this feature off.
  681.  
  682.     The refresh attribute can be set to true to force OJB to refresh
  683.     object and collection references on instance loading.
  684.  
  685.     The auto-retrieve attribute specifies whether OJB automatically retrieves
  686.     this attribute on loading the persistent object.
  687.     If set to false the persistent attribute is set to null. In this case the
  688.     user is responsible to fill the persistent attribute.
  689.  
  690.     The auto-update attribute specifies whether OJB automatically stores
  691.     this reference attribute on storing the persistent object.
  692.     This attribute must be set to false if using the OTM, ODMG or JDO layer.
  693.  
  694.     The auto-delete attribute specifies whether OJB automatically deletes
  695.     this reference attribute on deleting the persistent object.
  696.     This attribute must be set to false if using the OTM, ODMG or JDO layer.
  697.  
  698.     The otm-dependent attribute specifies whether the OTM layer automatically
  699.     creates collection elements that were included into the collectionelements
  700.     and deletes collection elements that were excluded from the collection.
  701.     Also otm-dependent references behave as if auto-update and auto-delete
  702.     were set to true, but the auto-update and auto-delete attributes themself
  703.     must be always set to false for use with OTM layer.
  704.  
  705.  
  706.   -->
  707. <!ATTLIST collection-descriptor
  708.     name CDATA #IMPLIED
  709.     collection-class CDATA #IMPLIED
  710.     element-class-ref IDREF #REQUIRED
  711.     orderby CDATA #IMPLIED
  712.     sort (ASC | DESC) "ASC"
  713.  
  714.     indirection-table CDATA #IMPLIED
  715.  
  716.     proxy (true | false) "false"
  717.     proxy-prefetching-limit CDATA #IMPLIED
  718.     refresh (true | false) "false"
  719.  
  720.     auto-retrieve (true | false) "true"
  721.     auto-update (true | false) "false"
  722.     auto-delete (true | false) "false"
  723.     otm-dependent (true | false) "false"
  724. >
  725.  
  726. <!--
  727.     an OrderBy elemnent contains an attribute name and a sort order
  728.   -->
  729. <!ELEMENT orderby (documentation?)>
  730. <!ATTLIST orderby
  731.     name CDATA #REQUIRED
  732.     sort (ASC | DESC) "ASC"
  733. >
  734.  
  735. <!--
  736.     A inverse-foreignkey element contains information on a foreign-key
  737.     persistent attribute that implement the association on the database level.
  738.   -->
  739. <!ELEMENT inverse-foreignkey (documentation?)>
  740. <!--
  741.     The field-id-ref contains the id attribute of the field-descriptor
  742.     in the class of the collection elements that is used as a foreign key.
  743.   -->
  744. <!ATTLIST inverse-foreignkey
  745.     field-id-ref CDATA #IMPLIED
  746.     field-ref CDATA #IMPLIED
  747. >
  748.  
  749. <!--
  750.     A fk-pointing-to-this-class element contains information on a foreign-key
  751.     column of an intermediary table in a m:n scenario.
  752.   -->
  753. <!ELEMENT fk-pointing-to-this-class (documentation?)>
  754. <!--
  755.     The column attribute specifies the foreign-key column in the intermediary
  756.     table that points to the class holding the collection.
  757.   -->
  758. <!ATTLIST fk-pointing-to-this-class
  759.     column CDATA #REQUIRED
  760. >
  761.  
  762. <!--
  763.     A fk-pointing-to-element-class element contains information on a foreign-key
  764.     column of an intermediary table in a m:n scenario.
  765.   -->
  766. <!ELEMENT fk-pointing-to-element-class (documentation?)>
  767. <!--
  768.     The column attribute specifies the foreign-key column in the intermediary
  769.     table that points to the class of the collection elements.
  770.   -->
  771. <!ATTLIST fk-pointing-to-element-class
  772.     column CDATA #REQUIRED
  773. >
  774.  
  775.  
  776. <!--
  777.     a queryEnhancer element to enhance the 1:n query
  778.   -->
  779. <!ELEMENT query-customizer (
  780.     documentation?,
  781.     attribute*)>
  782. <!ATTLIST query-customizer
  783.     class CDATA #REQUIRED
  784. >
  785.  
  786. <!--
  787.     An index-descriptor describes an index by listing its columns.  It may be
  788.     unique or not.
  789. -->
  790. <!ELEMENT index-descriptor (documentation?, index-column+)>
  791. <!ATTLIST index-descriptor
  792.     name CDATA #REQUIRED
  793.     unique (true | false) "false">
  794.  
  795. <!--
  796.     An index-column is just the name of a column in an index.
  797. -->
  798. <!ELEMENT index-column (documentation?)>
  799. <!ATTLIST index-column
  800.     name CDATA #REQUIRED>
  801.  
  802. <!--
  803.     Identifies the procedure/function that should be used to handle
  804.     insertions for a specific class-descriptor.
  805.  
  806.     The nested 'argument' elements define the argument list for the
  807.     procedure/function as well as the source for each argument.
  808.  
  809.     The name attribute identifies the name of the procedure/function to use
  810.  
  811.     The return-field-ref identifies the field-descriptor that will receive
  812.     the value that is returned by the procedure/function.  If the procedure/
  813.     function does not include a return value, then do not specify a value
  814.     for this attribute.
  815.  
  816.     The include-all-fields attribute indicates if all field-descriptors in
  817.     the corresponding class-descriptor are to be passed to the procedure/
  818.     function.  If include-all-fields is 'true', any nested 'argument'
  819.     elements will be ignored.  In this case, values for all field-descriptors
  820.     will be passed to the procedure/function.  The order of values that are
  821.     passed to the procedure/function will match the order of field-descriptors
  822.     on the corresponding class-descriptor.  If include-all-fields is false,
  823.     then values will be passed to the procedure/function based on the
  824.     information in the nested 'argument' elements.
  825.   -->
  826. <!ELEMENT insert-procedure
  827.     (documentation?, (runtime-argument | constant-argument)*, attribute*)>
  828. <!ATTLIST insert-procedure
  829.     name CDATA #REQUIRED
  830.     return-field-ref CDATA #IMPLIED
  831.     include-all-fields (true | false) "false"
  832. >
  833.  
  834. <!--
  835.     Identifies the procedure/function that should be used to handle
  836.     updates for a specific class-descriptor.
  837.  
  838.     The nested 'argument' elements define the argument list for the
  839.     procedure/function as well as the source for each argument.
  840.  
  841.     The name attribute identifies the name of the procedure/function to use
  842.  
  843.     The return-field-ref identifies the field-descriptor that will receive
  844.     the value that is returned by the procedure/function.  If the procedure/
  845.     function does not include a return value, then do not specify a value
  846.     for this attribute.
  847.  
  848.     The include-all-fields attribute indicates if all field-descriptors in
  849.     the corresponding class-descriptor are to be passed to the procedure/
  850.     function.  If include-all-fields is 'true', any nested 'argument'
  851.     elements will be ignored.  In this case, values for all field-descriptors
  852.     will be passed to the procedure/function.  The order of values that are
  853.     passed to the procedure/function will match the order of field-descriptors
  854.     on the corresponding class-descriptor.  If include-all-fields is false,
  855.     then values will be passed to the procedure/function based on the
  856.     information in the nested 'argument' elements.
  857.   -->
  858. <!ELEMENT update-procedure
  859.     (documentation?, (runtime-argument | constant-argument)*, attribute*)>
  860. <!ATTLIST update-procedure
  861.     name CDATA #REQUIRED
  862.     return-field-ref CDATA #IMPLIED
  863.     include-all-fields (true | false) "false"
  864. >
  865.  
  866. <!--
  867.     Identifies the procedure/function that should be used to handle
  868.     deletions for a specific class-descriptor.
  869.  
  870.     The nested 'runtime-argument' and 'constant-argument' elements define
  871.     the argument list for the procedure/function as well as the source
  872.     for each argument.
  873.  
  874.     The name attribute identifies the name of the procedure/function to use
  875.  
  876.     The return-field-ref identifies the field-descriptor that will receive
  877.     the value that is returned by the procedure/function.  If the procedure/
  878.     function does not include a return value, then do not specify a value
  879.     for this attribute.
  880.  
  881.     The include-pk-only attribute indicates if all field-descriptors in
  882.     the corresponding class-descriptor that are identified as being part of
  883.     the primary key are to be passed to the procedure/function.  If
  884.     include-pk-only is 'true', any nested 'argument' elements will be
  885.     ignored.  In this case, values for all field-descriptors that are identified
  886.     as being part of the primary key will be passed to the procedure/function.
  887.     The order of values that are passed to the procedure/function will match
  888.     the order of field-descriptors on the corresponding class-descriptor.
  889.     If include-pk-only is false, then values will be passed to the procedure/
  890.     function based on the information in the nested 'argument' elements.
  891.   -->
  892. <!ELEMENT delete-procedure
  893.     (documentation?, (runtime-argument | constant-argument)*, attribute*)>
  894. <!ATTLIST delete-procedure
  895.     name CDATA #REQUIRED
  896.     return-field-ref CDATA #IMPLIED
  897.     include-pk-only (true | false) "false"
  898. >
  899. <!--
  900.     Defines an argument that is passed to a procedure/function.  Each argument
  901.     will be set to a value from a field-descriptor or null.
  902.  
  903.     The field-ref attribute identifies the field-descriptor in the corresponding
  904.     class-descriptor that provides the value for this argument.  If this attribute
  905.     is unspecified, then this argument will be set to null.
  906. -->
  907. <!ELEMENT runtime-argument
  908.     (documentation?, attribute*)>
  909. <!ATTLIST runtime-argument
  910.     field-ref CDATA #IMPLIED
  911.     return (true | false) "false"
  912. >
  913. <!--
  914.     Defines a constant value that is passed to a procedure/function.
  915.  
  916.     The value attribute identifies the value that is passed to the procedure/
  917.     function.
  918. -->
  919. <!ELEMENT constant-argument
  920.     (documentation?, attribute*)>
  921. <!ATTLIST constant-argument
  922.     value CDATA #REQUIRED
  923. >
  924.  
  925.