db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb repository.dtd
Date Tue, 09 Sep 2003 19:02:55 GMT
thma        2003/09/09 12:02:55

  Modified:    src/test/org/apache/ojb repository.dtd
  Log:
  add support for stored procedures. Big thanks to Ron Gallagher and Randall Burt!
  
  Revision  Changes    Path
  1.45      +133 -1    db-ojb/src/test/org/apache/ojb/repository.dtd
  
  Index: repository.dtd
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/repository.dtd,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- repository.dtd	8 Aug 2003 20:40:43 -0000	1.44
  +++ repository.dtd	9 Sep 2003 19:02:54 -0000	1.45
  @@ -277,13 +277,21 @@
   	naming the derived classes.
   
   	A class-descriptor may contain user defined custom attribute elements.
  +    
  +    The insert-procedure, update-procedure and delete-procedure elements
  +    identify the procedure/function that is defined in the database which
  +    will handle the insertion, update or deletion of an instance of this
  +    class.  These elements are all optional.  If they are absent then basic
  +    sql statements (INSERT INTO xxx..., UPDATE xxx, DELETE FROM xxx) will
  +    be utilized.
   
     -->
   <!ELEMENT class-descriptor
   	((documentation?, extent-class+, attribute*) |
   	(documentation?, extent-class*, field-descriptor+,
   	 reference-descriptor*, collection-descriptor*,
  -     index-descriptor*, attribute*))>
  +     index-descriptor*, attribute*,
  +     insert-procedure?, update-procedure?, delete-procedure?))>
   
   
   <!--
  @@ -732,3 +740,127 @@
   <!ELEMENT index-column (documentation?)>
   <!ATTLIST index-column
       name CDATA #REQUIRED>
  +
  +<!--
  +	Identifies the procedure/function that should be used to handle
  +    insertions for a specific class-descriptor.
  +
  +    The nested 'argument' elements define the argument list for the
  +    procedure/function as well as the source for each argument.
  +    
  +    The name attribute identifies the name of the procedure/function to use
  +    
  +    The return-field-ref identifies the field-descriptor that will receive
  +    the value that is returned by the procedure/function.  If the procedure/
  +    function does not include a return value, then do not specify a value
  +    for this attribute.
  +    
  +    The include-all-fields attribute indicates if all field-descriptors in
  +    the corresponding class-descriptor are to be passed to the procedure/
  +    function.  If include-all-fields is 'true', any nested 'argument'
  +    elements will be ignored.  In this case, values for all field-descriptors
  +    will be passed to the procedure/function.  The order of values that are
  +    passed to the procedure/function will match the order of field-descriptors
  +    on the corresponding class-descriptor.  If include-all-fields is false,
  +    then values will be passed to the procedure/function based on the
  +    information in the nested 'argument' elements.
  +  -->
  +<!ELEMENT insert-procedure
  +	(documentation?, (runtime-argument | constant-argument)?, attribute*)>
  +<!ATTLIST insert-procedure
  +	name CDATA #REQUIRED
  +    return-field-ref CDATA #IMPLIED
  +    include-all-fields (true | false) "false"
  +>
  +
  +<!--
  +	Identifies the procedure/function that should be used to handle
  +    updates for a specific class-descriptor.
  +
  +    The nested 'argument' elements define the argument list for the
  +    procedure/function as well as the source for each argument.
  +    
  +    The name attribute identifies the name of the procedure/function to use
  +    
  +    The return-field-ref identifies the field-descriptor that will receive
  +    the value that is returned by the procedure/function.  If the procedure/
  +    function does not include a return value, then do not specify a value
  +    for this attribute.
  +    
  +    The include-all-fields attribute indicates if all field-descriptors in
  +    the corresponding class-descriptor are to be passed to the procedure/
  +    function.  If include-all-fields is 'true', any nested 'argument'
  +    elements will be ignored.  In this case, values for all field-descriptors
  +    will be passed to the procedure/function.  The order of values that are
  +    passed to the procedure/function will match the order of field-descriptors
  +    on the corresponding class-descriptor.  If include-all-fields is false,
  +    then values will be passed to the procedure/function based on the
  +    information in the nested 'argument' elements.
  +  -->
  +<!ELEMENT update-procedure
  +	(documentation?, (runtime-argument | constant-argument)?, attribute*)>
  +<!ATTLIST update-procedure
  +	name CDATA #REQUIRED
  +    return-field-ref CDATA #IMPLIED
  +    include-all-fields (true | false) "false"
  +>
  +
  +<!--
  +	Identifies the procedure/function that should be used to handle
  +    deletions for a specific class-descriptor.
  +
  +    The nested 'runtime-argument' and 'constant-argument' elements define
  +    the argument list for the procedure/function as well as the source
  +    for each argument.
  +    
  +    The name attribute identifies the name of the procedure/function to use
  +    
  +    The return-field-ref identifies the field-descriptor that will receive
  +    the value that is returned by the procedure/function.  If the procedure/
  +    function does not include a return value, then do not specify a value
  +    for this attribute.
  +    
  +    The include-pk-only attribute indicates if all field-descriptors in
  +    the corresponding class-descriptor that are identified as being part of
  +    the primary key are to be passed to the procedure/function.  If
  +    include-pk-only is 'true', any nested 'argument' elements will be
  +    ignored.  In this case, values for all field-descriptors that are identified
  +    as being part of the primary key will be passed to the procedure/function.
  +    The order of values that are passed to the procedure/function will match
  +    the order of field-descriptors on the corresponding class-descriptor.
  +    If include-pk-only is false, then values will be passed to the procedure/
  +    function based on the information in the nested 'argument' elements.
  +  -->
  +<!ELEMENT delete-procedure
  +	(documentation?, (runtime-argument | constant-argument)?, attribute*)>
  +<!ATTLIST delete-procedure
  +	name CDATA #REQUIRED
  +    return-field-ref CDATA #IMPLIED
  +    include-pk-only (true | false) "false"
  +>
  +<!--
  +    Defines an argument that is passed to a procedure/function.  Each argument
  +    will be set to a value from a field-descriptor or null.
  +    
  +    The field-ref attribute identifies the field-descriptor in the corresponding
  +    class-descriptor that provides the value for this argument.  If this attribute
  +    is unspecified, then this argument will be set to null.
  +-->
  +<!ELEMENT runtime-argument
  +	(documentation?, attribute*)>
  +<!ATTLIST runtime-argument
  +	field-ref CDATA #IMPLIED
  +    return (true | false) "false"
  +>
  +<!--
  +    Defines a constant value that is passed to a procedure/function.
  +    
  +    The value attribute identifies the value that is passed to the procedure/
  +    function.
  +-->
  +<!ELEMENT constant-argument
  +	(documentation?, attribute*)>
  +<!ATTLIST constant-argument
  +    value CDATA #REQUIRED
  +>
  +
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message