Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-26-2008, 05:25 PM
Member
 
Join Date: May 2008
Posts: 3
dayneo is on a distinguished road
Object reference to number
Hi all,

I am new to Java and need some assistance. I am using java stored procedures in Oracle and need to convert an object reference in java to a number so that I can pass it back to Oracle for use further down the oracle stored procedure. See the following code for a rough idea of what I am trying to accomplish:

Code:
// Java class jsp { static int GetObject() { Object o = new Object(); int ref = GetRef(o); return ref; } static void SetValue(int ref, string value) { Object o = GetObject(ref); o.setProperty = value; } }
Code:
-- Oracle stored proc create or replace procedure do_something as l_ohnd number; begin l_ohnd := jsp.GetObject(); -- oracle code... jsp.SetValue(l_ohnd, 'new value'); end do_something;
I am struggling with the "GetRef" part.... I don't know how to accomplish it in Java. Any help or links would be appreciated...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-27-2008, 12:16 PM
M77's Avatar
M77 M77 is offline
Member
 
Join Date: May 2008
Location: LV
Posts: 36
M77 is on a distinguished road
Send a message via Skype™ to M77
Try to read some Java manual for beginners.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-27-2008, 03:11 PM
Member
 
Join Date: May 2008
Posts: 3
dayneo is on a distinguished road
RTFM?
Which FM? I think for a java beginner, I am doing something a little more advanced. Google searches havn't given me anything even close yet...
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-27-2008, 03:18 PM
M77's Avatar
M77 M77 is offline
Member
 
Join Date: May 2008
Location: LV
Posts: 36
M77 is on a distinguished road
Send a message via Skype™ to M77
Strange command "o.setProperty = value;"
No property name.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 05-27-2008, 03:23 PM
Member
 
Join Date: May 2008
Posts: 3
dayneo is on a distinguished road
The point is not the syntax... I was really just writing pseudo code...
sure
o.setProperty(value);

But what I want is to get the handle to o as a number. Then be able to convert the number back to the java object instance o.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pls help me out its critical ...... how can we use an arralylist reference raj reddy Advanced Java 1 04-15-2008 02:09 PM
pls help me out its critical ...... how can we use an arralylist reference raj reddy Web Frameworks 0 04-15-2008 10:12 AM
Getting the Object Reference Name Deathmonger New To Java 2 03-12-2008 04:51 PM
reference to elements in array Igor New To Java 1 12-14-2007 01:56 PM
Object and reference katie New To Java 1 08-07-2007 01:00 AM


All times are GMT +3. The time now is 03:21 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org