Treat objects from named query as new ones

Hello,
I use TopLink 11.1.1.1.0 and I need to do following. I want to read object from database with named query and let TopLink treat them like new object created in java. Is it possible? Obejcts are in one table but the named query computes them with select from several different tables, so this obejcts are not present in the table.
Why I need it? It is import of data from one module of our application to another. Previously it was done in java. About 500 000 objects were read in one module just to convert into 20 000 objects in another module. If database does this conversion (named query with grouping which reads the 20 000 objects) it is much faster and take much less memory.
What I can do is to create new class with the same fields query this objects and then copy them to object I need. But I don't like creating new class just for this.
Thank for any help
Frank

Thanks for help I solved it different way eventually. I made a stored procedure which inserts data to the table of SOURCE_ITEMS. First I call stored procedure, then I load all new created SOURCE_ITEMS with ReadAllQuery (I have business parameters by which to select them) and make post processing in java with them. I used StoredProcedureCall in TopLink so if exception occurs and transaction rollbacks, stored procedure will rollback as well (I tried it, works for sure:).
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName(SQL_IMPORT_CALL);
call.addNamedArgumentValue(SQL_IMPORT_PARAM_1, getId());
call.addNamedArgumentValue(SQL_IMPORT_PARAM_2, getXXX().getId());
call.addNamedArgumentValue(SQL_IMPORT_PARAM_3, getYYY.getId());
call.addNamedArgumentValue(SQL_IMPORT_PARAM_4, getZZZ());
DataModifyQuery query = new DataModifyQuery();
query.setCall(call);
query.setShouldBindAllParameters(true);
// insert of imported SOURCE_ITEMS
ctx.executeQuery(query);
Thanks Chris and hope this will help to somebody else as well..
Frank
Edited by: user604333 on Nov 17, 2010 12:20 PM
Edited by: user604333 on Nov 17, 2010 12:20 PM
Edited by: user604333 on Nov 17, 2010 12:20 PM

