Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\advnc_coll_mg.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>Managing Collections</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T16:11:32Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Managing Collections" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E11947-01" /> <link rel="copyright" href="dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface.htm" title="Home" type="text/html" /> <link rel="up" href="advnc.htm" title="Advanced Programming Techni..." type="text/html" /> <link rel="up" href="advnc_collections.htm" title="Using Collections" type="text/html" /> <link rel="up" href="advnc_coll_mg.htm" title="Managing Collections" type="text/html" /> <link rel="prev" href="advnc_coll_merge.htm" title="Previous" type="text/html" /> <link rel="next" href="advnc_coll_clear.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface.htm" title="Home">Home</a> > <a href="advnc.htm" title="Advanced Programming Techni...">Advanced Programming Techni...</a> > <a href="advnc_collections.htm" title="Using Collections">Using Collections</a> > Managing Collections</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="advnc_coll_merge.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="advnc_coll_clear.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABBFIAA" name="BABBFIAA"></a></p> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h1><a name="HTMDB25872" id="HTMDB25872"></a>Managing <a id="sthref2222" name="sthref2222"></a>Collections</h1> <p>You can use the following utilities to manage collections.</p> <a id="sthref2223" name="sthref2223"></a> <p class="subhead2">Topics:</p> <ul> <li> <p><a href="#CHDBCGAA">Obtaining a Member Count</a></p> </li> <li> <p><a href="#CHDBGHCD">Resequencing a Collection</a></p> </li> <li> <p><a href="#CHDDHCIF">Verifying Whether a Collection Exists</a></p> </li> <li> <p><a href="#CHDDADFF">Adjusting a Member Sequence ID</a></p> </li> <li> <p><a href="#CHDFFJCE">Sorting Collection Members</a></p> </li> </ul> <a id="CHDBCGAA" name="CHDBCGAA"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25873" id="HTMDB25873"></a>Obtaining a Member Count</h2> <p>Use <code>COLLECTION_MEMBER_COUNT</code> to return the total count of all members in a collection. Note that this count does not indicate the highest sequence in the collection, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> l_count := <a id="sthref2224" name="sthref2224"></a>APEX_COLLECTION.COLLECTION_MEMBER_COUNT ( p_collection_name => collection name ); </pre></div> <!-- class="sect3" --> <a id="CHDBGHCD" name="CHDBGHCD"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25874" id="HTMDB25874"></a>Resequencing a Collection</h2> <p>Use <code>RESEQUENCE_COLLECTION</code> to resequence a collection to remove any gaps in sequence IDs while maintaining the same element order, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a id="sthref2225" name="sthref2225"></a>APEX_COLLECTION.RESEQUENCE_COLLECTION ( p_collection_name => collection name ) </pre></div> <!-- class="sect3" --> <a id="CHDDHCIF" name="CHDDHCIF"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25875" id="HTMDB25875"></a>Verifying Whether a Collection Exists</h2> <p>Use <code>COLLECTION_EXISTS</code> to determine if a collection exists, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> l_exists := <a id="sthref2226" name="sthref2226"></a>APEX_COLLECTION.COLLECTION_EXISTS ( p_collection_name => collection name ); </pre></div> <!-- class="sect3" --> <a id="CHDDADFF" name="CHDDADFF"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25876" id="HTMDB25876"></a>Adjusting a Member Sequence ID</h2> <p>You can adjust the sequence ID of a specific member within a collection by moving the ID up or down. When you adjust a sequence ID, the specified ID is exchanged with another ID. For example, if you were to move the ID 2 up, 2 becomes 3, and 3 would become 2.</p> <p>Use <code>MOVE_MEMBER_UP</code> to adjust a member sequence ID up by one. Alternately, use <code>MOVE_MEMBER_DOWN</code> to adjust a member sequence ID down by one, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a id="sthref2227" name="sthref2227"></a>APEX_COLLECTION.MOVE_MEMBER_DOWN( p_collection_name => collection name, p_seq => member sequence number); </pre> <p>Note that while using either of these methods an application error displays:</p> <ul> <li> <p>If the named collection does not exist for the current user in the current session</p> </li> <li> <p>If the member specified by the <code>p_seq</code> sequence ID does not exist</p> </li> </ul> <p>However, an application error will not be returned if the specified member has the highest or lowest sequence ID in the collection (depending on if you are calling <code>MOVE_MEMBER_UP</code> or <code>MOVE_MEMBER_DOWN</code>).</p> </div> <!-- class="sect3" --> <a id="CHDFFJCE" name="CHDFFJCE"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="HTMDB25877" id="HTMDB25877"></a>Sorting Collection Members</h2> <p>Use the <code>SORT_MEMBERS</code> method to reorder members of a collection by the column number. This method sorts the collection by a particular column number and also reassigns the sequence IDs for each member to remove gaps, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a id="sthref2228" name="sthref2228"></a>APEX_COLLECTION.SORT_MEMBERS( p_collection_name => collection name, p_sort_on_column_number => column number to sort by); </pre></div> <!-- class="sect3" --></div> <!-- class="sect2" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="advnc_coll_merge.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="advnc_coll_clear.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de