<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Design Patterns in PL/SQL &#8211; The Template Pattern</title>
	<atom:link href="http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=design-patterns-in-plsql-the-template-pattern</link>
	<description></description>
	<lastBuildDate>Tue, 11 Jun 2013 22:09:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Zlatko Sirotic</title>
		<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/#comment-2967</link>
		<dc:creator>Zlatko Sirotic</dc:creator>
		<pubDate>Fri, 18 Jan 2008 22:16:42 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1089#comment-2967</guid>
		<description><![CDATA[The formatting of my code example is lost. Link for formatted example:
&quot;The Template Design Pattern in PL/SQL&quot;
http://www.quest-pipelines.com/pipelines/plsql/tips06.htm#OCTOBER

I agree that the curent object types in Oracle aren&#039;t practical for transient objects, first because we need references between transient objects.
But, I think that Oracle object types are OK for persistent objects - for &quot;column objects&quot;, not for &quot;row objects&quot;:
&quot;OR(DBMS) or R(DBMS), That is the Question&quot;
http://www.quest-pipelines.com/pipelines/plsql/tips.htm#OCTOBER

C.J.Date in &quot;An introduction to Database Systems&quot; (2004, page 885) says:
&quot;... object/relational systems ... are, or should be, basically just relational systems that support the relational domain concept (i.e., types) properly
- in other words, true relational systems, meaning in particular systems that allow users to define their own types.&quot;

Best regards,
Zlatko]]></description>
		<content:encoded><![CDATA[<p>The formatting of my code example is lost. Link for formatted example:<br />
&#8220;The Template Design Pattern in PL/SQL&#8221;<br />
<a href="http://www.quest-pipelines.com/pipelines/plsql/tips06.htm#OCTOBER" rel="nofollow">http://www.quest-pipelines.com/pipelines/plsql/tips06.htm#OCTOBER</a></p>
<p>I agree that the curent object types in Oracle aren&#8217;t practical for transient objects, first because we need references between transient objects.<br />
But, I think that Oracle object types are OK for persistent objects &#8211; for &#8220;column objects&#8221;, not for &#8220;row objects&#8221;:<br />
&#8220;OR(DBMS) or R(DBMS), That is the Question&#8221;<br />
<a href="http://www.quest-pipelines.com/pipelines/plsql/tips.htm#OCTOBER" rel="nofollow">http://www.quest-pipelines.com/pipelines/plsql/tips.htm#OCTOBER</a></p>
<p>C.J.Date in &#8220;An introduction to Database Systems&#8221; (2004, page 885) says:<br />
&#8220;&#8230; object/relational systems &#8230; are, or should be, basically just relational systems that support the relational domain concept (i.e., types) properly<br />
- in other words, true relational systems, meaning in particular systems that allow users to define their own types.&#8221;</p>
<p>Best regards,<br />
Zlatko</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Koray Dakan</title>
		<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/#comment-2966</link>
		<dc:creator>Koray Dakan</dc:creator>
		<pubDate>Fri, 11 Jan 2008 11:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1089#comment-2966</guid>
		<description><![CDATA[5) And most important, you cannot have private members, meaning, you cannot add members (method or variable) to the type body that don&#039;t exist in the type spec, so all members are publicly accessible . And this ruins the whole concept of encapsulation principle. Packages have both public spec and private implementation, why not object have it only God knows..]]></description>
		<content:encoded><![CDATA[<p>5) And most important, you cannot have private members, meaning, you cannot add members (method or variable) to the type body that don&#8217;t exist in the type spec, so all members are publicly accessible . And this ruins the whole concept of encapsulation principle. Packages have both public spec and private implementation, why not object have it only God knows..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Koray</title>
		<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/#comment-2965</link>
		<dc:creator>Koray</dc:creator>
		<pubDate>Fri, 11 Jan 2008 11:10:01 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1089#comment-2965</guid>
		<description><![CDATA[I don&#039;t find the curent objects types in Oracle practical, because:
1) When you want to change a supertype, you get an error that says you have to drop the subtypes first.. This is not a practical solution cause first you have to generate the scripts for all subtypes (and all their subtypes in the type hierarchy, then do your work on the super type and regenerate all the sub type tree in the correct order, and then change the sub types if necessary (which means the process continues recursively).. It could be done with an automated script, but why does Oracle want this I don&#039;t understand.
2) Also, if some of the subtypes are abstract (not instantiable) then it&#039;s quite possible a Forms application to give &quot;time signature changed&quot; errors, as it does on package specs..
3) As in the example Zlatko Sirotic gives, you have to use a dummy member variable in order to create interfaces or abstract classes.. By the way, I didn&#039;t think of doing this so I shyed away from using objects types, but now I see I can create interfaces with a dummy variable:)]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t find the curent objects types in Oracle practical, because:<br />
1) When you want to change a supertype, you get an error that says you have to drop the subtypes first.. This is not a practical solution cause first you have to generate the scripts for all subtypes (and all their subtypes in the type hierarchy, then do your work on the super type and regenerate all the sub type tree in the correct order, and then change the sub types if necessary (which means the process continues recursively).. It could be done with an automated script, but why does Oracle want this I don&#8217;t understand.<br />
2) Also, if some of the subtypes are abstract (not instantiable) then it&#8217;s quite possible a Forms application to give &#8220;time signature changed&#8221; errors, as it does on package specs..<br />
3) As in the example Zlatko Sirotic gives, you have to use a dummy member variable in order to create interfaces or abstract classes.. By the way, I didn&#8217;t think of doing this so I shyed away from using objects types, but now I see I can create interfaces with a dummy variable:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Serp Land</title>
		<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/#comment-2964</link>
		<dc:creator>Serp Land</dc:creator>
		<pubDate>Mon, 18 Jun 2007 16:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1089#comment-2964</guid>
		<description><![CDATA[Hi together
I think this Template Pattern can be implementet a very clean way with object types. I tried with a simple pseudo object and it really works!
First I thought ever not using object types. Why should I?
Now I got it - I can almost implement every desing pattern the clean way with object types. So I think every pl/sql developer should start using it.
At the moment I&#039;m looking forward to use the Template Pattern in our production environment ;-)]]></description>
		<content:encoded><![CDATA[<p>Hi together<br />
I think this Template Pattern can be implementet a very clean way with object types. I tried with a simple pseudo object and it really works!<br />
First I thought ever not using object types. Why should I?<br />
Now I got it &#8211; I can almost implement every desing pattern the clean way with object types. So I think every pl/sql developer should start using it.<br />
At the moment I&#8217;m looking forward to use the Template Pattern in our production environment <img src='http://technology.amis.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zlatko Sirotic</title>
		<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/#comment-2963</link>
		<dc:creator>Zlatko Sirotic</dc:creator>
		<pubDate>Tue, 14 Mar 2006 16:53:33 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1089#comment-2963</guid>
		<description><![CDATA[Dear Lucas,

My opinion is that PL/SQL classes (object types) still aren&#039;t finished.
Database 9i has made a giant leap forward compared to 8i (inheritance, polymorphism ...),
but in 10g there is hardly anything new.
In my opinion it is a priority to add references between transient objects and then,
perhaps, even a garbage collector.

Between the way, I sent my PL/SQL &quot;wish list&quot; to Steven Feuerstein&#039;s site &quot;21st Century PL/SQL&quot;
http://www.oracleplsqlprogramming.com/IC/ideas/data_structures_and_datatypes/object_types/index.php
(Add advanced O-O features like those found in Eiffel)
and
to the AskTom site: Thanks for the question regarding &quot;What don&#039;t you like about Oracle?&quot;
http://asktom.oracle.com/pls/ask/f?p=4950:8:4407442689342146348::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:48704116042682
(My wishes - new features of Oracle Database 11br).

In addition, I present you my two texts in witch I&#039;m pointing out some of PL/SQL object oriented characteristics:
Calling the Parent Object&#039;s Version of an Overridden Method
http://www.quest-pipelines.com/pipelines/plsql/tips03.htm#JUNE
and
Dynamic Method Dispatch and Method Overloading in a Subtype
http://www.quest-pipelines.com/newsletter-v4/0503_C.htm

But, adding more OO capabilities to PL/SQL is the second thing in my wish list.
The first thing is - better support for business rules in the database.
We need &quot;What Not How: The Business Rules Approach to Application Development&quot; (book by C.J.Date).
My motto is: &quot;Thou shall not do in the Middle Tier, what thou could have done in the Data Tier&quot;
(Toon Koppelaars in &quot;A first JDeveloper project: Choices made, lessons learned&quot;, Oracle World 2002).

If the database would support business rules, then this two complex examples would be futile:
Solving &quot;COMMIT business rules&quot; on the Database Server
http://www.oracle.com/technology/oramag/code/tips2002/032402.html
and
Avoid a &quot;Vicious Cycle&quot;
http://www.oracle.com/technology/oramag/code/tips2003/081003.html


Best regards,

Zlatko Sirotic]]></description>
		<content:encoded><![CDATA[<p>Dear Lucas,</p>
<p>My opinion is that PL/SQL classes (object types) still aren&#8217;t finished.<br />
Database 9i has made a giant leap forward compared to 8i (inheritance, polymorphism &#8230;),<br />
but in 10g there is hardly anything new.<br />
In my opinion it is a priority to add references between transient objects and then,<br />
perhaps, even a garbage collector.</p>
<p>Between the way, I sent my PL/SQL &#8220;wish list&#8221; to Steven Feuerstein&#8217;s site &#8220;21st Century PL/SQL&#8221;<br />
<a href="http://www.oracleplsqlprogramming.com/IC/ideas/data_structures_and_datatypes/object_types/index.php" rel="nofollow">http://www.oracleplsqlprogramming.com/IC/ideas/data_structures_and_datatypes/object_types/index.php</a><br />
(Add advanced O-O features like those found in Eiffel)<br />
and<br />
to the AskTom site: Thanks for the question regarding &#8220;What don&#8217;t you like about Oracle?&#8221;<br />
<a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:4407442689342146348" rel="nofollow">http://asktom.oracle.com/pls/ask/f?p=4950:8:4407442689342146348</a>::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:48704116042682<br />
(My wishes &#8211; new features of Oracle Database 11br).</p>
<p>In addition, I present you my two texts in witch I&#8217;m pointing out some of PL/SQL object oriented characteristics:<br />
Calling the Parent Object&#8217;s Version of an Overridden Method<br />
<a href="http://www.quest-pipelines.com/pipelines/plsql/tips03.htm#JUNE" rel="nofollow">http://www.quest-pipelines.com/pipelines/plsql/tips03.htm#JUNE</a><br />
and<br />
Dynamic Method Dispatch and Method Overloading in a Subtype<br />
<a href="http://www.quest-pipelines.com/newsletter-v4/0503_C.htm" rel="nofollow">http://www.quest-pipelines.com/newsletter-v4/0503_C.htm</a></p>
<p>But, adding more OO capabilities to PL/SQL is the second thing in my wish list.<br />
The first thing is &#8211; better support for business rules in the database.<br />
We need &#8220;What Not How: The Business Rules Approach to Application Development&#8221; (book by C.J.Date).<br />
My motto is: &#8220;Thou shall not do in the Middle Tier, what thou could have done in the Data Tier&#8221;<br />
(Toon Koppelaars in &#8220;A first JDeveloper project: Choices made, lessons learned&#8221;, Oracle World 2002).</p>
<p>If the database would support business rules, then this two complex examples would be futile:<br />
Solving &#8220;COMMIT business rules&#8221; on the Database Server<br />
<a href="http://www.oracle.com/technology/oramag/code/tips2002/032402.html" rel="nofollow">http://www.oracle.com/technology/oramag/code/tips2002/032402.html</a><br />
and<br />
Avoid a &#8220;Vicious Cycle&#8221;<br />
<a href="http://www.oracle.com/technology/oramag/code/tips2003/081003.html" rel="nofollow">http://www.oracle.com/technology/oramag/code/tips2003/081003.html</a></p>
<p>Best regards,</p>
<p>Zlatko Sirotic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas Jellema</title>
		<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/#comment-2962</link>
		<dc:creator>Lucas Jellema</dc:creator>
		<pubDate>Sat, 11 Mar 2006 07:47:46 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1089#comment-2962</guid>
		<description><![CDATA[Dear Zlatko,

Thanks a lot for this very interesting example! Most of us tend to shy away from using the Oracle Object Extensions - certainly in part because of ignorance - so having your demonstration is valuable to a lot of us, including myself.

Are you making use of the Object Extensions and the OO facilities available for Object Types a great deal?

best regards,

Lucas]]></description>
		<content:encoded><![CDATA[<p>Dear Zlatko,</p>
<p>Thanks a lot for this very interesting example! Most of us tend to shy away from using the Oracle Object Extensions &#8211; certainly in part because of ignorance &#8211; so having your demonstration is valuable to a lot of us, including myself.</p>
<p>Are you making use of the Object Extensions and the OO facilities available for Object Types a great deal?</p>
<p>best regards,</p>
<p>Lucas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zlatko Sirotic</title>
		<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/#comment-2961</link>
		<dc:creator>Zlatko Sirotic</dc:creator>
		<pubDate>Fri, 10 Mar 2006 14:53:21 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1089#comment-2961</guid>
		<description><![CDATA[We can try to use PL/SQL 9i/10g object types.

But then in PL/SQL 9i/10g we must use MEMBER (non-STATIC) methods (procedures/functions):

CREATE OR REPLACE TYPE templ_method_abstract AS OBJECT (
   dummy VARCHAR2(10),
   MEMBER PROCEDURE template_method,
   NOT INSTANTIABLE MEMBER PROCEDURE operation1,
   NOT INSTANTIABLE MEMBER PROCEDURE operation2
)
NOT FINAL
NOT INSTANTIABLE
/
CREATE OR REPLACE TYPE BODY templ_method_abstract IS
   MEMBER PROCEDURE template_method IS
   BEGIN
      operation1;
      operation2;
   END;
END;
/

CREATE OR REPLACE TYPE templ_method_concrete_a UNDER templ_method_abstract (
   OVERRIDING MEMBER PROCEDURE operation1,
   OVERRIDING MEMBER PROCEDURE operation2
)
/
CREATE OR REPLACE TYPE BODY templ_method_concrete_a IS
   OVERRIDING MEMBER PROCEDURE operation1 IS
   BEGIN
      DBMS_OUTPUT.PUT_LINE (&#039;Operation 1 in class CONCRETE A&#039;);
   END;

   OVERRIDING MEMBER PROCEDURE operation2 IS
   BEGIN
      DBMS_OUTPUT.PUT_LINE (&#039;Operation 2 in class CONCRETE A&#039;);
   END;
END;
/

CREATE OR REPLACE TYPE templ_method_concrete_b UNDER templ_method_abstract (
   OVERRIDING MEMBER PROCEDURE operation1,
   OVERRIDING MEMBER PROCEDURE operation2
)
/
CREATE OR REPLACE TYPE BODY templ_method_concrete_b IS
   OVERRIDING MEMBER PROCEDURE operation1 IS
   BEGIN
      DBMS_OUTPUT.PUT_LINE (&#039;Operation 1 in class CONCRETE B&#039;);
   END;

   OVERRIDING MEMBER PROCEDURE operation2 IS
   BEGIN
      DBMS_OUTPUT.PUT_LINE (&#039;Operation 2 in class CONCRETE B&#039;);
   END;
END;
/

DECLARE
   l_templ_method_object templ_method_abstract;
BEGIN
   l_templ_method_object := NEW templ_method_concrete_a (&#039;DUMMY&#039;);
   l_templ_method_object.template_method;


   l_templ_method_object := NEW templ_method_concrete_b (&#039;DUMMY&#039;);
   l_templ_method_object.template_method;
END;
/



Why we can&#039;t use STATIC methods?
First, in PL/SQL 9i/10g STATIC method can&#039;t bee abstract (NOT INSTANTIABLE):

CREATE OR REPLACE TYPE template_method_abstract_2 AS OBJECT (
   dummy NUMBER(1),
   STATIC PROCEDURE template_method,
   NOT INSTANTIABLE STATIC PROCEDURE operation1,
   NOT INSTANTIABLE STATIC PROCEDURE operation2
)
NOT FINAL
NOT INSTANTIABLE
/


LINE/COL ERROR
-------- -----------------------------------------------------------------
4/38     PLS-00169: modifier &#039;STATIC&#039; conflicts with prior &#039;NOT
         INSTANTIABLE&#039; specification

5/38     PLS-00169: modifier &#039;STATIC&#039; conflicts with prior &#039;NOT
         INSTANTIABLE&#039; specification



Second, we can try to use non-abstract STATIC methods in (abstract) parent:

CREATE OR REPLACE TYPE template_method_abstract_3 AS OBJECT (
   dummy NUMBER(1),
   STATIC PROCEDURE template_method,
   STATIC PROCEDURE operation1,
   STATIC PROCEDURE operation2
)
NOT FINAL
NOT INSTANTIABLE
/
CREATE OR REPLACE TYPE BODY template_method_abstract_3 IS
   STATIC PROCEDURE template_method IS
   BEGIN
      operation1;
      operation2;
   END;

   STATIC PROCEDURE operation1 IS
   BEGIN
      NULL; -- simulates abstract method
   END;

   STATIC PROCEDURE operation2 IS
   BEGIN
      NULL; -- simulates abstract method
   END;
END;
/

but, (in PL/SQL 9i/10g) we can&#039;t override STATIC method:

CREATE OR REPLACE TYPE template_method_concrete_3 UNDER template_method_abstract_3 (
   OVERRIDING STATIC PROCEDURE operation1,
   OVERRIDING STATIC PROCEDURE operation2
)
/
LINE/COL ERROR
-------- -----------------------------------------------------------------
2/32     PLS-00169: modifier &#039;STATIC&#039; conflicts with prior &#039;OVERRIDING&#039;
         specification

3/32     PLS-00169: modifier &#039;STATIC&#039; conflicts with prior &#039;OVERRIDING&#039;
         specification



Regards,
Zlatko Sirotic]]></description>
		<content:encoded><![CDATA[<p>We can try to use PL/SQL 9i/10g object types.</p>
<p>But then in PL/SQL 9i/10g we must use MEMBER (non-STATIC) methods (procedures/functions):</p>
<p>CREATE OR REPLACE TYPE templ_method_abstract AS OBJECT (<br />
   dummy VARCHAR2(10),<br />
   MEMBER PROCEDURE template_method,<br />
   NOT INSTANTIABLE MEMBER PROCEDURE operation1,<br />
   NOT INSTANTIABLE MEMBER PROCEDURE operation2<br />
)<br />
NOT FINAL<br />
NOT INSTANTIABLE<br />
/<br />
CREATE OR REPLACE TYPE BODY templ_method_abstract IS<br />
   MEMBER PROCEDURE template_method IS<br />
   BEGIN<br />
      operation1;<br />
      operation2;<br />
   END;<br />
END;<br />
/</p>
<p>CREATE OR REPLACE TYPE templ_method_concrete_a UNDER templ_method_abstract (<br />
   OVERRIDING MEMBER PROCEDURE operation1,<br />
   OVERRIDING MEMBER PROCEDURE operation2<br />
)<br />
/<br />
CREATE OR REPLACE TYPE BODY templ_method_concrete_a IS<br />
   OVERRIDING MEMBER PROCEDURE operation1 IS<br />
   BEGIN<br />
      DBMS_OUTPUT.PUT_LINE (&#8216;Operation 1 in class CONCRETE A&#8217;);<br />
   END;</p>
<p>   OVERRIDING MEMBER PROCEDURE operation2 IS<br />
   BEGIN<br />
      DBMS_OUTPUT.PUT_LINE (&#8216;Operation 2 in class CONCRETE A&#8217;);<br />
   END;<br />
END;<br />
/</p>
<p>CREATE OR REPLACE TYPE templ_method_concrete_b UNDER templ_method_abstract (<br />
   OVERRIDING MEMBER PROCEDURE operation1,<br />
   OVERRIDING MEMBER PROCEDURE operation2<br />
)<br />
/<br />
CREATE OR REPLACE TYPE BODY templ_method_concrete_b IS<br />
   OVERRIDING MEMBER PROCEDURE operation1 IS<br />
   BEGIN<br />
      DBMS_OUTPUT.PUT_LINE (&#8216;Operation 1 in class CONCRETE B&#8217;);<br />
   END;</p>
<p>   OVERRIDING MEMBER PROCEDURE operation2 IS<br />
   BEGIN<br />
      DBMS_OUTPUT.PUT_LINE (&#8216;Operation 2 in class CONCRETE B&#8217;);<br />
   END;<br />
END;<br />
/</p>
<p>DECLARE<br />
   l_templ_method_object templ_method_abstract;<br />
BEGIN<br />
   l_templ_method_object := NEW templ_method_concrete_a (&#8216;DUMMY&#8217;);<br />
   l_templ_method_object.template_method;</p>
<p>   l_templ_method_object := NEW templ_method_concrete_b (&#8216;DUMMY&#8217;);<br />
   l_templ_method_object.template_method;<br />
END;<br />
/</p>
<p>Why we can&#8217;t use STATIC methods?<br />
First, in PL/SQL 9i/10g STATIC method can&#8217;t bee abstract (NOT INSTANTIABLE):</p>
<p>CREATE OR REPLACE TYPE template_method_abstract_2 AS OBJECT (<br />
   dummy NUMBER(1),<br />
   STATIC PROCEDURE template_method,<br />
   NOT INSTANTIABLE STATIC PROCEDURE operation1,<br />
   NOT INSTANTIABLE STATIC PROCEDURE operation2<br />
)<br />
NOT FINAL<br />
NOT INSTANTIABLE<br />
/</p>
<p>LINE/COL ERROR<br />
&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
4/38     PLS-00169: modifier &#8216;STATIC&#8217; conflicts with prior &#8216;NOT<br />
         INSTANTIABLE&#8217; specification</p>
<p>5/38     PLS-00169: modifier &#8216;STATIC&#8217; conflicts with prior &#8216;NOT<br />
         INSTANTIABLE&#8217; specification</p>
<p>Second, we can try to use non-abstract STATIC methods in (abstract) parent:</p>
<p>CREATE OR REPLACE TYPE template_method_abstract_3 AS OBJECT (<br />
   dummy NUMBER(1),<br />
   STATIC PROCEDURE template_method,<br />
   STATIC PROCEDURE operation1,<br />
   STATIC PROCEDURE operation2<br />
)<br />
NOT FINAL<br />
NOT INSTANTIABLE<br />
/<br />
CREATE OR REPLACE TYPE BODY template_method_abstract_3 IS<br />
   STATIC PROCEDURE template_method IS<br />
   BEGIN<br />
      operation1;<br />
      operation2;<br />
   END;</p>
<p>   STATIC PROCEDURE operation1 IS<br />
   BEGIN<br />
      NULL; &#8212; simulates abstract method<br />
   END;</p>
<p>   STATIC PROCEDURE operation2 IS<br />
   BEGIN<br />
      NULL; &#8212; simulates abstract method<br />
   END;<br />
END;<br />
/</p>
<p>but, (in PL/SQL 9i/10g) we can&#8217;t override STATIC method:</p>
<p>CREATE OR REPLACE TYPE template_method_concrete_3 UNDER template_method_abstract_3 (<br />
   OVERRIDING STATIC PROCEDURE operation1,<br />
   OVERRIDING STATIC PROCEDURE operation2<br />
)<br />
/<br />
LINE/COL ERROR<br />
&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
2/32     PLS-00169: modifier &#8216;STATIC&#8217; conflicts with prior &#8216;OVERRIDING&#8217;<br />
         specification</p>
<p>3/32     PLS-00169: modifier &#8216;STATIC&#8217; conflicts with prior &#8216;OVERRIDING&#8217;<br />
         specification</p>
<p>Regards,<br />
Zlatko Sirotic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amihay gonen</title>
		<link>http://technology.amis.nl/2006/03/10/design-patterns-in-plsql-the-template-pattern/#comment-2960</link>
		<dc:creator>amihay gonen</dc:creator>
		<pubDate>Fri, 10 Mar 2006 10:04:25 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1089#comment-2960</guid>
		<description><![CDATA[I&#039;ve impelement this using oracle types, which provide abstract methods and others OO t
types.

I think it worth to show those design patterns also using oracle types]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve impelement this using oracle types, which provide abstract methods and others OO t<br />
types.</p>
<p>I think it worth to show those design patterns also using oracle types</p>
]]></content:encoded>
	</item>
</channel>
</rss>
