<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6849695496908244507</id><updated>2024-08-28T13:59:47.874-07:00</updated><title type='text'>Framework / Middleware</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6849695496908244507.post-6171648407046930673</id><published>2011-01-19T19:00:00.000-08:00</published><updated>2011-01-19T19:02:45.273-08:00</updated><title type='text'>JDeveloper - Create XSD file from XML file</title><content type='html'>&lt;div class=&quot;post-content clearfix&quot;&gt;While looking into the XML functionality in JDeveloper 11g,&amp;nbsp;you can use the function XML&amp;nbsp;Schema from XML&amp;nbsp;Document. Functionality previously found in commercial products such as XMLSpy, that enables us to make a head start with the development of XML&amp;nbsp;Schema Definitions by using an existing XML&amp;nbsp;Document as starting point.&lt;br /&gt;
In this article, I will very briefly demonstrate what this functionality allows us to do. And what its current limitations are.&lt;br /&gt;
In short: we can indicate an XML document and have an XSD created that derives its element, type and attribute definitions from the actual XML content in that document. Most XML documents do not represent the entire set of restrictions &lt;em&gt;and&lt;/em&gt; freedom that the XSD will describe, so the generated XSD is only a starting point – but a very useful one all the same.&lt;br /&gt;
At this moment, the XML source document has to exist on the file system (we cannot feed the tool with a URL). The created XSD document does not work well with multiple namespaces – as well will see in this example. The tool does not create named (complexTypes) – only (nested) elements. It does create, when so requested, simpleTypes with enumerations that describe all occurring values in the source XML document. Such enumerations are usually required only for a limited number of elements. Of course removing the types we do not need is not a lot of work. Yet it would be comfortable to specify in more detail for which elements to create these enumerations.&lt;br /&gt;
&lt;span id=&quot;more-6308&quot;&gt;&lt;/span&gt;The example: I have created a source XML document from the RSS feed on this weblog (http://technology.amis.nl/blog/feed).I have set the default namespace for this document. A snippet from the document:&lt;br /&gt;
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;rss version=&quot;2.0&quot; xmlns=&quot;RSS_NS&quot;
 xmlns:content=&quot;http://purl.org/rss/1.0/modules/content/&quot;
 xmlns:wfw=&quot;http://wellformedweb.org/CommentAPI/&quot;
 xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;
 xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot;&amp;gt;
&amp;lt;channel&amp;gt;
 &amp;lt;title&amp;gt;AMIS Technology blog&amp;lt;/title&amp;gt;
 &amp;lt;atom:link href=&quot;http://technology.amis.nl/blog/feed&quot; rel=&quot;self&quot; type=&quot;application/rss+xml&quot; /&amp;gt;
 &amp;lt;link&amp;gt;http://technology.amis.nl/blog&amp;lt;/link&amp;gt;
 &amp;lt;description&amp;gt;Weblog for the AMIS Technology corner&amp;lt;/description&amp;gt;
 &amp;lt;pubDate&amp;gt;Sat, 03 Oct 2009 07:00:24 +0000&amp;lt;/pubDate&amp;gt;
 &amp;lt;generator&amp;gt;http://wordpress.org/?v=2.6.5&amp;lt;/generator&amp;gt;
 &amp;lt;language&amp;gt;en&amp;lt;/language&amp;gt;
        &amp;lt;item&amp;gt;
   &amp;lt;title&amp;gt;Book Review: Processing XML Documents with Oracle JDeveloper 11g by Deepak Vohra&amp;lt;/title&amp;gt;
   &amp;lt;link&amp;gt;http://technology.amis.nl/blog/6295/book-review-processing-xml-documents-with-oracle-jdeveloper-11g-by-deepak-vohra&amp;lt;/link&amp;gt;
   &amp;lt;comments&amp;gt;http://technology.amis.nl/blog/6295/book-review-processing-xml-documents-with-oracle-jdeveloper-11g-by-deepak-vohra#comments&amp;lt;/comments&amp;gt;
   &amp;lt;pubDate&amp;gt;Sat, 03 Oct 2009 07:00:24 +0000&amp;lt;/pubDate&amp;gt;
   &amp;lt;dc:creator&amp;gt;Lucas Jellema&amp;lt;/dc:creator&amp;gt;
   &amp;lt;category&amp;gt;&amp;lt;![CDATA[General]]&amp;gt;&amp;lt;/category&amp;gt;
          ...
&lt;/pre&gt;Next I have used the XML&amp;nbsp;Schema from XML&amp;nbsp;Document option in the New Gallery. I selected the source XML document and had the XSD generated. In the visual editor, the XSD looks like this:&lt;br /&gt;
&lt;img alt=&quot;&quot; height=&quot;678&quot; src=&quot;http://technology.amis.nl/blog/wp-content/uploads/xsdFromXML3.png&quot; width=&quot;530&quot; /&gt;&lt;br /&gt;
No named types, only elements with nested elements based on nested, anonymous complex type definitions. Well structured. With a proper global target namespace. And with strange handling of the other namespaces, especially the dc:creator element in the {http://purl.org/dc/elements/1.1/}&amp;nbsp; namespace and likewise the atom:link element in the {http://www.w3.org/2005/Atom} namespace.&lt;br /&gt;
&lt;pre&gt;&amp;lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns=&quot;RSS_NS&quot;
            &lt;strong&gt;targetNamespace=&quot;RSS_NS&quot;&lt;/strong&gt; elementFormDefault=&quot;qualified&quot;&amp;gt;
  &amp;lt;xsd:element name=&quot;rss&quot;&amp;gt;
    &amp;lt;xsd:complexType&amp;gt;
      &amp;lt;xsd:sequence&amp;gt;
        &amp;lt;xsd:element name=&quot;channel&quot;&amp;gt;
          &amp;lt;xsd:complexType&amp;gt;
            &amp;lt;xsd:sequence&amp;gt;
              &amp;lt;xsd:element name=&quot;title&quot; type=&quot;xsd:string&quot;/&amp;gt;
&lt;strong&gt;              &amp;lt;xsd:element name=&quot;link&quot; maxOccurs=&quot;unbounded&quot;&amp;gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre&gt;&amp;lt;xsd:complexType&amp;gt;
                  &amp;lt;xsd:simpleContent&amp;gt;
                    &amp;lt;xsd:extension base=&quot;xsd:string&quot;&amp;gt;
                      &amp;lt;xsd:attribute name=&quot;href&quot; type=&quot;xsd:string&quot;/&amp;gt;
                      &amp;lt;xsd:attribute name=&quot;rel&quot; type=&quot;xsd:string&quot;/&amp;gt;
                      &amp;lt;xsd:attribute name=&quot;type&quot; type=&quot;xsd:string&quot;/&amp;gt;
                    &amp;lt;/xsd:extension&amp;gt;
                  &amp;lt;/xsd:simpleContent&amp;gt;
                &amp;lt;/xsd:complexType&amp;gt;
              &amp;lt;/xsd:element&amp;gt;
              &amp;lt;xsd:element name=&quot;description&quot; type=&quot;xsd:string&quot;/&amp;gt;
              &amp;lt;xsd:element name=&quot;pubDate&quot; type=&quot;xsd:string&quot;/&amp;gt;
              &amp;lt;xsd:element name=&quot;generator&quot; type=&quot;xsd:string&quot;/&amp;gt;
              &amp;lt;xsd:element name=&quot;language&quot; type=&quot;xsd:string&quot;/&amp;gt;
              &amp;lt;xsd:element name=&quot;item&quot; maxOccurs=&quot;unbounded&quot;&amp;gt;
                &amp;lt;xsd:complexType&amp;gt;
                  &amp;lt;xsd:sequence&amp;gt;
                    &amp;lt;xsd:element name=&quot;title&quot; type=&quot;xsd:string&quot;/&amp;gt;
                    &amp;lt;xsd:element name=&quot;link&quot; type=&quot;xsd:string&quot;/&amp;gt;
                    &amp;lt;xsd:element name=&quot;comments&quot; type=&quot;xsd:string&quot;/&amp;gt;
                    &amp;lt;xsd:element name=&quot;pubDate&quot; type=&quot;xsd:string&quot;/&amp;gt;
&lt;strong&gt;                    &amp;lt;xsd:element name=&quot;creator&quot; type=&quot;xsd:string&quot;/&amp;gt;                     ...&lt;/strong&gt;      &amp;lt;xsd:attribute name=&quot;wfw&quot; type=&quot;xsd:string&quot;/&amp;gt;
&lt;strong&gt;      &amp;lt;xsd:attribute name=&quot;dc&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre&gt;&lt;strong&gt;      &amp;lt;xsd:attribute name=&quot;atom&quot; type=&quot;xsd:string&quot;/&amp;gt;&lt;/strong&gt;&lt;/pre&gt;&lt;pre&gt;&amp;lt;/xsd:complexType&amp;gt;
  &amp;lt;/xsd:element&amp;gt;
&amp;lt;/xsd:schema&amp;gt;
&lt;/pre&gt;This XSD is great first step – that you then have to take a little bit further. But for getting started with an XSD document, this is an excellent feature!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/6171648407046930673/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-create-xsd-from-xml-instance.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/6171648407046930673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/6171648407046930673'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-create-xsd-from-xml-instance.html' title='JDeveloper - Create XSD file from XML file'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6849695496908244507.post-7070044271292715135</id><published>2011-01-19T01:12:00.000-08:00</published><updated>2011-01-19T01:12:34.370-08:00</updated><title type='text'>JDeveloper - A Java Servlet by using ADF Model</title><content type='html'>Sometimes&amp;nbsp;a servlet&amp;nbsp;may need to call services provided in the application module (ADF Model default name: AppModule) in the ADF framework. In this article, I would like to show the steps on how to create a Java Servlet which invokes the methods exposed through the application module.&lt;br /&gt;
&lt;br /&gt;
Firstly, you should follow the steps in this&amp;nbsp;&lt;a href=&quot;http://middlework.blogspot.com/2011/01/jdeveloper-fusion-web-application-adf.html&quot;&gt;blog&amp;nbsp;post&lt;/a&gt; to new the ADF web&amp;nbsp;application and setup the DB connection. Make sure you have the following projects, &quot;Model&quot; and &quot;ViewController&quot; projects&amp;nbsp;as below figure.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHkMSLV5sosSup5WZFhArCNfjY_1oAZBm5vnhkc0lQ5fUhCLpsDQIcyKySpLn8qQ-JxTtnLKorTcxbjCZ0GUSdQ4oY-RqZUsGl4hrMgsCnU2nlps_Jp6M80TL5Y6w4nEtldstwMRw6khnA/s1600/i-11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHkMSLV5sosSup5WZFhArCNfjY_1oAZBm5vnhkc0lQ5fUhCLpsDQIcyKySpLn8qQ-JxTtnLKorTcxbjCZ0GUSdQ4oY-RqZUsGl4hrMgsCnU2nlps_Jp6M80TL5Y6w4nEtldstwMRw6khnA/s1600/i-11.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;Then, right click your mouse on the project &quot;Model&quot; and then click &quot;New&quot; to get the pop-up dialog &quot;New Gallery&quot;. Select the &quot;ADF Business Components&quot; in the &quot;Business Tier&quot; categories.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAnUix0n8c79C1v9Tbc0Ucn8xVglVfnFrxsNl_WsBrwunF51n6u2u7fMZeryp3M7Oz5QCwTX69bTTMAs1TJb2ZySEb-qdl7iBUVKCxFImICCflZaMw3uZFC6aVbtUxMkhat4trGcL-NGRm/s1600/i-12.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAnUix0n8c79C1v9Tbc0Ucn8xVglVfnFrxsNl_WsBrwunF51n6u2u7fMZeryp3M7Oz5QCwTX69bTTMAs1TJb2ZySEb-qdl7iBUVKCxFImICCflZaMw3uZFC6aVbtUxMkhat4trGcL-NGRm/s1600/i-12.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Select &quot;Business Components from Tables&quot; in the items, and then press &quot;OK&quot; button to get the pop-up dialog &quot;Create Business Components from Table - Step 1 of 6&quot;.&lt;br /&gt;
&lt;br /&gt;
In the pop-up dialog &quot;Create Business Components from Table - Step 1 of 6&quot;,&amp;nbsp; you will see that&amp;nbsp;&lt;em&gt;Step 1&lt;/em&gt; is to create entity objects by tables.&lt;em&gt; Step 2&lt;/em&gt; is create view objects which is able to update by available entity objects. &lt;em&gt;Step 3&lt;/em&gt; is create view objects which is only for read by tables.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx-jaw5q_UhSSSl-pj-A5LdwLYAEHtk-IawLF2cpT5jnI5MMc5dt4sPfraZjuZDBNdE6JnF0nI77xmewa4Wi1uyUkCDQJHM1F6mgfR7OlhGoLPW-anZR7J7WPqTIaYygIclNp-LjY_ZoYm/s1600/i-13.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx-jaw5q_UhSSSl-pj-A5LdwLYAEHtk-IawLF2cpT5jnI5MMc5dt4sPfraZjuZDBNdE6JnF0nI77xmewa4Wi1uyUkCDQJHM1F6mgfR7OlhGoLPW-anZR7J7WPqTIaYygIclNp-LjY_ZoYm/s1600/i-13.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Press &quot;Query&quot; directly with the Name Filter &quot;%&quot;&amp;nbsp;will get all the table available in the database schema.</content><link rel='replies' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/7070044271292715135/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-java-servlet-by-using-adf.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/7070044271292715135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/7070044271292715135'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-java-servlet-by-using-adf.html' title='JDeveloper - A Java Servlet by using ADF Model'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHkMSLV5sosSup5WZFhArCNfjY_1oAZBm5vnhkc0lQ5fUhCLpsDQIcyKySpLn8qQ-JxTtnLKorTcxbjCZ0GUSdQ4oY-RqZUsGl4hrMgsCnU2nlps_Jp6M80TL5Y6w4nEtldstwMRw6khnA/s72-c/i-11.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6849695496908244507.post-1096094089076807560</id><published>2011-01-10T02:59:00.000-08:00</published><updated>2011-01-11T17:33:32.901-08:00</updated><title type='text'>JDeveloper - Fusion Web Application (ADF) with HR Schema</title><content type='html'>If you are interested in the development of Fusion Web Application (ADF) by using JDeveloper, you can follow tutorials&amp;nbsp;provided in &lt;a href=&quot;http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html&quot;&gt;Oracle JDeveloper&amp;nbsp;- Official Home Page&lt;/a&gt;. &lt;em&gt;JDeveloper&lt;/em&gt; is a free development (IDE) tool&amp;nbsp;that Oracle supplies to help developers build applications for deployment onto both the middleware platform and the database. In this article, I would like to shows the steps for creating a Web Appliation by using Oracle&amp;nbsp;ADF and&amp;nbsp;Oracle ADF Business Component to map Java objects to HR Schema (a database schema provided in Oracle Database 10g Express Edition&lt;em&gt; which is free to&lt;/em&gt; &lt;em&gt;download and&amp;nbsp;install&amp;nbsp;it from &lt;/em&gt;&lt;a href=&quot;http://www.oracle.com/technetwork/database/express-edition/downloads/index.html&quot;&gt;&lt;em&gt;Oracle Databae 10g Express Edition&lt;/em&gt;&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
After the installation of JDeveloper 11g, you can start JDeveloper using the shortcut your installation provided.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP7V6_7k8o-T7f_-h3JPH9myhuMwzHjgPT6TmIYJXq4rPgxHRlYBRRCN5wpoSXi5QmQc-s2RgLCiUvbQyr2gRK7SDspUoWluV6WSGk6wUIFB_IkkAZS3JK4kBW7gcJkYhCFkh7C8_QGYlR/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP7V6_7k8o-T7f_-h3JPH9myhuMwzHjgPT6TmIYJXq4rPgxHRlYBRRCN5wpoSXi5QmQc-s2RgLCiUvbQyr2gRK7SDspUoWluV6WSGk6wUIFB_IkkAZS3JK4kBW7gcJkYhCFkh7C8_QGYlR/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;﻿&lt;/div&gt;Oracle JDeveloper 11g will&amp;nbsp;prompt the following figure&amp;nbsp;during starting JDeveloper.﻿&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfsWqtNhtZ8BPL5s1ikGku-7gP4hQO-BSr_G4U33ldkk78nbKOzbu6yIh6pjJi0r3t20ycTqTjOnj-h3Fs60EhyYomXedAISP78r_cVasC5ZSBE19Za0UnYtEKaRY8-3fELna-DW0eSXIT/s1600/i-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfsWqtNhtZ8BPL5s1ikGku-7gP4hQO-BSr_G4U33ldkk78nbKOzbu6yIh6pjJi0r3t20ycTqTjOnj-h3Fs60EhyYomXedAISP78r_cVasC5ZSBE19Za0UnYtEKaRY8-3fELna-DW0eSXIT/s1600/i-1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;﻿&lt;/div&gt;When the dialog &quot;Select Role&quot; prompted to choose a role, select the &quot;Default Role&quot; and then press &quot;OK&quot; button. &lt;em&gt;If you select other options (Such as Java EE Edition), it﻿ will reduce the options available in that JDeveloper session. This can assist in reducing the complexity of the IDE and&amp;nbsp;it is tailored to display what type of work you need. &lt;/em&gt;You can turn off this dialog by unchecked the &quot;Always prompt for role selection on startup&quot; checkbox.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkaAweAT32CZcUxGpo2Z8BNOcQYPn_JYyCg-BCNv7iH8zJ4-wmGxlxwvx5WfLXQibsbBYqKzBWOPnJGS_3CGSQjrwSRLcSIuPfT6BWpgTQuAOMUOr214LJoSRBKQWnAHv9RBXBksBHtQ03/s1600/i-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkaAweAT32CZcUxGpo2Z8BNOcQYPn_JYyCg-BCNv7iH8zJ4-wmGxlxwvx5WfLXQibsbBYqKzBWOPnJGS_3CGSQjrwSRLcSIuPfT6BWpgTQuAOMUOr214LJoSRBKQWnAHv9RBXBksBHtQ03/s1600/i-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkaAweAT32CZcUxGpo2Z8BNOcQYPn_JYyCg-BCNv7iH8zJ4-wmGxlxwvx5WfLXQibsbBYqKzBWOPnJGS_3CGSQjrwSRLcSIuPfT6BWpgTQuAOMUOr214LJoSRBKQWnAHv9RBXBksBHtQ03/s1600/i-2.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;The IDE window of JDeveloper will be shown as the following figure. A &quot;Tip of the Day&quot; dialog&amp;nbsp;will be displayed. You can turn off this dialog by unchecked the &quot;Show tips at startup&quot; checkbox.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5IS-9dsDWX-ckQrNzlfupF8BUHe1Fv2hrSfUlSSjHsjFAU2sR_Y91mZHWz8Y-z3Dcv3ndrwnAJg5XM2d5eDoc3vHC45hCPmZLcJX_pJ-BHva7m1pyLEkVsB5GQdgbVzZ2Y6ni77UeTIMp/s1600/i-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5IS-9dsDWX-ckQrNzlfupF8BUHe1Fv2hrSfUlSSjHsjFAU2sR_Y91mZHWz8Y-z3Dcv3ndrwnAJg5XM2d5eDoc3vHC45hCPmZLcJX_pJ-BHva7m1pyLEkVsB5GQdgbVzZ2Y6ni77UeTIMp/s1600/i-3.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;Click &quot;New Application&quot; in the &quot;Application Navigator&quot; to create a new application.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJz8dZs-jfpmITiq094k7KfbP-5024vF0YLNQQtG-q2W7Eoxk_8eTMbmPdKq0UfoumZFR_lsCNxoLHVCIPQ4ZFnu0RUaGXkCTw_IV9Y5IkRnX6uMSSZ5Q_sRy_XlwDPaAAsSHxu6Ng6bdq/s1600/untitled.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJz8dZs-jfpmITiq094k7KfbP-5024vF0YLNQQtG-q2W7Eoxk_8eTMbmPdKq0UfoumZFR_lsCNxoLHVCIPQ4ZFnu0RUaGXkCTw_IV9Y5IkRnX6uMSSZ5Q_sRy_XlwDPaAAsSHxu6Ng6bdq/s1600/untitled.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;Type your application name, di&lt;span style=&quot;background-color: white;&quot;&gt;rectory and&amp;nbsp;application package prefix. By selecting the Fusion Web Application (ADF) in the options of Application Template, you can create a web application with ADF Framework.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW6MolVgijh8umnWGTpX7tE-2gBGKJ4QjoxQnjRo494I2upTeJRY-Q-8mTUotZhaJcErk9E7HZFPuKaAtg3FCtRcfH4kCfTcyf5Z9lNSrM6ZvjRLvlzeYARDzg2ann9LPqFxMmiBus4Vt2/s1600/i-4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW6MolVgijh8umnWGTpX7tE-2gBGKJ4QjoxQnjRo494I2upTeJRY-Q-8mTUotZhaJcErk9E7HZFPuKaAtg3FCtRcfH4kCfTcyf5Z9lNSrM6ZvjRLvlzeYARDzg2ann9LPqFxMmiBus4Vt2/s1600/i-4.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;In the step 1 of 5 for creating Fusion Web Application (ADF), you can press &quot;Finish&quot; button to create the application instantly after you have typed the application name, di&lt;span style=&quot;background-color: white;&quot;&gt;rectory and&amp;nbsp;application package prefix&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;. Of course, you can go to next step to change the&amp;nbsp;project setting by &quot;Next&quot; button.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
After that, you can see the following figure after a Fusion Web Application (ADF) is created. The&amp;nbsp;&lt;strong&gt;Overview &lt;/strong&gt;pane displays a Checklist&amp;nbsp;as a guide for developing a Fusion Web Application (ADF). The Checklist of &quot;TestAppDB Overview&quot;&amp;nbsp;is displayed by default when a Fusion Web application (ADF)&amp;nbsp;is created.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhziqO4HWVNcD2IS5aS2Wv8Ak6yVdX7teAjEAayReHlIkdjQv6ssDTWgkkAdmRjtICePXuQcACyEYVQJgowZQby-f5CIU5sM_kUFAukECht6ksXjffewQsA70GZpMSBazmOkI_xHMvNQgCI/s1600/i-5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhziqO4HWVNcD2IS5aS2Wv8Ak6yVdX7teAjEAayReHlIkdjQv6ssDTWgkkAdmRjtICePXuQcACyEYVQJgowZQby-f5CIU5sM_kUFAukECht6ksXjffewQsA70GZpMSBazmOkI_xHMvNQgCI/s1600/i-5.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;In the &quot;Application Navigator&quot;, you will see two new projects, one called &lt;strong&gt;Model&lt;/strong&gt; and the other called &lt;strong&gt;ViewController&lt;/strong&gt;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo-SodIOHM5iq6Q5YSp-88FOAPD6OLUUIRVThHADkIEPyQm5hySN81ZAUA0L_3bWSbgH52nrsJWJRsPlZzzUIuCEhtQaMhvPRwfMc781Zco2p3bpzWo8cnABamxDvyLtPlSs0TkJo9NMoe/s1600/i-6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo-SodIOHM5iq6Q5YSp-88FOAPD6OLUUIRVThHADkIEPyQm5hySN81ZAUA0L_3bWSbgH52nrsJWJRsPlZzzUIuCEhtQaMhvPRwfMc781Zco2p3bpzWo8cnABamxDvyLtPlSs0TkJo9NMoe/s1600/i-6.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;JDeveloper&amp;nbsp;provides a &quot;Checklist&quot;&amp;nbsp;for you easy to&amp;nbsp;connect a database. Click &quot;Create a Database Connection&quot; button in the step 2 &quot;Connect to a Database&quot; to get the pop-up dialog &quot;Create Database Connection&quot;.&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZpoPscXq7Sa9ybWHdEPhLueH_FcQBbDit6uiuSB9ONyifcGHWTBaiBerAsor1e-hs73bWElyfMbxgAxj_fJqSmYVkZk9hbYgBWoXp3YlHXqKkIu5u2g5DAYWxmqJlBaVTN0FRzcvVfDA9/s1600/i-7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZpoPscXq7Sa9ybWHdEPhLueH_FcQBbDit6uiuSB9ONyifcGHWTBaiBerAsor1e-hs73bWElyfMbxgAxj_fJqSmYVkZk9hbYgBWoXp3YlHXqKkIu5u2g5DAYWxmqJlBaVTN0FRzcvVfDA9/s1600/i-7.jpg&quot; /&gt;&lt;/a&gt; Alternatively,&amp;nbsp;&quot;Connect to&amp;nbsp;a Database&quot; can be done in the &quot;Application Resources&quot; of the &quot;Application Navigator&quot;. Choose &quot;Connections&quot; under the &quot;Application Resources&quot; and then right click your mouse and click &quot;Database&quot; of the&amp;nbsp;context menu &quot;New Connection&quot; to get&amp;nbsp;the pop-up dialog &quot;Create Database Connection&quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8eQYKn-X8li6njrFW6uHMx3jb2QvpWJ6IwQYMmyMUHDS4GznQhsgaN67IB-A3J9oFQ4uE5_3So1Nd4rLCLWUZwqGNE-hgOYocDizspwFP6ZNh9Wnq2sZH2YgmchdEBuccEl3pL-BNanLT/s1600/i-9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8eQYKn-X8li6njrFW6uHMx3jb2QvpWJ6IwQYMmyMUHDS4GznQhsgaN67IB-A3J9oFQ4uE5_3So1Nd4rLCLWUZwqGNE-hgOYocDizspwFP6ZNh9Wnq2sZH2YgmchdEBuccEl3pL-BNanLT/s1600/i-9.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In the pop-up dialog &quot;Create Database Connection&quot;,&amp;nbsp; type the Connection Name, Username (eg. &quot;hr&quot;)&amp;nbsp;and Password (eg. &quot;hr&quot;) and the SID&amp;nbsp;(eg. XE - a default SID&amp;nbsp;of Oracle Database 10g Express Edition) for connecting to HR Schema.&amp;nbsp;Press &quot;Test Connection&quot; button to test the connection whether is successful.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxYjXcZapmdpk1A0oJT95cELbWIu4JfluYMbhD4s1atnNbKxTRteR39FiSQuJxCrDOvXrH4xkEuIAZ-KUHU8YSPr0UeIunM_U2fScSDrpWDhg4iOC3fFvk6emV7ooFMLpj-P7UQyGwXNLf/s1600/i-8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxYjXcZapmdpk1A0oJT95cELbWIu4JfluYMbhD4s1atnNbKxTRteR39FiSQuJxCrDOvXrH4xkEuIAZ-KUHU8YSPr0UeIunM_U2fScSDrpWDhg4iOC3fFvk6emV7ooFMLpj-P7UQyGwXNLf/s1600/i-8.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Press &quot;OK&quot; button if the connection is success. If you cannot get the successful message &quot;Success!&quot;&amp;nbsp;of the database connection,&amp;nbsp;connect to the Oracle Database and then unlock the user account &quot;HR&quot; (Since the user account &quot;HR&quot; is locked by default in XE).&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZh9fgiyK7LplWFnCrBYD7rMwwAxCJeCHsBKn4lcNjmnMhGg5JOz1t0AyavLqVu75l5Nx12831m-aBfyseRwc884zZ9PeklCtZxFmLmHj_Z2zXKTIzZ4eeHwjnKeUsfNKQO2oemZhdUCR8/s1600/i-10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZh9fgiyK7LplWFnCrBYD7rMwwAxCJeCHsBKn4lcNjmnMhGg5JOz1t0AyavLqVu75l5Nx12831m-aBfyseRwc884zZ9PeklCtZxFmLmHj_Z2zXKTIzZ4eeHwjnKeUsfNKQO2oemZhdUCR8/s1600/i-10.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;After a database connection &quot;TestAppDBConn&quot;&amp;nbsp;is created, the &quot;TestAppDBConn&quot; is shown under&amp;nbsp;the &quot;Connections&quot; resources&amp;nbsp;of the &quot;Application Resources&quot;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHkMSLV5sosSup5WZFhArCNfjY_1oAZBm5vnhkc0lQ5fUhCLpsDQIcyKySpLn8qQ-JxTtnLKorTcxbjCZ0GUSdQ4oY-RqZUsGl4hrMgsCnU2nlps_Jp6M80TL5Y6w4nEtldstwMRw6khnA/s1600/i-11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHkMSLV5sosSup5WZFhArCNfjY_1oAZBm5vnhkc0lQ5fUhCLpsDQIcyKySpLn8qQ-JxTtnLKorTcxbjCZ0GUSdQ4oY-RqZUsGl4hrMgsCnU2nlps_Jp6M80TL5Y6w4nEtldstwMRw6khnA/s1600/i-11.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;strong&gt;Glossary:&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;IDE&lt;/em&gt;&amp;nbsp;-&amp;nbsp;Integrated development environment&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/1096094089076807560/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-fusion-web-application-adf.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/1096094089076807560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/1096094089076807560'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-fusion-web-application-adf.html' title='JDeveloper - Fusion Web Application (ADF) with HR Schema'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP7V6_7k8o-T7f_-h3JPH9myhuMwzHjgPT6TmIYJXq4rPgxHRlYBRRCN5wpoSXi5QmQc-s2RgLCiUvbQyr2gRK7SDspUoWluV6WSGk6wUIFB_IkkAZS3JK4kBW7gcJkYhCFkh7C8_QGYlR/s72-c/a.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6849695496908244507.post-3550530947918604341</id><published>2011-01-06T02:26:00.000-08:00</published><updated>2011-01-06T02:26:56.612-08:00</updated><title type='text'>JDeveloper - Validations in ADF (Validation Domain)</title><content type='html'>In the previous article, you&amp;nbsp;know that&amp;nbsp;you can create custom validation rule for an attribute. The validation rule type can be system provided (Compare, Key Exists, Length, List, Method, Range, Regular Expression, Script Expression) or user custom (Custom Validation Rule).&amp;nbsp;Alternatively,&amp;nbsp;you can apply custom&amp;nbsp;domains which can also be used to provide validation&amp;nbsp;to attribute&#39;s type. These domains, called validation domains, wrap other domains or standard Java classes (such as String) that can be used to attribute types, but include validation code as well. These domains have theirs advantages because they can be used for many attributes just by setting the attribute&#39;s type to the &lt;em&gt;validation domain&lt;/em&gt;.&lt;br /&gt;
&lt;br /&gt;
I would like to show the steps for creating a validation domain. Choose a package &quot;test.app.model.framework&quot;&amp;nbsp;and then right click your mouse and click &quot;New Domain&quot; to get the pop-up dialog &quot;Create Domain&quot;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM_1w-p-fojLMnXdzXBen2igNf6lriIpU7sMlzkwit6ElPphcNEBTYDFw18wxj9_PPZMlRmdWy-CIOxpnRwJrQ4OZuwEt1pmCmfXYx4H1PiNgYSLo1OcdS4aihyRZIRAWufhYzab-Ih9a1/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM_1w-p-fojLMnXdzXBen2igNf6lriIpU7sMlzkwit6ElPphcNEBTYDFw18wxj9_PPZMlRmdWy-CIOxpnRwJrQ4OZuwEt1pmCmfXYx4H1PiNgYSLo1OcdS4aihyRZIRAWufhYzab-Ih9a1/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;In the pop-up dialog &quot;Create Domain&quot;,&amp;nbsp; type the Name of validation domain as below and then press &quot;Next&quot; button.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0dmimyV8thvtHjVWgfgFmLcBXqRzUCSgaeiJmKc0czvqrizQcp137bUMYDIHoS8Dagdv2BRo20XhkNkBcReXET_mUBCBZJxaw7s0ZUB8zheDJC1wKkHeSBf8q7aYS9mSmd9nBp-faK3ZQ/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0dmimyV8thvtHjVWgfgFmLcBXqRzUCSgaeiJmKc0czvqrizQcp137bUMYDIHoS8Dagdv2BRo20XhkNkBcReXET_mUBCBZJxaw7s0ZUB8zheDJC1wKkHeSBf8q7aYS9mSmd9nBp-faK3ZQ/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Choose the attribute value&#39;s type to &quot;String&quot;. There are many options such as &quot;Mandatory&quot; or &quot;Primary Key&quot;. &lt;br /&gt;
&lt;br /&gt;
Eg 1. An attribute with mandatory domain as its type must always be mandatory.&lt;br /&gt;
Eg 2. An attribute with a primary key domain as&amp;nbsp;its type&amp;nbsp;is always part of&amp;nbsp;its entity object definition&#39;s primary key. &lt;br /&gt;
Eg 3. An attribute with a domain that maps to VARCHAR(30) as its length can have no more than 30 characters in its values.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWJHui8irl3ThHnRzLTfyKh2FUAGhrqWeSHyjcGnhhFC9zne_eCdHhu_tkFd_B96bK9mQ2OEHCB3T2VDONzgPAcwS62wojyrW74kFdlJ5EXlrAB2egI88skb5ihrPKT6l6hL__dVvg1ba6/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWJHui8irl3ThHnRzLTfyKh2FUAGhrqWeSHyjcGnhhFC9zne_eCdHhu_tkFd_B96bK9mQ2OEHCB3T2VDONzgPAcwS62wojyrW74kFdlJ5EXlrAB2egI88skb5ihrPKT6l6hL__dVvg1ba6/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can press &quot;Next&quot; button to view more detail before click &quot;Finish&quot; button.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNCt5wuXVWkJvnSW6pcQFxQGUCMb46HGHS4S-FuqYJcTqwgbkyyxt4BcX54gcJPEppFkPSNsf1Adcfb9dW-wEwQbigystcDJ60yHSayXeKxIiEFpW8Sg9SeisRJrNOqIHQxM5PTqJxpr1b/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNCt5wuXVWkJvnSW6pcQFxQGUCMb46HGHS4S-FuqYJcTqwgbkyyxt4BcX54gcJPEppFkPSNsf1Adcfb9dW-wEwQbigystcDJ60yHSayXeKxIiEFpW8Sg9SeisRJrNOqIHQxM5PTqJxpr1b/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
After&amp;nbsp;you click the&amp;nbsp;&quot;Finish&quot; button, you can see that a new validation domain&amp;nbsp;&quot;JobIdDomain&quot; is created.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs_qXVFd28IOn-94H6P4oQ93T6PRreoWbLxO67b1vndDkTwZpKtbNnQL-s1s6Y8B-kzkz869KAOtZc4_Q9Abn94Ntd9rBv8vzcNxZM4HYyBLzi2oms7dSzENtIJpC7u_s8M02t5567EWRn/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs_qXVFd28IOn-94H6P4oQ93T6PRreoWbLxO67b1vndDkTwZpKtbNnQL-s1s6Y8B-kzkz869KAOtZc4_Q9Abn94Ntd9rBv8vzcNxZM4HYyBLzi2oms7dSzENtIJpC7u_s8M02t5567EWRn/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp;Then, you should implement your validation logic to require an attribute not be null or an attribute fit into&amp;nbsp;a particular size or precision and scale in the method &quot;validate&quot; of the domain class &quot;JobIdDomain.java&quot;. Please get the source code at the&amp;nbsp;last part&amp;nbsp;of this tutorial.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig4BIF20cNJHp86vEKnB2qIB3yHORvYRfIkBAa9khs8MPqEw-7gU8bKqacVQ2YwYdvwFf7Hwfl2vi76sZmuFngkUfuyb7qaibW-lWV-0D3CKBBvEf9GUQxrFk3Qi2SzPpMitFxbsmH3Gzq/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig4BIF20cNJHp86vEKnB2qIB3yHORvYRfIkBAa9khs8MPqEw-7gU8bKqacVQ2YwYdvwFf7Hwfl2vi76sZmuFngkUfuyb7qaibW-lWV-0D3CKBBvEf9GUQxrFk3Qi2SzPpMitFxbsmH3Gzq/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I would like to require the attribute follow the standard format for a job ID as two capital letters followed by an underscore and followed by 2-4 capital letters. Thus, I added the following code to the domain class &quot;JobIdDomain.java&quot; and&amp;nbsp;its method &quot;validate&quot;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdR1GF1YCSYruD__nFIwUM6MGqjc8148Bg2M_kVZOvXaT2jqxjuzSKVJ_GaPu8rrYM4T6ythl4nEtJwa2bJTy7KNGYPc1wZdKg5C9CeIgSL5qpJFa6cxhAHrlyQ8cay7181hv49Z6eJ6dN/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdR1GF1YCSYruD__nFIwUM6MGqjc8148Bg2M_kVZOvXaT2jqxjuzSKVJ_GaPu8rrYM4T6ythl4nEtJwa2bJTy7KNGYPc1wZdKg5C9CeIgSL5qpJFa6cxhAHrlyQ8cay7181hv49Z6eJ6dN/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
After the domain validation rule is ready, you need to apply it to any attribute. I would like to apply this validation domain &quot;JobIdDomain&quot; to the attribute &quot;JobId&quot; of the entity &quot;Employees&quot;. Click &quot;Edit selected attribute&quot; button to get the pop-up dialog &quot;Edit Attribute&quot;.&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGFbKi8OpvKlsRLi2tf1UN5r31S9Cy1UGewFq4vbofEfKyTm71KDh4GxXQhas4VnKpatW8GxOqGaBii20fuvGWDiO5pA1yDNrIDmYRcSQS5orRQpaTAK82sOLCL_p753N6tFFhMqwvhQBb/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGFbKi8OpvKlsRLi2tf1UN5r31S9Cy1UGewFq4vbofEfKyTm71KDh4GxXQhas4VnKpatW8GxOqGaBii20fuvGWDiO5pA1yDNrIDmYRcSQS5orRQpaTAK82sOLCL_p753N6tFFhMqwvhQBb/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In the pop-up dialog, change the type of entity attribute from the type &quot;String&quot; to &quot;test.app.model.framework.common.JobIdDomain&quot;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwMkElDrDTmWR2AVfdwmtBqbKXkhxU4G2AC8qqg6wTyn1VrxCULz9m_nSZBkw84Hl4L6ZkIWtK7E5xbUY7KoWNnvywrSxGkxoEneX4j2cS35154UycjcF2GzM-pCIboH5yjIXms0wg6jc5/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwMkElDrDTmWR2AVfdwmtBqbKXkhxU4G2AC8qqg6wTyn1VrxCULz9m_nSZBkw84Hl4L6ZkIWtK7E5xbUY7KoWNnvywrSxGkxoEneX4j2cS35154UycjcF2GzM-pCIboH5yjIXms0wg6jc5/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The following figure shows that a Validation Domain &quot;JobIdDomain&quot; is applied in the attribute &quot;JobId&quot;.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPP8ss2L7r-0err2fRUVdTH_X_bLHcOS6V4ATOh2VV_OWvCMjN2ANOSdo2nhZin-mt3pevDdgiipuwWLta2ZrOtE4RbNcpAZ2B3vH2oAXYnAwojEdicrZK6ZU20VlVGyWDmcnoK2pBPVb8/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPP8ss2L7r-0err2fRUVdTH_X_bLHcOS6V4ATOh2VV_OWvCMjN2ANOSdo2nhZin-mt3pevDdgiipuwWLta2ZrOtE4RbNcpAZ2B3vH2oAXYnAwojEdicrZK6ZU20VlVGyWDmcnoK2pBPVb8/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #073763;&quot;&gt;&lt;em&gt;The following codes show the source code of JobIdDomain.java:&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
package test.app.model.framework.common;&lt;br /&gt;
import java.io.Serializable;&lt;br /&gt;
import oracle.jbo.JboException;&lt;br /&gt;
import oracle.jbo.Transaction;&lt;br /&gt;
import oracle.jbo.domain.DomainInterface;&lt;br /&gt;
import oracle.jbo.domain.DomainOwnerInterface;&lt;br /&gt;
// ---------------------------------------------------------------------&lt;br /&gt;
// ---&amp;nbsp;&amp;nbsp;&amp;nbsp; File generated by Oracle ADF Business Components Design Time.&lt;br /&gt;
// ---&amp;nbsp;&amp;nbsp;&amp;nbsp; Thu Jan 06 17:09:39 CST 2011&lt;br /&gt;
// ---&amp;nbsp;&amp;nbsp;&amp;nbsp; Custom code may be added to this class.&lt;br /&gt;
// ---&amp;nbsp;&amp;nbsp;&amp;nbsp; Warning: Do not modify method signatures of generated methods.&lt;br /&gt;
// ---------------------------------------------------------------------&lt;br /&gt;
public class JobIdDomain implements DomainInterface, Serializable {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public JobIdDomain(String val) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mData = new String(val);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; validate();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private String mData;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; protected JobIdDomain() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mData = &quot;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Object getData() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return mData;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * &amp;lt;b&amp;gt;Internal:&amp;lt;/b&amp;gt; &amp;lt;em&amp;gt;Applications should not use this method.&amp;lt;/em&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setContext(DomainOwnerInterface owner, Transaction trans,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object obj) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Implements domain validation logic and throws a JboException on error.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void validate() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; ### Implement custom domain validation logic here. ###&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public String toString() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mData != null) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return mData.toString();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &quot;&amp;lt;null&amp;gt;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public boolean equals(Object obj) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (obj instanceof DomainInterface) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mData != null) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return mData.equals(((DomainInterface)obj).getData());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ((DomainInterface)obj).getData() == null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/3550530947918604341/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-validations-in-adf_06.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/3550530947918604341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/3550530947918604341'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-validations-in-adf_06.html' title='JDeveloper - Validations in ADF (Validation Domain)'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM_1w-p-fojLMnXdzXBen2igNf6lriIpU7sMlzkwit6ElPphcNEBTYDFw18wxj9_PPZMlRmdWy-CIOxpnRwJrQ4OZuwEt1pmCmfXYx4H1PiNgYSLo1OcdS4aihyRZIRAWufhYzab-Ih9a1/s72-c/a.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6849695496908244507.post-5568994090466921797</id><published>2011-01-05T00:26:00.000-08:00</published><updated>2011-01-06T00:37:28.124-08:00</updated><title type='text'>JDeveloper - Validations in ADF (Custom Validation Rule)</title><content type='html'>Attribute-Level Validation Rules: You can create a new attribute in an entity and then create a new&amp;nbsp;validation rules for this attribute or existing attribute.&lt;br /&gt;
&lt;br /&gt;
Employees Entity:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuo5BvbAMsYgw5n5cqrbmhXVcE43-bvva8GkpqUTWlzhZ6fHv1u3GphxaRqCWQED_H7LHWgmd1Hk0aOHC-v5cztYPbGEPC1f5MVVJdOEPwSKR9zX-6fmeCaOslMJfaj7lZCaaCCJathdil/s1600/attributes.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuo5BvbAMsYgw5n5cqrbmhXVcE43-bvva8GkpqUTWlzhZ6fHv1u3GphxaRqCWQED_H7LHWgmd1Hk0aOHC-v5cztYPbGEPC1f5MVVJdOEPwSKR9zX-6fmeCaOslMJfaj7lZCaaCCJathdil/s1600/attributes.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;We don&#39;t mention how to create a attribute here. Just show the steps how to new a validation rule for an attribute &quot;PhoneNumber&quot;. &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8jBdvROJQVFWcG9-6QflhQjzfOwVjCJfTlGsqzEQz37YVBJgto14Ac2_uQoaPDruz37Ij5EiANtBcGAx6ebUIg6SYo0KoktM0HOHi0i0yelkU0GCU9TjJHgFPAh9ZgU0J8xjcG9Zxp8kf/s1600/attributes.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8jBdvROJQVFWcG9-6QflhQjzfOwVjCJfTlGsqzEQz37YVBJgto14Ac2_uQoaPDruz37Ij5EiANtBcGAx6ebUIg6SYo0KoktM0HOHi0i0yelkU0GCU9TjJHgFPAh9ZgU0J8xjcG9Zxp8kf/s1600/attributes.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Before you click &quot;Add Validation Rule&quot; button to apply a new validation rule to this attribute &quot;PhoneNumber&quot;, we would like to new a Custom Validation Rule. Choose a package &quot;test.app.model.framework&quot;&amp;nbsp;and then right click your mouse and click new to get the pop-up dialog &quot;New Gallery&quot;.&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMrp2u77LlI9nLGR2tUUNN6zvgQRArFFzDaF41tVsKHju_7JerEDDhG9JbGTSUKHNur59DFM6qQBQpjwmdjZI1wdiqhoFjTuURC81rQSNCfdMPVjXaaZoSXq2knXI0CYBDppD-EcnS-tfA/s1600/attributes.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMrp2u77LlI9nLGR2tUUNN6zvgQRArFFzDaF41tVsKHju_7JerEDDhG9JbGTSUKHNur59DFM6qQBQpjwmdjZI1wdiqhoFjTuURC81rQSNCfdMPVjXaaZoSXq2knXI0CYBDppD-EcnS-tfA/s1600/attributes.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
Choose the Validation Rule from the ADF Business Components in the pop-up dialog &quot;New Gallery&quot; and then press OK button to get the pop-up dialog &quot;Create Validation Rule Class&quot;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz6u1UsFZunML6godhlOSSl9yO0zr0MOuhSrsxiGMcowSDnR3tV0Hb8MwSQXSr-7envWKBFGyrVKJ0HLdylIVWhO9ZT__spDYeDPgEPNFVheJphxIobQwV6ld3K4mcxYqN50I7GrOFDgvG/s1600/attributes.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz6u1UsFZunML6godhlOSSl9yO0zr0MOuhSrsxiGMcowSDnR3tV0Hb8MwSQXSr-7envWKBFGyrVKJ0HLdylIVWhO9ZT__spDYeDPgEPNFVheJphxIobQwV6ld3K4mcxYqN50I7GrOFDgvG/s1600/attributes.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In the pop-up dialog &quot;Create Validation Rule Class&quot;, type the Name, Package, Extends, Rule Display Name and Rule Description&amp;nbsp;of custom validation rule as below.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOIaFfBJe14w6zjYDB8m50s0Ph4gm29SDU2kMZnMVy58F8j5PQ3K6gbBRodNs8fSaeBwrAdwWbHd6-w2JgDFW6jvnd-sRrj-pZDta_0bwkfFgji4nVGJyV_dkAMPYEybQU0dXK5azYoEQJ/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOIaFfBJe14w6zjYDB8m50s0Ph4gm29SDU2kMZnMVy58F8j5PQ3K6gbBRodNs8fSaeBwrAdwWbHd6-w2JgDFW6jvnd-sRrj-pZDta_0bwkfFgji4nVGJyV_dkAMPYEybQU0dXK5azYoEQJ/s1600/a.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
After that, a Custom Validation Rule is created. Of course, you should apply some property and validation logic in the class and its class method &quot;validateValue&quot;. If you just follow the source code in the book, it may be something wrong in the run time. Please get the source code at the&amp;nbsp;last part&amp;nbsp;of this tutorial.&lt;br /&gt;
&lt;br /&gt;
You can manage your registered rules in ADF Model in Project Properties.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioCkwXQER34W6RxhoqIPmXUlXIrzB4Oifh11rtHaDLUCRQXPgFehdGFimhtkIUsXvCxt060unle3_mt0rVawvyxrKWAefDSUH70bFDa96_N6LV-S99SefXWwBnUazUhoy8YEPVEPVx-241/s1600/a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;457&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioCkwXQER34W6RxhoqIPmXUlXIrzB4Oifh11rtHaDLUCRQXPgFehdGFimhtkIUsXvCxt060unle3_mt0rVawvyxrKWAefDSUH70bFDa96_N6LV-S99SefXWwBnUazUhoy8YEPVEPVx-241/s640/a.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Then, we go back to the Entity &quot;Employees&quot; and select the existing attribute &quot;PhoneNumber&quot;. Expend the block &quot;Validation Rules: PhoneNumber&quot; and click &quot;Add Validation Rule&quot; button.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8jBdvROJQVFWcG9-6QflhQjzfOwVjCJfTlGsqzEQz37YVBJgto14Ac2_uQoaPDruz37Ij5EiANtBcGAx6ebUIg6SYo0KoktM0HOHi0i0yelkU0GCU9TjJHgFPAh9ZgU0J8xjcG9Zxp8kf/s1600/attributes.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8jBdvROJQVFWcG9-6QflhQjzfOwVjCJfTlGsqzEQz37YVBJgto14Ac2_uQoaPDruz37Ij5EiANtBcGAx6ebUIg6SYo0KoktM0HOHi0i0yelkU0GCU9TjJHgFPAh9ZgU0J8xjcG9Zxp8kf/s1600/attributes.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;Now, you can see a line separate the system provide rule type and custom validation rule type:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6UCW0so_GPE1ko8W462DRea_KkUs02rl751SYSxaQcNWPm5SwFxFWJR05mJ4EG8U0ABXYcgrFDbU4BZXbLy3rn1tbuY6XA6FzHdgVSx8VPiV4ojbOTBDdpHL4YtYas2rtMS0B9ttzJ1N3/s1600/attributes.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6UCW0so_GPE1ko8W462DRea_KkUs02rl751SYSxaQcNWPm5SwFxFWJR05mJ4EG8U0ABXYcgrFDbU4BZXbLy3rn1tbuY6XA6FzHdgVSx8VPiV4ojbOTBDdpHL4YtYas2rtMS0B9ttzJ1N3/s1600/attributes.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;Just choose the custom validation rule type &quot;RegionalPhone&quot; and fill in the property in the &quot;Rule Definition Block&quot;:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjvkPnafbE5vWwGfGLSifXb3XazeiZb6l_TQU96TVAM4KWqvec2IFJMi12fj5lfU_70yVm7kT67nH6xQtf-RQGztOui0lX8PAQ5TuhKcEmPHNewlsRFk1fi3sEqBJaC_WOxMWrRimIy6Fs/s1600/attributes.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjvkPnafbE5vWwGfGLSifXb3XazeiZb6l_TQU96TVAM4KWqvec2IFJMi12fj5lfU_70yVm7kT67nH6xQtf-RQGztOui0lX8PAQ5TuhKcEmPHNewlsRFk1fi3sEqBJaC_WOxMWrRimIy6Fs/s1600/attributes.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;The following figure shows that a Custom Validation Rule &quot;RegionalPhone&quot; is applied in the existing attribute &quot;PhoneNumber&quot;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAVUgIdnUkwzlYSiQWc5fHZNp-t41WY4Mxatq-PSagaW3Z12esxtKMO4DlPkq2LZg1SfG0OLmMmQ8PuXY7GnOJvVNhY5JTmOCoNZjuJPcN824Mz045APvMvsDNb8GvyuSrjzaD7Pehm02t/s1600/attributes.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAVUgIdnUkwzlYSiQWc5fHZNp-t41WY4Mxatq-PSagaW3Z12esxtKMO4DlPkq2LZg1SfG0OLmMmQ8PuXY7GnOJvVNhY5JTmOCoNZjuJPcN824Mz045APvMvsDNb8GvyuSrjzaD7Pehm02t/s1600/attributes.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: #073763;&quot;&gt;The following codes show the source code of RegionalPhoneValidator.java:&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
package test.app.model.framework;&lt;br /&gt;
import java.util.regex.Pattern;&lt;br /&gt;
import oracle.jbo.ValidationException;&lt;br /&gt;
import oracle.jbo.rules.JboValidatorContext;&lt;br /&gt;
import oracle.jbo.rules.JboValidatorInterface;&lt;br /&gt;
public class RegionalPhoneValidator implements JboValidatorInterface {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private String description = &quot;Check whether a phone number&amp;nbsp;is correct&quot;;&lt;br /&gt;
&amp;nbsp; private String areaCodeDelimiter;&lt;br /&gt;
&amp;nbsp; private String prefixDelimiter;&lt;br /&gt;
&amp;nbsp; private String suffixDelimiter;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; private static final String THREE_DIGIT_PATTERN = &quot;[0-9]{3}&quot;;&lt;br /&gt;
&amp;nbsp; private static final String FOUR_DIGIT_PATTERN = &quot;[0-9]{4}&quot;;&lt;br /&gt;
&amp;nbsp; private Pattern phonePattern = null; // This field is initialized when first needed&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public RegionalPhoneValidator() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; /**&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * Return true if value is valid.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; */&lt;br /&gt;
&amp;nbsp; public boolean validateValue(Object value) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (value == null) return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (phonePattern == null) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initPhonePattern();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return phonePattern.matcher(value.toString()).matches();&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; private void initPhonePattern() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; String areaCodeRegexp = createRegexp(areaCodeDelimiter, THREE_DIGIT_PATTERN);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; String prefixRegexp = createRegexp(prefixDelimiter, THREE_DIGIT_PATTERN);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; String suffixRegexp = createRegexp(suffixDelimiter, FOUR_DIGIT_PATTERN);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; phonePattern = Pattern.compile(areaCodeRegexp+prefixRegexp+suffixRegexp);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; private String createRegexp(String delimiter,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; String basePattern) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; String regexp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (delimiter != null) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (delimiter.length()) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 0: regexp = basePattern;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 1: regexp = basePattern + delimiter;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default: &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int interIndex = delimiter.lastIndexOf(&quot; &quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String firstPart = delimiter.substring(0, interIndex);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String lastPart = delimiter.substring(interIndex+1, delimiter.length());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; regexp = firstPart + basePattern + lastPart;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //regexp = delimiter.charAt(0) + basePattern + delimiter.charAt(1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; regexp = basePattern;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return regexp;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; /**&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * Invoked by framework for validation.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; */&lt;br /&gt;
&amp;nbsp; public void validate(JboValidatorContext ctx) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!validateValue(ctx.getNewValue())) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new ValidationException(&quot;demo.model.PhoneValidator validation failed&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; /**&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * Description of what this class validates.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; */&lt;br /&gt;
&amp;nbsp; public String getDescription() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return description;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; /**&lt;br /&gt;
&amp;nbsp;&amp;nbsp; * Description of what this class validates.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; */&lt;br /&gt;
&amp;nbsp; public void setDescription(String str) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description = str;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; public void setAreaCodeDelimiter(String areaCodeDelimiter) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.areaCodeDelimiter = areaCodeDelimiter;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; public String getAreaCodeDelimiter() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return areaCodeDelimiter;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; public void setPrefixDelimiter(String prefixDelimiter) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.prefixDelimiter = prefixDelimiter;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; public String getPrefixDelimiter() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return prefixDelimiter;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; public void setSuffixDelimiter(String suffixDelimiter) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.suffixDelimiter = suffixDelimiter;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; public String getSuffixDelimiter() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return suffixDelimiter;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/5568994090466921797/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-validations-in-adf.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/5568994090466921797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/5568994090466921797'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-validations-in-adf.html' title='JDeveloper - Validations in ADF (Custom Validation Rule)'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuo5BvbAMsYgw5n5cqrbmhXVcE43-bvva8GkpqUTWlzhZ6fHv1u3GphxaRqCWQED_H7LHWgmd1Hk0aOHC-v5cztYPbGEPC1f5MVVJdOEPwSKR9zX-6fmeCaOslMJfaj7lZCaaCCJathdil/s72-c/attributes.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6849695496908244507.post-2511019014451672208</id><published>2011-01-04T18:43:00.000-08:00</published><updated>2011-01-04T18:48:29.013-08:00</updated><title type='text'>JDeveloper - Some common useful shortcut (Ctrl + Enter)</title><content type='html'>1. Call up &lt;em&gt;code template&lt;/em&gt; by &quot;Ctrl + Enter&quot;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: yellow;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;Eg 1.&lt;/span&gt;.&lt;/span&gt;&lt;/em&gt; Input &quot;for&quot; in the editor and get the code template of &quot;for loop&quot;&amp;nbsp;syntax block&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Input &quot;for&quot;&lt;/li&gt;
&lt;li&gt;Press &quot;Ctrl + Enter&quot;&lt;/li&gt;
&lt;li&gt;Code will become to:&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (init; condition; next) { &lt;br /&gt;
&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;Eg 2.&lt;/span&gt;&lt;/em&gt; Input &quot;trycf&quot; in the editor and get the code template &quot;try / catch / final&quot; syntax block&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Input &quot;trycf&quot;&lt;/li&gt;
&lt;li&gt;Press &quot;Ctrl + Enter&quot;&lt;/li&gt;
&lt;li&gt;Code will become to:&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (Exception e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO: Add catch code&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } finally { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;em&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;Eg 3.&lt;/span&gt;&lt;/em&gt; Input &quot;sop&quot; in the editor and get the code template &quot;system output&#39;s print line&quot; syntax block&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Input &quot;sop&quot;&lt;/li&gt;
&lt;li&gt;Press &quot;Ctrl + Enter&quot;&lt;/li&gt;
&lt;li&gt;Code will become to:&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println();&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/2511019014451672208/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-some-common-useful-shortcut.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/2511019014451672208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/2511019014451672208'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/2011/01/jdeveloper-some-common-useful-shortcut.html' title='JDeveloper - Some common useful shortcut (Ctrl + Enter)'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6849695496908244507.post-4289459645340532957</id><published>2011-01-03T19:08:00.000-08:00</published><updated>2011-01-03T19:25:19.629-08:00</updated><title type='text'>Framework chosen</title><content type='html'>Nowadays, many IT organizations have applied different combinations of Java technologies to write new applications in and migrating existing applications in Java environment. However, one major aspect of Java is its enormous variety and breadth. There is no one way to create a system. In fact, there are many options we can choose between probably hundreds of combinations of Java technologies in JEE environment: JSP, Servlet,&amp;nbsp;Spring Framework, JSF, Oracle ADF, Tapestry, etc. Nobody&amp;nbsp;can state exactly which one is the best for&amp;nbsp;the application development. I would like to state that vendors like Oracle (&lt;em&gt;Oracle ADF technologies&lt;/em&gt;) and SpringSource (&lt;em&gt;Spring Framework&lt;/em&gt;) create Java EE–compliant products by implementing the Java EE specifications.&lt;br /&gt;
&lt;br /&gt;
Java Enterprise Edition (&lt;em&gt;Java EE&lt;/em&gt;) is a set of standards and specifications (called a platform) that defines the environment for running software written using the Java language. Java EE (formerly called &quot;J2EE&quot;) is created and maintained by Sun Microsystems, but anyone may suggest and work on enhancements using the &lt;a href=&quot;http://www.jcp.org/&quot;&gt;Java Community Process&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Glossary:&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;Java EE&lt;/em&gt; - Java Enterprise Edition&lt;br /&gt;
&lt;em&gt;JEE&lt;/em&gt; - Java Enterprise Edition&lt;br /&gt;
&lt;em&gt;JSP -&lt;/em&gt; JavaServer Pages&lt;br /&gt;
&lt;em&gt;JSF -&lt;/em&gt; JavaServer Faces&lt;br /&gt;
&lt;em&gt;Oracle ADF&amp;nbsp;technologies&lt;/em&gt;&amp;nbsp;- Oracle Application Development Framework technologies&lt;br /&gt;
&lt;em&gt;ADF BC -&lt;/em&gt; ADF Business Components&lt;br /&gt;
&lt;em&gt;EIS&lt;/em&gt; - Enterprise Information System&lt;br /&gt;
&lt;em&gt;EJBs&lt;/em&gt; - Enterprise JavaBeans&lt;br /&gt;
&lt;em&gt;WLS&lt;/em&gt;&amp;nbsp;- Oracle WebLogic Server (WLS, formerly from BEA Systems)&lt;br /&gt;
&lt;em&gt;OC4J&lt;/em&gt; - Oracle Containers for Java EE</content><link rel='replies' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/4289459645340532957/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://middlework.blogspot.com/2011/01/framework-chosen.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/4289459645340532957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/4289459645340532957'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/2011/01/framework-chosen.html' title='Framework chosen'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6849695496908244507.post-5715458886353878697</id><published>2010-12-27T19:36:00.000-08:00</published><updated>2010-12-27T20:30:49.920-08:00</updated><title type='text'>My understanding of Framework</title><content type='html'>Over the years, I have been working on Spring MVC Framework and recognize that a MVC framework is a suitable model for agile development and easy for maintenance. But I have read a book &quot;Oracle JDeveloper 11g Handbook - A Guide to Oracle Fusion Web Development&quot; (&lt;em&gt;This book focuses on the key ADF technologies used by Fusion (ADF Faces, ADF Controller, and ADF Business Components)&lt;/em&gt;)&amp;nbsp;recently. It told me the definition of Framework and Meta-Framework. Here is the part of definition described in the book:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Framework&lt;/strong&gt;&lt;br /&gt;
Frameworks evolve as concrete implementations of such patterns, factoring out the repeated portion of task, and leaving programmers with a more limited exercise of configuring the parameters of the framework to theirs needs and much less coding overall although coding is never completely eliminated. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Configured, not coded&lt;/strong&gt; By definition,&amp;nbsp;a framework performs most boilerplate and plumbing tasks for you. In order for that to happen, the framework must offer a way to define configuration data that provides the information it needs. This configuration data, or &lt;em&gt;metadata&lt;/em&gt;, is sometimes injected through code or code annotations, but more often through some sort of configuration file. XML is typically used for such metadata files in modern frameworks, although this does not have to be the case.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Meta-Framework&lt;/strong&gt;&lt;br /&gt;
We&#39;ve just started to define a framework, and already we&#39;ve introduced a twist in the form of meta-frameworks. What&#39;s this all about? A &lt;em&gt;meta-framework&lt;/em&gt; is an end-to-end application development framework that encompasses a wide range of functionality. The meta-framework not only provides functionality, but it may also encapsulate or subsume multiple single-solution frameworks. If a single-solution framework is a screwdriver, a meta-framework is the whole toolbox.&lt;br /&gt;
Furthermore, the definition of meta-frameworks includes the idea that they offer choice and pluggability for particular tasks. For the O/R mapping example, meta-frameworks, such as Oracle ADF or Spring, allow the developer to choose one out of a whole range of O/R mapping solutions&amp;nbsp;to implementation will not have an effect on the rest of the application. The user interface, for instance, will be unaware of the actual O/R mapping mechanism being used. This allows for much more flexibility in the development of the application as well as ease in changing the underlying technologies later should the need arise.&lt;br /&gt;
&lt;br /&gt;
After I read the definition of framework from this book, I think that I should state this and tell all of you the main concept of a framework should be:&lt;br /&gt;
&lt;br /&gt;
Framework is a boilerplate, not coded, configured by XML files or injected by code or code annotations, multiple choice for developer to choose solution&amp;nbsp;for the&amp;nbsp;implementation of application (Such as O/R mapping solution).&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Glossary:&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;Oracle ADF&amp;nbsp;technologies&amp;nbsp;&lt;/em&gt;- Oracle Application Development Framework technologies&lt;br /&gt;
&lt;em&gt;O/R mapping&lt;/em&gt; - Object-relational mapping&lt;br /&gt;
&lt;em&gt;Oracle WebLogic&lt;/em&gt; - A Java Enerprise container engine</content><link rel='replies' type='application/atom+xml' href='http://middlework.blogspot.com/feeds/5715458886353878697/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://middlework.blogspot.com/2010/12/my-understanding-of-framework.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/5715458886353878697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6849695496908244507/posts/default/5715458886353878697'/><link rel='alternate' type='text/html' href='http://middlework.blogspot.com/2010/12/my-understanding-of-framework.html' title='My understanding of Framework'/><author><name>Framework / Middleware</name><uri>http://www.blogger.com/profile/02932755942868730073</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>