Author: arminw Date: Thu Jan 4 09:01:30 2007 New Revision: 492638 URL: http://svn.apache.org/viewvc?view=rev&rev=492638 Log: update docs
Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/platforms.xml db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-use-lobs.xml db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-work-with-stored-procedures.xml db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/news.html db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/platforms.xml URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/platforms.xml?view=diff&rev=492638&r1=492637&r2=492638 ============================================================================== --- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/platforms.xml (original) +++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/platforms.xml Thu Jan 4 09:01:30 2007 @@ -362,13 +362,13 @@ #profile=db2 #profile=oracle #profile=oracle9i -#profile=oracle9i-Seropto #profile=msaccess #profile=postgresql #profile=informix #profile=sybase #profile=sapdb -#profile=maxdb]]></source> +#profile=maxdb +#profile=derby]]></source> <p> The profile switch activated in <code>build.properties</code> is used to Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml?view=diff&rev=492638&r1=492637&r2=492638 ============================================================================== --- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml (original) +++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/repository.xml Thu Jan 4 09:01:30 2007 @@ -1509,7 +1509,8 @@ </p> <note> This attribute must be set to <em>false</em> if using the OTM or JDO layer. - <br/> For ODMG-api <em>none</em> is mandatory (since OJB 1.0.2). + <br/> + Mandatory settings when using the ODMG-api, see <a href="site:odmg-guide/metadata">odmg-guide</a>. </note> <p> The <em>auto-delete</em> attribute specifies whether OJB automatically deletes @@ -1519,7 +1520,8 @@ </p> <note> This attribute must be set to <em>false</em> if using the OTM or JDO layer. - <br/> For ODMG-api <em>none</em> is mandatory (since OJB 1.0.2). + <br/> + Mandatory settings when using the ODMG-api, see <a href="site:odmg-guide/metadata">odmg-guide</a>. </note> <p> The <em>otm-dependent</em> attribute specifies whether the OTM layer automatically @@ -1684,7 +1686,8 @@ </p> <note> This attribute must be set to <em>false</em> if using the OTM or JDO layer. - <br/> For ODMG-api <em>none</em> is mandatory (since OJB 1.0.2). + <br/> + Mandatory settings when using the ODMG-api, see <a href="site:odmg-guide/metadata">odmg-guide</a>. </note> <p> The <em>auto-delete</em> attribute specifies whether OJB automatically deletes @@ -1694,7 +1697,8 @@ </p> <note> This attribute must be set to <em>false</em> if using the OTM or JDO layer. - <br/> For ODMG-api <em>none</em> is mandatory (since OJB 1.0.2). + <br/> + Mandatory settings when using the ODMG-api, see <a href="site:odmg-guide/metadata">odmg-guide</a>. </note> <p> The <em>otm-dependent</em> attribute specifies whether the OTM layer automatically @@ -1878,15 +1882,15 @@ <source><![CDATA[ <!ELEMENT index-column (documentation?)> -<!ATTLIST index-column - name CDATA #REQUIRED>]]></source> +<!ATTLIST index-column name CDATA #REQUIRED>]]></source> </section> + <anchor id="stored-procedures"/> <section> <title>Stored Procedure Support</title> <p> OJB supports stored procedures for insert, update and delete operations. - <a href="site:stored-procedures">How to use stored procedures within OJB can be found here</a>. + <a href="site:howto/stored-procedures">How to use stored procedures within OJB can be found here</a>. </p> <section> @@ -1907,7 +1911,10 @@ <!ELEMENT insert-procedure (documentation?, (runtime-argument | constant-argument)?, attribute*)>]]></source> <p> - The <em>name</em> attribute identifies the name of the procedure/function to use + Attributes declared within the <code>insert-procedure</code> element are: + </p> + <p> + The <em>name</em> attribute identifies the name of the procedure/function to use. </p> <p> The <em>return-field-ref</em> identifies the field-descriptor that will receive @@ -1954,6 +1961,9 @@ <!ELEMENT update-procedure (documentation?, (runtime-argument | constant-argument)?, attribute*)>]]></source> <p> + Attributes declared within the <code>update-procedure</code> element are: + </p> + <p> The <em>name</em> attribute identifies the name of the procedure/function to use </p> <p> @@ -2002,6 +2012,9 @@ <!ELEMENT delete-procedure (documentation?, (runtime-argument | constant-argument)?, attribute*)>]]></source> <p> + Attributes declared within the <code>delete-procedure</code> element are: + </p> + <p> The <em>name</em> attribute identifies the name of the procedure/function to use </p> <p> @@ -2037,15 +2050,15 @@ Defines an argument that is passed to a procedure/function. Each argument will be set to a value from a field-descriptor or null. </p> + <source><![CDATA[ +<!ELEMENT runtime-argument (documentation?, attribute*)>]]></source> <p> - Use the - <a href="#custom-attribute"><em>custom-attribute</em> - </a> element to pass + Use the <a href="#custom-attribute"><em>custom-attribute</em> </a> element to pass implementation specific properties. </p> - <source><![CDATA[ -<!ELEMENT runtime-argument - (documentation?, attribute*)>]]></source> + <p> + Attributes declared within the <code>runtime-argument</code> element are: + </p> <p> The <em>field-ref</em> attribute identifies the field-descriptor in the corresponding class-descriptor that provides the value for this argument. If this attribute @@ -2065,14 +2078,15 @@ Defines a constant value that is passed to a procedure/function. </p> <p> - Use the - <a href="#custom-attribute"><em>custom-attribute</em> - </a> element to pass + Use the <a href="#custom-attribute"><em>custom-attribute</em></a> element to pass implementation specific properties. </p> <source><![CDATA[ <!ELEMENT constant-argument (documentation?, attribute*)>]]></source> + <p> + Attributes declared within the <code>constant-argument</code> element are: + </p> <p> The <em>value</em> attribute identifies the value that is passed to the procedure/ function. Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-use-lobs.xml URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-use-lobs.xml?view=diff&rev=492638&r1=492637&r2=492638 ============================================================================== --- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-use-lobs.xml (original) +++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-use-lobs.xml Thu Jan 4 09:01:30 2007 @@ -207,7 +207,7 @@ <anchor id="insertLobs"/> <section> - <title>Insert LOB's</title> + <title>Insert/Update/Delete LOB's</title> <p> There is no difference in insert of persistence capable objects with LOB-fields compared to objects without - beside populate the LOB-fields. @@ -257,6 +257,73 @@ or something similar. </note> + <p> + After insert it is now possible to <a href="#queryLobs">query the LOB object</a>. If an update is + needed you can: + </p> + <ul> + <li> + Replace the LOB value by a new LOB value + <source><![CDATA[ +// Lookup LOB object +LobObject obj = (LobObject) broker.getObjectByIdentity(oid); +// get updated BLOB as byte[] and CLOB as String +... +ByteArrayInputStream in2 = new ByteArrayInputStream(...); +StringReader reader2 = new StringReader(...); +// update object using new LOB objets +broker.beginTransaction(); +Blob b_update = broker.serviceLobHelper().newBlob(in2); +Clob c_update = broker.serviceLobHelper().newClob(reader2); +obj.setBlob(b_update); +obj.setClob(c_update); +broker.store(obj, ObjectModification.UPDATE); +broker.commitTransaction();]]></source> + <p> + To remove the LOB content of an object nullify the LOB values and update/store the object: + </p> + <source><![CDATA[ +// nullify LOB objects +broker.beginTransaction(); +objRead.setBlob(null); +objRead.setClob(null); +broker.store(objRead, ObjectModification.UPDATE); +broker.commitTransaction();]]></source> + </li> + <li> + Modify the LOB value + <source><![CDATA[ +// update within PB-tx +broker.beginTransaction(); +// lookup object +objRead = (LobObject) broker.getObjectByIdentity(oid); +// if auto-refresh of LOB values is disabled, we have to refresh +// LOB objects read from cache +//broker.serviceLobHelper().refreshLob(objRead); +OutputStream out = objRead.getBlob().setBinaryStream(1); +out.write(updateByteArr); +out.flush(); +out.close(); +Writer writer = objRead.getClob().setCharacterStream(1); +writer.write(updateString); +writer.flush(); +writer.close(); +broker.store(objRead, ObjectModification.UPDATE); +broker.commitTransaction();]]></source> + </li> + </ul> + <p> + To delete objects with LOB values there is no difference to "normal" object. + </p> + + <p> + It's also possible to use <a href="#reportQueries">Report Queries</a> to directly + query LOB content. + </p> + <p> + In the <a href="site:test-suite">OJB test-suite</a> you can find detailed tests handling + LOB content (Test class is called <code>org.apache.ojb.broker.lob.LOBTest</code>). + </p> <anchor id="insertLobsDatabaseSpecific"/> <section> @@ -314,10 +381,6 @@ <a href="site:connection/obtain-connection"> how to access <code>java.sql.Connection</code> instances here</a>. </p> - <p> - It's also possible to use <a href="site:query/report-queries">Report Queries</a> to directly - query LOB content. - </p> </section> </section> @@ -386,7 +449,7 @@ are described in <a href="#lifecycle">section above</a>). For the <a href="#lobMapping">example mapping</a> it would look like this (for <code>java.sql.Blob</code> and <code>java.sql.Clob</code> instances): - </p> + </p> <source><![CDATA[ // get the wrapped LOB instance from the // persistence capable object Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-work-with-stored-procedures.xml URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-work-with-stored-procedures.xml?view=diff&rev=492638&r1=492637&r2=492638 ============================================================================== --- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-work-with-stored-procedures.xml (original) +++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/howtos/howto-work-with-stored-procedures.xml Thu Jan 4 09:01:30 2007 @@ -43,59 +43,40 @@ function can be used. </p> <p> - Information presented in this document includes the following: + A description of all elements and attributes related to <em>stored procedures</em> (declared in + the <a href="ext:repository.dtd">repository.dtd</a>) can be found in the + <a href="site:repository/stored-procedures">repository documentation</a>. </p> - <ul> - <li> - <a href="#Repository+entries">Basic repository entries</a> - </li> - <li> - <a href="#Common+attributes">Common attributes for all procedure - descriptors</a> - </li> - <li>An overview of the - <a href="#insert-procedure">insert procedure</a>, - <a href="#update-procedure">update procedure</a> and - <a href="#delete-procedure">delete procedure</a> descriptors. - </li> - <li>Information about the - <a href="#Argument+descriptors">argument descriptors</a> - that are supported for all procedure - </li> - <li>A - <a href="#A+simple+example">simple example</a> and a - <a href="#A+complex+example">more complex example</a> - </li> - </ul> </section> <section> <title>Repository entries</title> + <anchor id="repository-entries"/> <p> For any persistable class (i.e. "com.myproject.Customer") where you want to utilize stored procedures to handle persistence operations instead of traditional DML statements (i.e. INSERT, UPDATE or DELETE), you will need to include one or more of the following descriptors within the - corresponding class-descriptor for the persistable class: + corresponding <a href="site:repository/class-descriptor">class-descriptor</a> + for the persistable class: </p> <ul> <li> - <code>insert-procedure</code> - identifies the stored procedure that - is to be used whenever a class needs to be inserted into the database. + <a href="site:repository/stored-procedures"><code>insert-procedure</code></a> - identifies + the stored procedure that is to be used whenever a class needs to be inserted into the database. </li> <li> - <code>update-procedure</code> - identifies the stored procedure that - is to be used whenever a class needs to be updated in the database. + <a href="site:repository/stored-procedures"><code>update-procedure</code></a> - identifies + the stored procedure that is to be used whenever a class needs to be updated in the database. </li> <li> - <code>delete-procedure</code> - identifies the stored procedure that - is to be used whenever a class needs to be removed from the database. + <a href="site:repository/stored-procedures"><code>delete-procedure</code></a> - identifies + the stored procedure that is to be used whenever a class needs to be removed from the database. </li> </ul> <p> - All of these descriptors must be nested within the class-descriptor that - they apply to. Here is an example of a simple class-descriptor that - includes each of the procedure descriptors listed above: + All of these descriptors must be nested within the <code>class-descriptor</code> that they apply to. + Here is an example of a simple example that includes each of the procedure descriptors listed above: </p> <source><![CDATA[ <class-descriptor class="com.myproject.Customer" table="CUSTOMER"> @@ -117,20 +98,27 @@ <section> <title>Common attributes</title> + <anchor id="common-attributes"/> <p> All three procedure descriptors have the following attributes in common: </p> <ul> <li> - <code>name</code> - This is the name of the stored procedure that is to + <code>name</code> + <p> + This is the name of the stored procedure that is to be used to handle the specific persistence operation. + </p> </li> <li> - <code>return-field-ref</code> - This identifies the field in the class + <code>return-field-ref</code> + <p> + This identifies the field in the class where the return value from the stored procedure will be stored. If this attribute is blank or not specified, then OJB will assume that the stored procedure does not return a value and will format the SQL command accordingly. + </p> </li> </ul> <p> @@ -138,15 +126,7 @@ looks something like this: </p> <source><![CDATA[ -{?= call <procedure-name>[<arg1>,<arg2>, ...]}]]></source> - - <p> - The basic syntax that is used to call a procedure that - <strong>does not</strong> - include a return value looks something like this: - </p> - <source><![CDATA[ -{call <procedure-name>[<arg1>,<arg2>, ...]}]]></source> +{?= call <procedure-name>[<arg1>,<arg2>, ...]}]]></source> <p> When OJB assembles the SQL to call a stored procedure, it will use the value of the 'name' attribute in place of 'procedure-name' in these two examples. @@ -175,31 +155,33 @@ <section> <title>insert-procedure</title> + <anchor id="insert-procedure"/> <p> The insert-procedure descriptor identifies the stored procedure that should be used whenever a class needs to be inserted into the database. In addition to the - <a href="#Common+attributes">common attributes</a> listed + <a href="#common-attributes">common attributes</a> listed earlier, the insert-procedure includes the following attribute: </p> <ul> <li> - <anchor id="include-all-fields"/>include-all-fields + <code>include-all-fields</code> + <p> + This attribute provides an efficient mechanism for passing all + attributes of a persistable class to a stored procedure. If this + attribute is set to true, then OJB will ignore any nested + <a href="#argument-descriptors">argument descriptors</a>. Instead, + OJB will assume that the argument list for the stored procedure + includes arguments for all attributes of the persistable class and that + those arguments appear in the same order as the field-descriptors for + the persistable class. + </p> + <p> + The default value for this attribute is 'false'. + </p> </li> </ul> - <p> - This attribute provides an efficient mechanism for passing all - attributes of a persistable class to a stored procedure. If this - attribute is set to true, then OJB will ignore any nested - <a href="#Argument+descriptors">argument descriptors</a>. Instead, - OJB will assume that the argument list for the stored procedure - includes arguments for all attributes of the persistable class and that - those arguments appear in the same order as the field-descriptors for - the persistable class. - </p> - <p> - The default value for this attribute is 'false'. - </p> + <note> If the field-descriptors in your repository do not 'align' exactly with the argument list for the stored procedure, or you want to @@ -212,54 +194,56 @@ <section> <title>update-procedure</title> + <anchor id="update-procedure"/> <p> The update-procedure descriptor identifies the stored procedure that should be used whenever a class needs to be updated in the database. In addition to the - <a href="#Common+attributes">common attributes</a> listed earlier, the + <a href="#common-attributes">common attributes</a> listed earlier, the update-procedure includes the following attribute: </p> <ul> - <li>include-all-fields</li> + <li> + <code>include-all-fields</code> + <p> + This attribute provides the same capabilities and has the same caveats as + the + <a href="#include-all-fields">include-all-fields</a> attribute on + the + <a href="#insert-procedure">insert-procedure</a> descriptor. + </p> + </li> </ul> - <p> - This attribute provides the same capabilities and has the same caveats as - the - <a href="#include-all-fields">include-all-fields</a> attribute on - the - <a href="#insert-procedure">insert-procedure</a> descriptor. - </p> </section> <section> <title>delete-procedure</title> + <anchor id="delete-procedure"/> <p> The delete-procedure descriptor identifies the stored procedure that should - be used whenever a class needs to be deleted from the database. In - addition to the - <a href="#Common+attributes">common attributes</a> listed + be used whenever a class needs to be deleted from the database. In + addition to the <a href="#common-attributes">common attributes</a> listed earlier, the delete-procedure includes the following attribute: </p> <ul> <li> - <anchor id="include-pk-only"/>include-pk-only - <br/> - <br/> - This attribute provides an efficient mechanism for passing all of the - attributes that make up the primary key for a persistable class to the - specified stored procedure. If this attribute is set to true, then OJB - will ignore any nested - <a href="#Argument+descriptors">argument - descriptors</a>. Instead, OJB will assume that the argument list for - the stored procedure includes arguments for all attributes that make up - the primary key for the persistable class (i.e. those field-descriptors - where the 'primary-key' attribute is set to 'true'). OJB will also assume - that those arguments appear in the same order as the corresponding - field-descriptors for the persistable class. - <br/> - <br/> - The default value for this attribute is 'false'. + <code>include-pk-only</code> + <p> + This attribute provides an efficient mechanism for passing all of the + attributes that make up the primary key for a persistable class to the + specified stored procedure. If this attribute is set to <em>'true'</em>, then OJB + will ignore any nested + <a href="#argument-descriptors">argument descriptors</a>. Instead, OJB will + assume that the argument list for the stored procedure includes arguments for + all attributes that make up the primary key for the persistable class (i.e. + those <a href="site:repository/field-descriptor">field-descriptors</a> where + the <em>'primary-key'</em> attribute is set to <em>'true'</em>). + OJB will also assume that those arguments appear in the same order as the + corresponding field-descriptors for the persistable class. + <br/> + The default value for this attribute is <em>'false'</em>. + </p> </li> </ul> <note> @@ -274,13 +258,13 @@ <section> <title>Argument descriptors</title> + <anchor id="argument-descriptors"/> <p> Argument descriptors are the mechanism that you will use to tell OJB two things: </p> <ol> - <li>How many placeholders should be included in the argument list for a - stored procedure?</li> + <li>How many placeholders should be included in the argument list for a stored procedure?</li> <li>What value should be passed for each of those arguments?</li> </ol> <p> @@ -289,32 +273,29 @@ </p> <ul> <li> - <a href="#runtime-argument descriptors">runtime arguments</a> + <a href="#runtime-argument">runtime arguments</a> used to set a stored procedure argument equal to a value that is only known at runtime. </li> <li> - <a href="#constant-argument descriptors">constant arguments</a> + <a href="#constant-argument">constant arguments</a> used to set a stored procedure argument equal to constant value. </li> </ul> <p> You may notice that there is no argument descriptor specifically designed - to pass a - <em>null</em> value to the procedure. This capability is provided by - the - <a href="#runtime-argument descriptors">runtime argument</a> - descriptor. + to pass a <em>null</em> value to the procedure. This capability is provided by + the <a href="#runtime-argument">runtime argument</a> descriptor. </p> <p> The argument descriptors are essentially the 'mappings' between stored - procedure arguments and their runtime values. Each procedure descriptor + procedure arguments and their runtime values. Each procedure descriptor can include 0 or more argument descriptors in it's definition. </p> <p> After reading that last comment, you may wonder why OJB allows you to configure a procedure descriptor with no argument descriptors since the - primary focus of OJB is to handle object persistence. How could OJB perform + primary focus of OJB is to handle object persistence. How could OJB perform any sort persistence operation using a stored procedure that did not involve the passage of at least one value to the stored procedure? To be honest, it is extremely unlikely that you would ever set up a procedure descriptor with @@ -326,6 +307,7 @@ <section> <title>runtime-argument descriptors</title> + <anchor id="runtime-argument"/> <p> A runtime-argument descriptor is used to set a stored procedure argument equal to a value that is only known at runtime. @@ -335,17 +317,16 @@ Two attributes can be specified for each runtime-argument descriptor: </p> <ul> - <li>field-ref - <br/> - <br/> + <li><code>field-ref</code> + <p> The 'field-ref' attribute identifies the specific field descriptor that will provide the argument's value. If this attribute is not specified or does not resolve to a valid field-descriptor, then a null value will be passed to the stored procedure. + </p> </li> - <li>return - <br/> - <br/> + <li><code>return</code> + <p> The 'return' attribute is used to determine if the argument is used by the stored procedure as an 'output' argument. <br/> @@ -356,39 +337,36 @@ the CallableStatement and stored in the attribute identified by the field-ref attribute. <br/> - <br/> If this attribute is not specified or set to false, then OJB assumes that the argument is simply an 'input' argument, and it will do nothing special to the argument. + </p> </li> </ul> </section> <section> <title>constant-argument descriptors</title> + <anchor id="constant-argument"/> <p> A constant-argument descriptor is used to set a stored procedure argument - equal to constant value. - + equal to constant value. There is one attribute that can be specified for the + constant-argument descriptor: </p> - - <p> - There is one attribute that can be specified for the constant-argument - descriptor: + <ul> + <li><code>value</code> + <p> + The 'value' attribute identifies the value for the argument. </p> - <ul> - <li>value - <br/> - <br/> - The 'value' attribute identifies the value for the argument. - </li> - </ul> + </li> + </ul> </section> </section> <section> <title>A simple example</title> + <anchor id="simple-example"/> <p> This section provides background information and a simple example that illustrates how OJB's support for stored procedures can be utilized. @@ -398,29 +376,30 @@ </p> <ul> <li> - <a href="#The+basic+requirements">The basic requirements</a> + <a href="#basic-requirements">The basic requirements</a> </li> <li> - <a href="#The+database+objects">The database objects</a> + <a href="#database-objects">The database objects</a> including the - <a href="#The+table">table</a> that will be manipulated, + <a href="#the-table">table</a> that will be manipulated, the - <a href="#The+sequence">sequence</a> that will be used by the stored + <a href="#the-sequence">sequence</a> that will be used by the stored procedures to assign primary key falues, the - <a href="#The+insert+and+update+triggers">insert and update triggers</a> + <a href="#insert-update-triggers">insert and update triggers</a> that maintain the four 'audit' columns and the - <a href="#The+package">package</a> that provides the stored procedures that + <a href="#the-package">package</a> that provides the stored procedures that will handle the persistence operations. </li> </ul> <p> Click - <a href="#The+implementation">here</a> to skip the background information + <a href="#the-implementation">here</a> to skip the background information and go straight to the implementation. </p> <section> <title>The basic requirements</title> + <anchor id="basic-requirements"/> <p> These are the requirements that must be satisfied by our example </p> @@ -509,6 +488,7 @@ <section> <title>The database objects</title> + <anchor id="database-objects"/> <p> The database objects that are described in this section utilize Oracle specific syntax. However, you should not infer from this that the @@ -516,37 +496,37 @@ that is stored in an Oracle database. In reality, stored procedures can be used for persistence operations in any database that supports stored procedures. - </p> <ul> <li>The - <a href="#The+CUSTOMER+table">table</a> that will be manipulated, + <a href="#customer-table">table</a> that will be manipulated, </li> <li>The - <a href="#The+sequence">sequence</a> that will be used by the stored + <a href="#the-sequence">sequence</a> that will be used by the stored procedures to assign primary key values </li> <li>The - <a href="#The+insert+and+update+triggers">insert and update + <a href="#insert-update-triggers">insert and update triggers</a> that maintain the four 'audit' columns </li> <li>The - <a href="#The+package">package</a> that provides the stored + <a href="#the-package">package</a> that provides the stored procedures that will handle the persistence operations. </li> </ul> <p> Click - <a href="#The+implementation">here</a> to skip the information about + <a href="#the-implementation">here</a> to skip the information about the database objects and go straight to the implementation. </p> </section> <section> <title>The CUSTOMER table</title> + <anchor id="customer-table"/> <p> This example will deal exclusively with persistence operations related to the a table named 'CUSTOMER' that is built using the following DDL: @@ -566,16 +546,18 @@ <section> <title>The sequence</title> + <anchor id="the-sequence"/> <p> This sequence will be used to assign unique values to <code>CUSTOMER.ID</code>. </p> <source><![CDATA[ - CREATE SEQUENCE CUSTOMER_SEQ;]]></source> +CREATE SEQUENCE CUSTOMER_SEQ;]]></source> </section> <section> <title>The insert and update triggers</title> + <anchor id="insert-update-triggers"/> <p> These two triggers will implement all of the requirements listed above that are related to the four audit columns: @@ -643,6 +625,7 @@ <section> <title>The package</title> + <anchor id="the-package"/> <p> This Oracle package will handle all INSERT, UPDATE and DELETE operations involving the @@ -752,6 +735,7 @@ <section> <title>The implementation</title> + <anchor id="the-implementation"/> <p> Getting OJB to utilize the stored procedures described earlier in this document is as simple as adding a few descriptors to the repository. Here @@ -813,9 +797,10 @@ <section> <title>A complex example</title> + <anchor id="complex-example"/> <p> This example builds upon the - <a href="#A+simple+example">simple example</a> + <a href="#simple-example">simple example</a> that was presented earlier by introducing some additional requirements beyond those that were specified in the simple example. Some of these additional requirements may seem a little contrived. To be honest, they Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/news.html URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/news.html?view=diff&rev=492638&r1=492637&r2=492638 ============================================================================== --- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/news.html (original) +++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/news.html Thu Jan 4 09:01:30 2007 @@ -10,15 +10,17 @@ <body> -<h4><i>08/2006</i> - Clepsydra 0.8 use OJB for persistence</h4> +<h4><i>01/2007</i> - OJB 1.0.5 released</h4> <p> - <a href="ext:clepsydra">Clepsydra</a> a GPL licensed web application for managing and sharing a - collection of documents (pictures centric) is out. The persistence is done by OJB. + The OJB 1.0.5 release contains new features, many bug fixes, performance improvements and some changes. + <br/> + Please read carefully the release notes before updating from previous versions. + <br/>For more details about the 1.0.5 release see <a href="site:release-notes">release-notes</a>. </p> <h4><i>12/2005</i> - OJB 1.0.4 released</h4> <p> - Contains bug fixes and new features. For more details see <a href="ext:release-notes">release-notes</a>. + Contains bug fixes and new features. For more details see <a href="site:release-notes">release-notes</a>. </p> <h4><i>11/2005</i> - Work for OJB 1.x started</h4> Modified: db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml?view=diff&rev=492638&r1=492637&r2=492638 ============================================================================== --- db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml (original) +++ db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/site.xml Thu Jan 4 09:01:30 2007 @@ -152,6 +152,7 @@ <extent-class href="#extent-class"/> <default-connection href="#default-connection"/> <load-repository href="#load-repository"/> + <stored-procedures href="#stored-procedures"/> </repository> <basic-technique label="Basic mapping" href="basic-technique.html"> <one-to-one href="#one-to-one"/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]