Similar Messages

  • How do i get my song from old computer to new one. on windows

    how do i get my itune song from old computer to new one. windows

    To have  EVERYTHING  as it is Now...
    From your OLD computer...
    Copy your ENTIRE iTunes FOLDER to an External Drive... and then from the External Drive to your New Computer..
    Full Details Here  >  http://support.apple.com/kb/HT1751
    An Added Bonus is that you will have a Backup of iTunes.

  • TS3682 apps not transferring from old iPhone to new one

    does anyone know why im not able to sync my apps from old iPhone to new one through itunes?

    the apps also need to be downloaded into itunes have you checked that?

  • Is there a way to move Messages and Local (not synced with iCloud) notes from old iPhone to new one ?

    Is there a way to move Messages and Local (not synced with iCloud) notes from old iPhone to new one ?

    Yes, it will. You cannot merge information on the phone. If you want the old messages, you will need to restore from a backup of the old phone, which will make the new phone look just like the old phone. If you want to save the messages from the new phone, you will not be able to get the messages from the old phone.

  • Recently bought a new ipod, but would like to transfer my game data from old ipod onto new one. can i do this without losing any information?

    recently bought a new ipod, but would like to transfer my game data from old ipod onto new one. can i do this without losing any information?

    Are you sure? I restored my new iPod from the backup of my iPad and all app data was restored to the new iPod..  App data is part of the backup.
    iPhone and iPod touch: About backups

  • How to transfer music from old shuffle to new one

    Old shuffle was defective...apple sent a new one...now need to transfer music from old shuffle to new one. Please help. Apple support says.....can't be done....but...go to apple community and ask for help.    HELP!!!!!!!

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • HT1386 how do i transfer ipod registration from old computer to new one?

    How do i transfer ipod rigistration from old computer to new one?

    What "ipod registration"? 
    Plug it in and sync.
    It will erase your content form the ipod and replace with content from the new computer.  Make sure you have copied everything from your backup copy of your old computer to your new one first.

  • When transfer content from current ipad to new one the apps didn't load

    when transfering data from existing ipad to new one using icloud,  the apps didn't download although the screen icons appear on the new ipad. how to fix?

    So images of the apps appear on your screen and you cannot open them?
    How did you transfer the data? Did you sync the content from itunes or restore the new ipad from the old ipad backup?
    The best way would be to backup the old one and restore the new one from that backup
    How to back up and restore (iCloud and iTunes)
    http://support.apple.com/kb/HT1766

  • After upgrading my iphone 4 to io6 i started loosing the historical sms messages from some senders including new ones received as soon as I open the message app. I am not happy with io6. please advise how i could downgrade to io5.1.1.

    After upgrading my iphone 4 to io6 i started loosing the historical sms messages from some senders including new ones received as soon as I open the message app. I am not happy with io6. please advise how i could downgrade to io5.1.1.

    I have read a number of other threads regarding the loss of Messages, however, I am not aware of the reason it is happening. Check on the right side of this message under more like this and see if you can find an answer.
    As to your question about downgrading software, there is no Apple supported method for downgrading software.

  • Moved iTunes library from old PC to new one...may have lost songs!

    I successfully moved my iTunes Library from ly old Pc to my new one..Hooray! The problem I've found is that before I moved the library, I had purchased some music on my new PC..at least 75+ songs. When I moved everything over..it copied over my new library losing these files (I believe). Is there any way I can retrieve them again..without having to but them again?

    If you didn't make a back-up of your purchases to restore from then I'm sorry to say that the policy on lost purchases is that you have to pay to download them again:
    "Once a Product is purchased and you receive the Product, it is your responsibility not to lose, destroy, or damage the Product, and Apple shall be without liability to you in the event of any loss, destruction, or damage." iTunes Store: Purchased content can be downloaded only once
    You could try contacting the iTunes Music Store Customer Service and you might be able to persuade them to sanction a second free download. There have been occasional reports in the iTunes forum of this happening, however just be aware that they are not under any obligation to do so. If you click on any of the links on this page you'll find a space at the bottom to email your query: iTMS Customer Service
    You might also want to check out this page for future reference: How to back up your media in iTunes

  • Getting data transfered from old HD to new ones, leaving 2 slots filled . .

    Hello,
    *(Below is a thread I started in another forum, but, didn't get my final questions answered (see at bottom of this post in BOLD), and am hoping for further help and suggestions. I know there is a lot to read here, but, I think this information will help other novices, such as myself. Thanks!)*
    I have 2 new HDs (each 1T) uninstalled, and I have my old HD (160 gigs) currently residing in one of the two slots in my G5. Any ideas on the best way/process to get the data transfered from the old HD to the new ones, leaving my two slots filled with the 2 new drives AND my data from the old HD transfered and intact, with a RAID0 setup?
    OR, are there any other suggestions on a good setup with the 2 new HDs??
    I'm open to suggestions.
    I always back-up on external HDs, so, is their a need for me to worry about setting up a RAID0??
    I'm doing video processing for DVD release.
    Should I just max out the 2x1T gig HDs and not worry about a HD failure??
    All Suggestions welcomed!!
    Thanks, Jack
    *FROM THE CUTTERMAN:*
    You are limited with only 2 drive slots. In this scenario what usually works best is a small fast drive (eg Velocirapter or SSD) for OSX/Applications and a large drive for video files. It is not advisable to have the operating system running from a striped array.
    Since you already have the drives, here is what you can do.
    Install one new drive and format the partition you wish to use for OSX. You may not want to use the whole drive for OSX, so make 2 partitions. Be sure that it is GPT-formatted so it can boot.
    Use CarbonCopy Cloner to copy your current OSX partition to the new one.
    Set the startup disk as the new partition.
    Remove the old drive and replace it with the second new one.
    Reboot, and partition/format new drive.
    *Hey Cutterman,*
    Thanks for the advice. That sounds like a good set-up. I'll have to research the process of doing what you've advised, but, should work out ok:
    A. Install one new drive and format the partition you wish to use for OSX. You may not want to use the whole drive for OSX, so make 2 partitions:
    1. Partitions are done under Disc Utilities correct? Never done it before; will take a look.
    B. Be sure that it is GPT-formatted so it can boot.
    2. GPT is also done under Disc Utilities, correct? Here I start to get a bit confused, as I've formatted Extended Journal, SO, the partition with the OSX & Applications is formatted GPT, and the rest of the HD is formatted as Extended Journal?
    C. Use CarbonCopy Cloner to copy your current OSX partition to the new one.
    3. So, I partition the first new HD and use Carbon Copy Cloner (also under Disc Utilities) to copy the OSX & Applications from my original HD to the first new HD, correct?
    D. Set the startup disk as the new partition.
    4. This will be an option when I setup the partition???
    E. Remove the old drive and replace it with the second new one.
    F. Reboot, and partition/format new drive.
    5. QUESTION: So, you recommend not striping the HDs: If I do a RAID 1, which sets up a mirror of the HDs, and since the first new HD is partitioned with the OSX & Applications, AND is set up as the Startup Disk, then the second new HD will also mirror that?? Another QUESTION: Even if the second new HD does not mirror the OSX & Applications, the second HD will only mirror the space/partition not utilized by the OSX & Applications partition, correct?
    Thanks for your help!!
    Jack
    *FROM THE CUTTERMAN:*
    OK I will try to answer your questions. To begin, if you want to mirror the 2 drives then you will need to boot from the SL install DVD or an external (USB/firewire) drive to set it up. IMO for your purposes it is too much hassle and a waste of HD space.
    1) Yes partitions are created in Disk Utility
    2) Yes, you choose a volume Scheme (ie number of partitions) and size them by dragging the separator bar. Then select the planned boot partition and click Options..., then choose GPT. I think it is usually the default but check and make sure. Extended journaled is the usual format.
    3) You need to download Carbon Copy. It is a free tool that will copy the entire image of your current system partition to the new one and make it bootable. Consider making a donation as it is a very useful and frequently updated utility. It is fairly intuitive to use. You can also use the restore feature in Disk Utility but I have had more experience with Carbon Copy.
    4) Once the copy process is finished the new boot partition will show up under the startup disk selections (this tool is in System Preferences).
    *FROM 666Sheep:*
    If may i correct one thing: OP, don't choose GPT (GUID Partition Table). You got PPC Mac (G5), so valid partition type for you is Apple Partition Map (APM).
    GPT is for Intel Macs and you will not able to boot from this kind of partition.
    *FROM THE CUTTERMAN:*
    Thanks for the correction- my bad. No familiarity with non-Intel Macs.
    G5 PowerMac, 2.5 GHz Dual, Dec. 2004, 6.5 GB RAM, 149 GB HD
    *Hi All,*
    *Since this process will come to a head on Tuesday/Wednesday, and I hope to be successful in transferring Old HD data to new HD/s.*
    *A: I'm still a little foggy here, as I thought I'd set up the 2 new T-gig HDs so that if one of them failed, I'd still have the data backed up on the other HD; more ideas concerning this would be reassuring:*
    *WHAT DOES "IMO" mean?*
    *(IMO for your purposes it is too much hassle and a waste of HD space.)*
    *As I understand the points made: After I partition the first new HD, and Carbon Copy data from old HD, I then install second new HD, and this will just act as an overflow from the first partitioned HD, correct? Because, if set up a Raid1/Mirror, the OSX partitioned portion of the first new HD will not copy to the second new HD, and that space on the second new HD will be wasted, correct?*
    *Also: I have to set up RAID1 (if I do not set up RAID0), correct?*
    *RAID 1*
    *From WIKI: RAID 1 mirrors the contents of the disks, making a form of 1:1 ratio real time mirroring. The contents of each disk in the array are identical to that of every other disk in the array. A RAID 1 array requires a minimum of two drives.*
    *Carbon Copy is a free tool that will copy the entire image of your current system partition to the new one and make it bootable.*
    *1. Is my old HD partitioned? Is that done automatically by MAC prior to PC purchase?*
    *2. Do I Carbon Copy the whole old HD or just parts? (eg. OSX, Photo Shop, After Effects, Various Files)*
    *3. I read that it is necessary to DEACTIVATE Photo Shop (I have CS3) prior to doing Carbon Copy. Is that correct? If so, does this also apply to other Adobe applications? Such as After Affects, Illustrator??*
    *Thanks to all for the help!!*
    *G5 PowerMac, 2.5 GHz Dual, Dec. 2004, 6.5 GB RAM, 149 GB HD*

    Confusing Information:
    A1: You also want to make sure the drive you are backing up to is formatted Mac HFS Extended (HFS+) if using Mac OS 8.1 or above.
    A2: On PowerPC Macs, your clone should be partitioned as Apple Partition Map.
    *Q? I thought the new HD (1T) should be formatted in Extended Journaled?*
    B: Also disable Spotlight (in 10.4 only) on your destination drive using Apple menu -> System Preferences -> Spotlight -> Privacy to add the destination drive to the pane.
    *Q? I'm using 10.4.11, so, I should follow these instructions?*
    C: If possible, boot into safe mode to perform the backup (holding the SHIFT key at startup). In addition, you can clone while logged into another administrative user that you don't use at all to avoid further complications of changes which may be happening to your regular user (though don't use Fast User Switching to get into that other user, since that other user is still active when fast user switching is used). Otherwise you are going to be running a backup on a live system which could have changes happening while you are attempting to backup. These may yield an imperfect clone, with uncertain success at recovery. It may be possible that your clone will have its own hardware issues, so make at least two copies.
    *Q? ?????????????*
    *I GOT THE ABOVE INFO. FROM THE FOLLOWING SITE:*
    Making a clone/mirror/duplicate backup
    http://www.macmaps.com/backup.html#SHORTANDEASY
    *ALSO, WHAT DO YOU THINK ABOUT THE ADVICE ON THIS PAGE:*
    http://www.levoltz.com/2010/04/21/how-to-transfer-data-to-your-new-hard-drive/

  • How do you put libary from broken computer to new one?

    My computer recently crashed with several recently purchased songs in my libary I was yet to put on my ipod. I got a new computer but i don't know how to put my purchased songs from my old, broken computer on to my new one. I know itunes has probably saved my purchase history and I'm wondering if itunes can let me redownload all of my recently purchased songs for free as i've already paid for them. unfortuneately, I last backed my itunes up in 2007 and my music has changed a lot since then. there is no more recent backup. please help.

    You should always maintain a backup for this very reason.
    From the itunes store terms of service:
    "PRODUCTS CAN ONLY BE DOWNLOADED ONCE; AFTER BEING DOWNLOADED, THEY CANNOT BE REPLACED IF LOST FOR ANY REASON. YOU SHALL BE RESPONSIBLE FOR BACKING UP YOUR OWN SYSTEM"

  • Transfering Music from old PC to new one

    Is there a way for me to use my I-Pod to transfer my I-Tunes playlist from my old PC to my new one? I am hesitant to sync it as it may delete everything off the IPod. Thanks in advance!

    I have a rather specific issue to resolve. Having very recently bought a new computer, I planned to transfer all of my itunes over using my ipod. Unfortunately, my 14 month old ipod (80GB video) failed as it was being charged - it blipped and died on me. I have tried different methods of charging and it does not work. So with an ipod just out of warranty I have now got over 1000 songs on an old computer without a CD burner. I have this new computer, and I have just bought a new ipod. It does not like connecting to my old computer. I have a separate external back up device (an external hard drive I think) which will work on both computers. Can you please advise how I can transfer all of my songs using this external drive? My email is [email protected] Many thanks for your help.

  • Transferring from old pc to new one

    does anyone know how to transfer my library from my old pc to my new one?
    There are a couple that have gone onto the new one for some reason and not the rest.
    Any advice would be appreciated.

    There are a few things you could do, from networking the two computers, using an external hard drive or even use an iPod to make the move. Have a look at this User Tip: Migrating iTunes for Windows to a new PC
    If you can network the computers there is also this one: Copying songs over a network to use with iTunes for Windows

  • Transferring info from older iMac to new one.

    Is there a way to transfer my files from my older iMac to My new one? I mean, can I use the firewire port or something easy like that to transfer my files? Or will I have to start form scratch. BTW did I mention my cd/dvd drive on my older mac is dead? There will be no backing up files.
    Please help!

    Just be careful with Migration Assistant. If you select Applications, it will move everything over that isn't newer or already on the new Mac. You can't pick and choose. This means it will move any ancient or incompatible apps, including all their associated files, which may end up being spread out all over the new computer.
    In addition, if you are moving things out from a PPC to an Intel, read this.
    http://discussions.apple.com/thread.jspa?messageID=1872713
    Sometimes it's safer to just move files and folders over.

Maybe you are looking for

  • Adobe lifecycle pdf is not working in adobe reader

    Hi Team I have designed one form in Adobe lifecycle designer. In that form i have button to export pdf to xml.it is working in adobe lifecycle pdf preview screen,but if you open in adobe reader export functionality is not working.How the end user wil

  • About vertical format (iBooks Author)

    Hello people! This is my first entry, but not the first time I check for your support. This is because I can't figure something out, so you might help me a little. This is my problem: some creative son of his/her mother decided to propose vertical co

  • Question mark is now a green circle

    Hi all, I am so confused. Somebody started appearing as a question mark, which meant to me that they had unfriended me and possibly also blocked me. I sent them friendship requests and maybe they didnt even see them, as they had unfriended and blocke

  • Documentation links and METADATA

    Hello All, Our user want to upload some document related to transactional data in BW and display them in BW reports. We do the upload from SEM BPS layout and it works fine. Point 1: Unfortunately, when the same user wants to display the document in B

  • Query help for archive log generation details

    Hi All, Do you have a query to know the archive log generation details for today. Best regards, Rafi.