Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9029601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:17:06+00:00 2026-06-16T07:17:06+00:00

I want to pass a user defined object from my hibernate class and pass

  • 0

I want to pass a user defined object from my hibernate class and pass it onto a stored procedure which reads this list of objects and does the processing. How can i do the same?

The Class is as follows.

public class ExcelListenerBean {
    private int id;
    private String shortName;
    private String fmrCusip;
    private Double incorrectTrdShares;
    private Double incorrectTrdPrice;
    private String incorrectTrdBuySell;
    private Double incorrectTrdCommRate;
    private Double incorrectTrdCommission;
    private Double incorrectTrdFees;
    private Double incorrectTrdNet;
    private Double correctionTrdShares;
    private Double correctionTrdPrice;
    private String correctionTrdBuySell;
    private Double correctionTrdCommRate;
    private Double correctionTrdCommission;
    private Double correctionTrdFees;
    private Double correctionTrdNet;
    private String currency;
    private String fx;
    private Double netUSD;
    private String notes;
}

Can any one please let me know how to draft the procedure and how to loop through the list of ExcelListenerBean objects and save them to a table.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:17:07+00:00Added an answer on June 16, 2026 at 7:17 am
    1. Create OBJECT type , say MyType is OBJECT .... in Oracle that has all the fields you need
    2. Create collection type , TableOfMyObject IS TABLE OF MyObjectType
    3. Create procedure that takes TableOfMyObject as parameter.

    You can use collection variable in SQL statements in your stored procedure like
    SELECT * FROM TABLE(collection_variable)

    I did the same, but the biggest challenge wast to call it from the app using hibernate – I finally found the way to do that.

    Update
    SQL that can be run from Toad.

    set serveroutput on; -- for debugging, 
    -- it makes sense if your procedure outputs anything
    declare my_list TableOfMyObject  := TableOfMyObject ();
    begin 
      my_list.extend;
      my_list(1) := MyType([MyType constructor parameters]);
    
      my_list.extend;
      my_list(2) := MyType([MyType constructor parameters]);
      your_procedure(my_list);
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user defined class that I want to create a public List
i have this function pymssql.connect(host=my host,user=my user,password=my pass,database=mydb) I want to read the user
I want pass a class-instace to a method of an other and be sure
My data is just number, I want pass it from VC1 to VC2 for
I want to pass an uninitialized object pointer to some method. Within that method
I want to pass parameters from PHP Command Line Interface, and then read in
I have a user defined type, which is a datatable in an SqlServer database.
Possible Duplicate: How to pass object from one activity to another in Android I
How to pass an array as a parameter for a user defined function in
I have a model called UserProfile defined as class UserProfile(models.Model): user = models.OneToOneField(User, related_name='userprofile_from_user')

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.