How to reflect DB changes to my Java objects?

Hi All,
I'm new to TopLink so please be patient... maybe my question is a bit silly.
I created an offline DB and a Toplink map and generated classes from my tables.
I added some foreign keys to the online db and I want them to reflect at the Java classes but everything I do doesn't regenerates the Java classes. I refreshed the offline db but the java object remains the same.
How can I regenerate them?
Thanks

Options
1. You could delete all the POJOs and redo the TopLink mappings from your amended DB (but you will lose any changes you've manually made to the POJOs)
2. You can make the changes manually (just follow the example of other foreign key relationships within you current code)
3. Start a new temporary project create the TopLink mappings from your amended DB and merge any POJOs you want into your existing POJOs
Regards,
Mike

Similar Messages

  • Notified of Property Changes in a Java Object

    Hi guys,
    Is there a standard mechanims in java where when an object's properties change value, it being notified to the caller. i am typically refering something similar to listeners which the object concerned implments and when reacts to it when the properties change. something similar to a ActionListner or a MouseListener.
    I am NOT intrested in UI objects although it could also be considered but my main focus is on POJO type of normal objects in java.

    sdbala wrote:
    i am quite aware of this but if u read my 5th posting, i simple dont wish to have any code in the target class which notifies the listener, that part should be hidden or at least moved to another place.
    ever wondered why i have this weird requirment
    well the problem that i have is that i have a framework which basically need to track changes to properties which are implemented by those who using my framework and report those changes to my framework, so that i could proceed with whatever action that i need to take.
    therefore i prefer to have less lines of code to be implemented by those who use my framework.Sounds like you want AOP, then, if you really want to keep notification logic out of your classes. We use AOP to capture certain changes in business objects and send them to a data repository, although in a slightly different way: we intercept calls to our persistence layer, rather than changes to the business objects themselves.
    The downside is that all of these objects you're tracking will have to be under management of your framework, and you'll be introducing a whole new layer of reflective code to deal with it. Think hard if this is what you really want, really need, before proceeding. The Spring framework will come in very handy for this, btw

  • How to read and map schema into Java objects

    I'm new to JNDI and LDAP<br>
    How can I read the schema from a directory into Java objects?<br>
    I need access to the object classes and get all the required and optional attributes... then details about the attributes themselves like its type, cardinality (single or multivalued), etc.

    Hi naidu,
    1. We can use this type of path
    computername
    folder
    file.ext
    2. We can use this in GUI_UPLOAD
       and it will run on presentation server,
       connect to
    computer
       and read the file contents.
    regards,
    amit m.

  • How to trace specific changes made to an object?

    Hi experts,
    Is there any log or trace file in the SAP Portal where to check specific changes made to an object by an administrator ? (i.e. current and former value for "Maximum Automatic Height" iview property, who changed that value, when...).
    Thanks in advance.

    Hi ,
    As you told some changes identified. so navigate to corresponnding portal obejcts and find modified and last changed by similar properties in the property editor object.
    portal activity reports gives how many users visted specific pcd object but not who visited. You can use pcd filter to compare properties.
    Regards,
    Koti Reddy

  • How to reflect data changes back to the external XML

    Hi,
    In one of my application,
    I use data for (any of) my Flex component from an external XML (thru a HTTPService) request & a Java backend function provides the XML data.
    I bind the HTTPService result to XMLListCollection & I supply this data for the dataprovider for my component.
    So, if I make any data changes (by adding / creating new items ) in the component, it will be reflected in the XMLListCollection (resulting in adding / modifying new nodes)
    My Question is how to make these data changes reflect back in the external XML?
    - Sen

    Well not necessarily. While binding directly to the service in view is fast is
    also not very clean and reusable. Try to put your data inside model classes,
    view binds to those classes instead of the service. Also use a custom class to
    wrap your service and that gives you flexibility to change server properties or
    make 2 different calls with the same service. You need to write code yourself
    but in the end it will be easier to adjust changes. So when you load data you
    actually populate the model instead of bringing data straight to the view. This
    code usually gets executed inside a command class. So to be more specific:
    CustomService
    - var HTTPService
    function getData
    -- in here you have the service calling the get data method on the service
    function setData
    -- in here you have the service calling the save data on the server
    View
    var model:DataModel
    - controls binds to the model and display data from model
    - when click on save or whatever gesture you use for saving you dispatch an
    event with the new data.
    You  should use some MVC framework to do this for you..
    When event is dispatched the framework will create a command class instance and
    run it ...
    GetSaveCommand
    - var service:CustomService
    service.saveData(event.Data)
    service.getData()
    function result()
    function fault() - for the success or fault of the service call ...
    you can perform additional data transformation here id needed or employ the use
    of other class to do that if necessary ...
    Hope this makes sense. It is more work involved as you can see.
    Or you can go with 2 HTTPService instance in the view ...
    C

  • How to reflect db changes - Verify Database doesn't seem to work

    I have changed a database (MS SQL Server) column from varchar 255 to varchar 1000, but the designer doesn't pick up the change.
    I read that db changes can be picked up by using 'Verify Database' feature. It doesn't seem to work for us though. Is there any configuration to turn on for the feature to work properly or any work-around to refresh the database changes?
    We are making the database connection using JDBC (JNDI) option since the report is being used in a Java web application.
    Any comments or insights will be very much appreciated!

    Hi Wallie,
    Thank you very much for your reply! Here are the answers to your questions.
    Are you able to create a new report off the modified database?
    ==> Yes.
    Do new reports see the changes made to the database?
    ==> No.
    Are the reports connecting directly to the database table, or is it a stored procedure, business view, universe being used?
    ==> Through a business view.
    By the way, after trying so many things, I was able to figure out the reason. Since the report is using a view, not directly the table, the view itself had to be recompiled to reflect the table changes so that the view could pass the changes to the report. It was a very good thing to know. Your last question could have been a very helpful insight for this issue! Thank you so much again!

  • How to reflect new changes in older instance of work flow?

    Hi All,
    I am working on a custom workflow.
    This workflow is triggered by web dynpro component.
    Earlier my custom infotype was getting updated from web dynpro, and work flow is used to maintain process flow.
    But currently we started facing some authorization issue while updating infotypes for approvers.
    So now i introduced an activity in work flow to update this infotype from work flow using WF_Batch
    (calling method of a class to update the infotype), and commented the code to update infotype from web dynpro.
    Now the problem is, i have few requests raised using older version of work flow,
    in which the activity to update infotype was not there.
    New requests are working fine, infotype is getting updated using work flow.
    But in older requests when i am viewing from SWIA that new activity to update infotype is not visible.
    How can i implement the changes to older instances of work flow?
    Because for older requests in web dynpro also there is no code to update infotype as well as in older work flow instance
    my activity to update infotype is not visible.
    Waiting for help.....
    Regards,
    Amar

    Hi Amar,
    The changes will be reflected for new instances that are created after the transport of the new workflow definition.
    The instances of old definition will continue as it is.
    However a workaround could be that you can end the old definition instances by logically deleting them and start new workflow by T code SWUS or generating event by SWUE and go through the whole process again.
    Re- triggering of the workflow seems to be only solution here .
    Hope this helps.
    Regards,
    Sangvir Singh

  • How to reflect the changes made in the internal table?

    Hi,
    I changed one field of the internal table.
    i used
    modify workarea.  in the loop.
    when i am debugging that row is getting modified but after execution when i am displaying that changes are not reflected. why?

    hi it should work, just check whether u have worked correctly with SY-TABIX..
      LOOP AT T_VBRK_VBRP.
        V_SYTAB = SY-TABIX.
        AT NEW VBELN.
          READ TABLE T_VBRK_VBRP INDEX V_SYTAB.
          READ TABLE IT_VBRK WITH KEY VBELN = T_VBRK_VBRP-VBELN.
          IF SY-SUBRC = 0.
            T_VBRK_VBRP-FKDAT = IT_VBRK-FKDAT.
            MODIFY T_VBRK_VBRP  TRANSPORTING FKDAT
                      WHERE VBELN = IT_VBRK-VBELN.
          ENDIF.
        ENDAT.
      ENDLOOP.
    <b>Check this code too where we assign Sy-Tabix to another variable</b>
      LOOP AT IT_VBRK.
        CTAB = SY-TABIX.
        LOOP AT IT_T001 WHERE BUKRS = IT_VBRK-BUKRS.
          IF SY-SUBRC  = 0.
            IT_VBRK-BUTXT = IT_T001-BUTXT.
            MODIFY IT_VBRK INDEX CTAB.
            CLEAR CTAB.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    <b>Award points if found helpful</b>

  • How favicon can be changed in Webdynpro Java ????

    Hi:
    I need change the icon SAP in URL. The application was created in Webdynpro Java. I need custom icon in URL. Someone can help me??
    Thanks !!! 

    Hello Dorhyz,
    Please refer to the thread below, may be a bit helpful to you:
    [/thread/1186342 [original link is broken];
    Regards,
    Gaurav

  • How to the custom color in the Java object?

    My code:
    <cfset var image =
    createObject("java","java.awt.image.BufferedImage") />
    <cfset var color=createObject("java","java.awt.Color")
    />
    <cfset g = image.getGraphics() />
    <cfset g.setColor(color.white) />
    In the last row,I want to repalce the "color.white" with
    #F23ABB,How???
    Thanks.

    Try the decode() method and you must initialize the
    BufferedImage object before using it.
    http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/BufferedImage.html#BufferedImage(in t,%20int,%20int)
    <cfset var bi =
    createObject("java","java.awt.image.BufferedImage") />
    <cfset var image = bi.init(theImageWidth, theImageHeight,
    bi.TYPE_INT_ARGB) />
    <cfset var g = image.getGraphics() />
    <cfset var color = createObject("java","java.awt.Color")
    />
    <cfset g.setColor(Color.decode("##F23ABB")) />

  • How to transport Parameter changes in a crystal report

    Hi All,
    Very Good morning!!!
    I have designed a crystal report with static parameters. Earlier i used to have a dropdown kind of input selection for my parameters.
    Now i got a new requirement for a direct input in the field....tht means no dropdown ...single date field is to be entered directly.
    Accordingly i have removed the dropdown and changed to a single direct date field. I saved these changes to a request and transported to quality. Not sure whether the parameter changes are collected into a request.
    Whereas i couldn't found any changes of my parameters in quality. They are as same dropdown manner in the quality whereas i need them to be a direct field date entry which did not affected the quality server after transporting the changes.
    Could some one please let me know how to reflect these changes in quality server regarding parameter changes in a crystal report for BW.
    Thanks in Advance.
    Jitendra

    Please re-post if this is still an issue or purchase a case and have a dedicated support
    engineer work with your directly

  • How to sync the changes in Crsytal With repsect to changes in BVM?

    Hi,
    I made some changes in Business View, but dont know how to reflect those changes in the respective Crystal report without restarting application.
    I tried with Refesh, Log On/Off Server in Repository Explorer but the changes did not reflected in report.
    Could any one please help on this?
    Thanks in advance.
    Ashish B.

    As far as I can tell the only way for Crystal Reports to accept changes in the Business Views, Elements or Foundations is to exit and reopen Crystal Reports.  If you go to verify database before restarting, it does not register the changes, but if you restart and then go to verify database (or run the report) then the changes are picked up.  Not sure if this will be fixed in BOER3 or CR2008, but I hope so.
    Geoff.

  • How to refresh parents externally changed collection of child objects

    Hello,
    we have an external process which updates the database independently from TopLink. We receive a notification whenever objects are created or deleted.
    We have an object A that contains a collection of B's. When a B is inserted or deleted in the database, we get an insert- or delete-event for B. But we also need to refresh the object A to reflect the changed collection in our object model.
    Is there any TopLink mechanism we can use to do this automatically? Otherwise we will have to manually find all the objects that reference the inserted or deleted B and refresh them as well.
    We are grateful for any suggestions.

    Hello Don,
    thank you for your answer. We have the back reference and at the moment follow the approach you suggested. But as a consequence we have to handle each class B individually, i. e. given our knowledge of the object modell we have to hand-code for each class B a method that refreshes all the objects referring to it. Since the necessary information to do this seems to be available in the TopLink descriptors we were wondering whether there exists a more generic way. E. g. we thought about analyzing B's descriptor and follow all one-to-one mappings to the referred objects and find out if their descriptors in turn contain a collection mapping to B in which case we would refresh them. Unfortunately that won't work in case of n:m mappings where no back reference exists.
    Another possibility would be to go over the TopLink cache and refresh every entry that refers to the object in question, but we do not know how this could be done (and if it is advisable).
    Best regards
    Achim

  • Explicity mapping between ActionScript and Java objects for the BlazeDS Messaging Service

    The BlazeDS documentation shows how to explicitly map between ActionScript and Java objects. For example, this works fine for RPC services, e.g.
    import flash.utils.IExternalizable;
    import flash.utils.IDataInput;
    import flash.utils.IDataOutput;
    [Bindable]
    [RemoteClass(alias="javaclass.User")]
    public class User implements IExternalizable {
            public var id : String;
            public var secret : String;
            public function User() {
            public function readExternal(input : IDataInput) : void {
                    id = input.readObject() as String;
            public function writeExternal(output : IDataOutput) : void {
                    output.writeObject(id);
    and
    import java.io.Externalizable;
    import java.io.IOException;
    import java.io.ObjectInput;
    import java.io.ObjectOutput;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Set;
    public class User implements Externalizable {
        protected String id;
        protected String secret;
        public String getId() {
            return id;
        public void setId(String id) {
            this.id = id;
        public String getSecret() {
            return secret;
        public void setSecret(String secret) {
            this.secret = secret;
        public void readExternal(ObjectInput in) throws IOException,
                    ClassNotFoundException {
            id = (String) in.readObject();
        public void writeExternal(ObjectOutput out) throws IOException {
            out.writeObject(id);
    If I called an RPC service that returns a User, the secret is not sent over the wire.  Is it also possible to do this for the messaging service? That is, if I create a custom messaging adapter and use the function below, can I also prevent secret from being sent?
    MessageBroker messageBroker = MessageBroker.getMessageBroker(null);
    AsyncMessage message = new AsyncMessage();
    message.setDestination("MyMessagingService");
    message.setClientId(UUIDUtils.createUUID());
    message.setMessageId(UUIDUtils.createUUID());
    User user = new User();
    user.setId("id");
    user.setSecret("secret");
    message.setBody(user);
    messageBroker.routeMessageToService(message, null);

    Hi Martin. The way that AMF serialization/deserialization works for BlazeDS is the same regardless of which service is being used, so yes that code will work for messaging as well. On the server, the serialization/deserialization of messages happens at the endpoint. For an incoming message for example, the endpoint deserializes the message and then hands it off to the MessageBroker which decides which service/destination to deliver the message to.
    That was a good question. Thanks for asking it. Lots of people are used to doing custom serialization/deserialization with the RPC services (RemoteObject/RemotingService) but I'm not sure everyone realizes they can do this for messaging as well.
    -Alex

  • How to view the change immediately after a java file is modified without restarting server or redeploy?

              Hi All,
              How to view the change immediately after a java file that is used in jsp is modified
              without restarting server or redeploy?
              Moreover, it is better to keep the original session.
              Any suggestion is appreciated.
              Kammau
              

              Hi,
              In order to have a new version of a java class, the current classloader must be
              deleted and a new one created. This is what redeployment does. I believe that
              this is more of an issue with Sun's implementation of classloaders. You could
              ask BEA support (719.232.7878) and see if they have any plans to periodically
              check jar files to see if java class file timestamps and destroy and re-create
              classloaders on the fly.
              1) You will still have to accept the performance hit of destroying classloaders
              and creating new ones. There isn't any way around that.
              2) I would think you would want to have more explicit control in production and
              integration anyway.
              You can redeploy applications from the command line (script) file not just the
              console.
              Hope this helps,
              pat
              "Kammau" <[email protected]> wrote:
              >
              >Hi All,
              >How to view the change immediately after a java file that is used in
              >jsp is modified
              >without restarting server or redeploy?
              >Moreover, it is better to keep the original session.
              >Any suggestion is appreciated.
              >
              >Kammau
              

Maybe you are looking for

  • How do I see my iMAC on the network

    I have both PC as well as iMAC connected on the network. I can see the PC on my iMAC - no problems. But I can't see the iMAC on my PC. I 'shared' my files on the MAC for FTP access (tried with AFP & SMB as well), then browsed the network places on my

  • Not allowed to move load order of Control panels in System Preferences Tige

    I post here because System refuses to let me post in Tiger forum depite my being a forum member since purchasing my G4-500 new just a few months after coming out. The problem is associated with my PowerBook17" bought new March a year ago. I currently

  • Storing data in a db

    I'm developing an application that queries a db, shows the results in a JTable and then stores back into the db the data with all the new informations written into the JTable. Now, I've got no problem querying the db and showing the results into the

  • [solved] Gnome-do can't open home folder

    I've been using gnome-do for a while now and like it, but I can't get it to open my home folder.  This is with the docky theme.  If I try to use it to open my home folder. What I mean is type super-space to bring up the text input box and then type "

  • My slideshow is built with PSE 7 (32 bits)(file : *.psess). I want open it with my new PSE 13 (64bits)

    My slideshow is built with PSE 7 (32 bits)(file : *.psess). I want open it with my new PSE 13 (64bits) Is this possible ? How ?