Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Nested Objects in Oracle

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I need to call a Stored Proc which takes in Array of Objects as input and update the Oracle DB. I am taking the following approach, but i am struck.

//Channel

create or replace TYPE Channel_List AS OBJECT (channel_id number)

//Channel Type
create or replace TYPE ChannelList AS TABLE OF number

In the above method i created Data type for Product attribute.

//Object to Inserted

create or replace TYPE PACKAGE AS OBJECT
(
PKG_PRC_ID NUMBER,
PACKAGE_ID NUMBER,
PRODUCT_TYPES ProducttypeList,
CHANNEL_ID ChannelList
)

create or replace TYPE PACKAGE _TYPE IS TABLE OF PACKAGE

After Creating this i wrote three classes,

ProductTypeDTO
ChannelTypeDTO
PackageDTO

and implemented SQL DATA.

After this i am Struck up. Product and Channel Take multiple Values, i dont how to create descriptors for it? If i dont have ProductTypeDTO and ChannelTypeDTO then i would have created Array of PackageDTO and would have handled like this,


where arrProdSeg is array of PackageDTO.

Thanks is Advance.

Regards,
Arul.
 
Marshal
Posts: 74359
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bump!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic