Book a Demo

Author Topic: Generating DDL for PACKAGE in Oracle  (Read 3533 times)

sekhar_aripaka

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love EA!!!
    • View Profile
Generating DDL for PACKAGE in Oracle
« on: June 25, 2007, 05:47:50 pm »
Can someone help me in generating DDL code for creating PACKAGE in Oracle?

I have been trying this for sometime, but with no success. The generated code should be like...

CREATE PACKAGE BODY bank_transactions AS

 PROCEDURE do_journal_entry (acct NUMBER, kind CHAR) IS
 BEGIN
 END do_journal_entry;

 PROCEDURE credit_account (acct NUMBER, credit NUMBER) IS
 BEGIN
 END credit_account;

 PROCEDURE debit_account (acct  NUMBER, debit NUMBER) IS
 BEGIN
 END debit_account;

END bank_transactions;

Thanks in advance,
Sekhar
Thanks in advance,
Sekhar Aripaka

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Generating DDL for PACKAGE in Oracle
« Reply #1 on: June 25, 2007, 07:28:50 pm »
Oracle packages were added for EA 7.0.

Below is from the help page titled "Create Oracle Packages".  (It's not online so I can't link to it)

Quote
To create an Oracle package, follow the steps below:

1. Open the project in the Project Browser window and create an EA package (and, if required, a Class diagram).  

2. Add a Class element to either the package or the diagram.

3. Open the Properties dialog for the element and, in the Stereotype field, assign the value Package.

4. For the package specification, create an Operation with the name Specification and with no return type.

5. Open the Properties dialog for the Specification Operation and, on the Behavior tab, type the entire package specification into the Initial Code field.

6. For the package body, create an Operation with the name Body and with no return type.

7. Open the Properties dialog for the Body Operation and, on the Behavior tab, type the entire package body into the Initial Code field.

I hope that helps, I haven't actually tried following the steps.

sekhar_aripaka

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love EA!!!
    • View Profile
Re: Generating DDL for PACKAGE in Oracle
« Reply #2 on: June 26, 2007, 03:42:53 pm »
Thank you for the quick reply.
I was trying to get the trial version of 7.0 but couldn't locate it, can you plase provide me the link to download?

Thank you once again,
Sekhar
Thanks in advance,
Sekhar Aripaka

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Generating DDL for PACKAGE in Oracle
« Reply #3 on: June 26, 2007, 04:41:47 pm »
Hi Sekhar,

As long as you are a registered user you can download the beta.

Check the Latest News section of the forum for the necessary link. You'll need your credentials handy, even if you have saved them in your browser.

David
No, you can't have it!