| <html><head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title xmlns:d="http://docbook.org/ns/docbook">Chapter 20. Filtering</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 4.0 documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 4.0"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part4.html" title="Part IV. DB-First Flow"><link rel="prev" href="re-introduction.html" title="Chapter 19. Introduction"><link rel="next" href="re-relationships-loading-control.html" title="Chapter 21. Other Settings"><script xmlns:d="http://docbook.org/ns/docbook" type="text/javascript"> |
| var _gaq = _gaq || []; |
| _gaq.push(['_setAccount', 'UA-7036673-1']); |
| _gaq.push(['_trackPageview']); |
| (function() { |
| var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
| ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
| var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| })(); |
| </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.4.0 (4.0.M5)</th><th align="center">Chapter 20. Filtering</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re-introduction.html">Prev</a> </td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Part IV. DB-First Flow</a></th><td width="20%" align="right"> <a accesskey="n" href="re-relationships-loading-control.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="re-filtering"></a>Chapter 20. Filtering</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="re-filtering.html#everything-schema-catalog">Process everything from schema/catalog</a></span></dt><dt><span class="section"><a href="re-filtering.html#combine-schema-catalog">Combine Schema and Catalog filters</a></span></dt><dt><span class="section"><a href="re-filtering.html#including-excluding-tables-columns-procedures">Including and Excluding tables, columns and procedures</a></span></dt><dt><span class="section"><a href="re-filtering.html#complete-filtering-example">Complete filtering example</a></span></dt><dt><span class="section"><a href="re-filtering.html#d0e3501">Ant configuration example</a></span></dt></dl></div><p> |
| The first thing you usually want to control during reverse engineering is what exactly should be loaded from database and |
| what not. One of the most common cases is excluding system tables, as you usually don't want to map them. |
| </p><p> |
| Briefly, you are able to include/exclude tables, columns and procedures and do it at several levels: default, catalog, schema. |
| Although everything defined at the top level (default rules) will be applied for the nested elements, all rules from the most specific |
| areas will override general rules (i.e. rules from schemas override rules from catalogs and even more override default rules). |
| </p><p> |
| The following use-cases will provide you a better understanding of how filtering works and how you could use it. |
| </p><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="everything-schema-catalog"></a>Process everything from schema/catalog</h2></div></div></div><p> |
| The simplest example of reverse engineering is processing tables from one schema of catalog and there are several options to do this. |
| Basic syntax is described below: |
| </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><dbimport></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment"><!-- Ant/Maven in case you only want to specify the schema to import --></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>SCHEMA_NAME<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment"><!-- Maven way in case you have nested elements in the schema --></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>SCHEMA_NAME<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| ... |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment"><!-- Ant way in case you have nested elements in the schema --></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">name</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"SCHEMA_NAME"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">></span> |
| ... |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></dbimport></span> </pre><p> |
| The same options are available for catalogs: |
| </p><pre class="programlisting"> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><dbimport></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment"><!-- Ant/Maven in case you only want to specify the catalog to import --></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span>CATALOG_NAME<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment"><!-- Maven way in case you have nested elements in the catalog --></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>CATALOG_NAME<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| ... |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment"><!-- Ant way in case you have nested elements in the catalog --></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">name</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"CATALOG_NAME"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">></span> |
| ... |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></dbimport></span></pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Current version of reverse engineering doesn't support catalog filtering for Postgres database.</p></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="combine-schema-catalog"></a>Combine Schema and Catalog filters</h2></div></div></div><p> |
| Cayenne supports combination of different schemas and catalogs, and it filters data according to your requirements. |
| You could achieve this by the following example of reverse engineering configuration: |
| </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><dbimport></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop_01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop_02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop_03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></dbimport></span></pre><p> |
| In the example above, Cayenne reverse engineering process contains three catalogs named as shop_01, shop_02 and shop_03, |
| each of wich has their own schemas. Cayenne will load all data only from the declared catalogs and schemas. |
| </p><p> |
| If you want to load everything from database, you could simply declare catalog specification alone. |
| </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><dbimport></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span>shop_01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span>shop_02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span>shop_03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></dbimport></span></pre><p> |
| If you want to do reverse engineering for specific schemas, just remove unwanted schemas from the catalog section. |
| For example, if you want to process schema-name-01 and schema-name-03 schemas only, then you should change reverse engineering section like this. |
| </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><dbimport></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop_01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop_02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop_03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><schema></span>schema-name-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></schema></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></dbimport></span></pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="including-excluding-tables-columns-procedures"></a>Including and Excluding tables, columns and procedures</h2></div></div></div><p> |
| Cayenne reverse engineering let you fine tune table, columns and stored procedures names that you need to import |
| to your model file. In every filter you can use regexp syntax. Here is some examples of configuration |
| for common tasks. |
| </p><p> |
| </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Include tables with ‘CRM_’ prefix if you are working in that domain of application:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span>CRM_.*<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span></pre></li><li class="listitem"><p>Include tables with ‘_LOOKUP’ suffix</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>.*_LOOKUP<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span></pre></li><li class="listitem"><p>Exclude tables with ‘CRM_’ prefix if you are not working only in that domain of application:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeTable></span>CRM_.*<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeTable></span></pre></li><li class="listitem"><p>Include only specific columns that follows specific naming convention:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn></span>includeColumn01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn></span>includeColumn03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeColumn></span></pre></li><li class="listitem"><p>Exclude system or obsolete columns:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn></span>excludeColumn01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn></span>excludeColumn03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeColumn></span></pre></li><li class="listitem"><p>Include/Exclude columns for particular table or group of tables:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>table pattern<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn></span>includeColumn01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn></span>excludeColumn01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span></pre></li><li class="listitem"><p>Include stored procedures:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeProcedure></span>includeProcedure01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeProcedure></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeProcedure></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>includeProcedure03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeProcedure></span></pre></li><li class="listitem"><p>Exclude stored procedures by pattern:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeProcedure></span>excludeProcedure01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeProcedure></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeProcedure></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>excludeProcedure03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeProcedure></span></pre></li></ol></div><p> |
| </p><p> All filtering tags <code class="code"><includeTable></code>, |
| <code class="code"><excludeTable></code>, <code class="code"><includeColumn></code>, |
| <code class="code"><excludeColumn></code>, <code class="code"><includeProcedure></code> and |
| <code class="code"><excludeProcedure></code> have 2 ways to pass filtering RegExp. |
| </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>text inside tag</p><pre class="programlisting"> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span>CRM_.*<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span></pre></li><li class="listitem"><p>pattern inner tag</p><pre class="programlisting"> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>.*_LOOKUP<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span></pre></li></ol></div><p> |
| </p><p> |
| All filtering tags can be placed inside schema and catalog tags, but also inside <code class="code"><dbimport></code> tag. It means that filtering rules |
| will be applied for all schemas and catalogs. |
| </p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="complete-filtering-example"></a>Complete filtering example</h2></div></div></div><p> |
| Initially, let’s make a small sample. Consider the following reverse engineering configuration. |
| </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><dbimport></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span>shop-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></dbimport></span> </pre><p> |
| In this case reverse engineering will not filter anything from the shop-01 catalog. If you really want to filter database columns, tables, |
| stored procedures and relationships, you could do it in the following way. |
| </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><dbimport></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span>shop-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span>includeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></dbimport></span></pre><p> |
| Then Cayenne will do reverse engineering for both shop-01 and shop-02 catalogs. First catalog will not be processed for filtering, |
| but the second catalog will be processed with “includeTable-01” filter. |
| </p><p> |
| Let’s assume you have a lot of table prefixes with the same names. Cayenne allows you to mention a pattern as regular expression. |
| Using regular expressions is easier way to handle a big amount of database entities than writing filter config for each use-case. |
| They make your configuration more readable, understandable and straightforward. There is not complex. |
| Let’s see how to use patterns in reverse engineering configuration with complete example. |
| </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><dbimport></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span>shop-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><name></span>shop-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></name></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span>includeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>includeTable-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>includeTable-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn></span>includeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn></span>excludeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeTable></span>excludeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeTable></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>excludeTable-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeTable></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn></span>includeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeColumn></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>includeColumn-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeColumn></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn></span>excludeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeColumn></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>excludeColumn-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeColumn></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeProcedure></span>includeProcedure-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeProcedure></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeProcedure></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>includeProcedure-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeProcedure></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeProcedure></span>excludeProcedure-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeProcedure></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeProcedure></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><pattern></span>excludeProcedure-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></pattern></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeProcedure></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></dbimport></span></pre><p>The example above should provide you more idea about how to use filtering and patterns |
| in Cayenne reverse engineering. You could notice that this example demonstrates you the |
| "name" and "pattern" configurations. Yes, you could use these as separates xml element |
| and xml attributes. </p><p> |
| The cdbimport will execute reverse engineering task for all entities from “shop-01” and “shop-02”, including tables, views, stored procedures |
| and table columns. As “shop-03” has variety filter tags, entities from this catalog will be filtered by cdbimport. |
| </p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="d0e3501"></a>Ant configuration example</h2></div></div></div><p> Here is config sample for <code class="code">Ant</code> task: |
| </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment"><!-- inside <cdbimport> tag --></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog></span>shop-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">name</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"shop-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><catalog</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">name</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"shop-03"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable></span>includeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"includeTable-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeTable</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"includeTable-03"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn></span>includeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn></span>excludeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeTable></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeTable></span>excludeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeTable></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeTable</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"excludeTable-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn></span>includeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeColumn</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"includeColumn-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn></span>excludeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeColumn></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeColumn</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"excludeColumn-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeProcedure></span>includeProcedure-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></includeProcedure></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><includeProcedure</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"includeProcedure-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeProcedure></span>excludeProcedure-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></excludeProcedure></span> |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"><excludeProcedure</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"excludeProcedure-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/></span> |
| |
| <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag"></catalog></span></pre><p> |
| </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> |
| In Ant task configuration all filter tags located inside root tag <code class="code"><cdbimport></code> as there is no <code class="code"><dbimport></code> tag. |
| </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re-introduction.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re-relationships-loading-control.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 19. Introduction </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. Other Settings</td></tr></table></div></body></html> |