Update the persistent store

Hi all

I am a soft developer for BB. I need a little clarification. Is it possible to update the data stored in the persistent store? Pls answer...

Thank you in advance...

Welcome on the support forums.

If you commit something to the store, you replace the existing value. of course, you can read the existing value and change it before you engage again, or commit any other thing.

Tags: BlackBerry Developers

Similar Questions

  • Editing an object that I stored in the persistent store

    I store a custom object in the store persistent and would like to add a new Member.  Someone knows how can I do this?  I'd rather not delete it and store an object in its place because what happens if I need to add more members in the future.  This would encourage me to juggle all versions of my object.  Is there a kind of model for version control that I can apply to my objects stored persistently?

    I don't think it will work.  The link that you say talk us too much serialization, but the persistent object is not serialized as part of persistence.  If you want to serialize her, you should do it yourself.

    I'm guessing that you did not design your class being "expandable". And I'm guessing that you do not want your users to have to recreate these data.

    So I investigate an approach to migration.  In the code that gets the persistent store, got it get the object persistent, then check that it is indeed a picture of your old items.  If it is, convert it to an object type, store it in a collection (vector or Hashtable as suggested, for example) and keep the result, by replacing your old array of persistent storage object.  So your new application includes the old class of objects, exactly as it was, which means that you can install it on top of your existing application.  But once your request is used at the same time, the old persistent object is no longer used.

    Does make sense?

  • increase the size of an array stored in the persistent store

    Hello

    I have a question.  I use the persistent store to store the data.

    When there is a new medium, I need to add it in this table.

    The problem is the size of the table is fixed, how do I re - set the size of the array? and save the persistent store return?

    Thank you

    Yes, vector will be better because you can't copy items.

    If you use the simple table of data types would be more effective, I think, you can take a look at Arrays.fill, then.

    No referenced objects are captured by garbage collection.

  • IT detect policy "allow third party applications to use the persistent store" by program

    Our application uses the persistent store widely, and we try to find a way to fail gracefully, with a coherent, when the it policy error "allow third-party Apps to use persistent store" is disabled.

    Ideally, we would detect this setting programmatically and displays an error to the user to inform them that this is the condition that prevents us from running.  It seems that the ITPolicy class in net.rim.device.api.itpolicy would allow us to do, but I can't understand what I asked for to verify this IT strategy value - I can't find documentation on most of the system properties how to query their status and try the guess of getBoolean ("AllowThirdPartyUsePersistentStore", true) does not appear to return the correct value.

    Or, if there is a better way to detect this State, that would work too.

    Thank you.

    Hello

    The settings to use in the class plan ITPolicy to the ITPolicyTemplate2 of the BlackBerry Enterprise Server BESMgmt database table.

    for the "allow third-party Apps to use store persistent' policy, which is a 24 tag and subtag of 17. However, please pay special attention to the it policy Description:

    This rule is obsolete. || Specify if third-party applications on the BlackBerry smartphone can use the RIM store persistent application programming interface (API). || Computers handhelds with OS version 3.x and below must use policy AllowThirdPartyUsePersistentStore IT. | The 4.0 and later versions must use application control policy. || If you do not set this rule, a default value of True will be used. || This rule applies only to the BlackBerry Java-based instruments version 3.6.0 by 4.0.0.

    A complete list of policies COMPUTER located in the reference of policy here: http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=6199802&sliceId=&dialog...

    Tariq

  • Cannot install and update the apps store of windows 8

    Cannot install and update the apps store of windows 8. When I click the button install is not install only loadin. Plese help me.

    After trying all suggestions from several sites, I found that the problem is that the Firewall window must be running in order for the applications to install.   If you are running Windows 8 Pro, go to the desktop and click on "My computer" and double click on 'manage '.  In the window on the left side computer management, expand "Services and Applications".   Click on 'Services', in the Center window, scroll down to "Windows Firewall" right click on "Windows Firewall" and click "Properties".  If the Startup Type is "disabled", click to drop down and select "Automatic".  At this point, you can click on 'Start' under the service status.  Once the Windows Firewall is started, you should be able to start installing and or update your apps from the app store.

  • Object named 'record' is not found in the persistent store

    When I access portlet, I got the following error on side producer portlet:
    Could someone help what they indicate:

    Thank you
    Root cause of ServletException.
    oracle.portlet.server.container.InvalidRegistrationException: oracle.portlet.server.containerimpl.ContainerObjectNotFoundException: Object named "registration" could not be found in the persistent store.
         at oracle.portlet.server.containerimpl.ConsumerRegistration.<init>(ConsumerRegistration.java:88)
         at oracle.portlet.server.containerimpl.ResourceServlet$ResourceRequestWrapper.<init>(ResourceServlet.java:138)
         at oracle.portlet.server.containerimpl.ResourceServlet.service(ResourceServlet.java:93)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.portlet.server.service.ContextFilter.doFilter(ContextFilter.java:101)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:230)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3593)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2203)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2109)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1427)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    oracle.portlet.server.containerimpl.ContainerObjectNotFoundException: Object named "registration" could not be found in the persistent store.
         at oracle.portlet.server.containerimpl.persistence.ConsumerPersistentStorage.get(ConsumerPersistentStorage.java:83)
         at oracle.portlet.server.containerimpl.ConsumerRegistration.<init>(ConsumerRegistration.java:69)
         at oracle.portlet.server.containerimpl.ResourceServlet$ResourceRequestWrapper.<init>(ResourceServlet.java:138)
         at oracle.portlet.server.containerimpl.ResourceServlet.service(ResourceServlet.java:93)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.portlet.server.service.ContextFilter.doFilter(ContextFilter.java:101)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:230)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3593)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2203)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2109)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1427)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    You try to migrate a portlet in JDev 10135 FOR PS1? If so, you can try to do the following:

    -Create a consumer with portlets of the server application embedded in 10.1.3.5
    -Open jdev PS1 and import the settings of the 10.1.3.5 system directory
    -Refresh record producer
    -Run the page again

    I hope this helps.

  • How does the synchronization, the persistent store

    I have number of persistent store for the storage of data, etc.

    When I handle a store (addition, deletion or update), should I need to block the manipulation on another store?

    as there is no reviews for the class being thread-safe, I suggest that you synchronize access yourself.

  • Problem with the persistent store &amp; object

    Hello

    I store 2 types of persistentObject in PersistentStore. I find the problem when retrieving the Typeobjet2. The code is:

        private void GetPersonFromPhone() {
            synchronized(store) {
                data = (Vector) store.getContents();
            }
            System.out.println("\\\\\\\\\\\\\\\\\\  Into GetPersonFromPhone Data = " + data.size());
            PersonInfo pi = null;
            Person p = null;
            for ( int i = 0; i < data.size(); i++) {
                System.out.println("Object Got i = " + i + " - " + data.elementAt(i).getClass().getName());
                if (data.elementAt(i).getClass().getName().endsWith("PersonInfo")) {
    
                      .....
                      data.removeElementAt(i);
                }
            }
             p = null;
            pi = null;
            return;
        }
    
        private void SavePersonsToPhone() {
            PersonInfo info;
            System.out.println(" To SAVE Persons = " + personVec.size() + " To Store Data Size = " + data.size());
            for (int i=0; i < personVec.size(); i++) {
                info = new PersonInfo();
                data.addElement(info);
                p = null;
                info = null;
            }
            System.out.println("Now DATA size = " + data.size());
            synchronized(store) {
                store.setContents(data);
                store.commit();
            }
           // Dialog.inform("Success Stored");
    
            info = null;
            return;
        }
    
     Results
    

    Nobody GOT = name = Mr John Micheal, Email =, URL = store/samples/pictures/Quiver_Tree.png, Send = true
    Size PersonVector = 1
    Object obtained I = 3 - src.se.PersonInfo
    Nobody GOT = name = Peter Simon, email = [email protected], URL = store/home/user/iBeloved/photo1, Send = true
    Size PersonVector = 2
    GOT people = 2 size = 3 data store

    Add new record

    Person - McMillan Desilva, [email protected] , SentEmail = false

    To SAVE the people = 3 to the data store size = 3
    Save I have 0 - name = Mr. Micheal John = Email, URL = store/samples/pictures/Quiver_Tree.png, Send = true
    Added Mr. John Micheal, Email = true to vector to the store
    I save 1 - name = Peter Simon, email = [email protected], URL = store/home/user/iBeloved/photo1, Send = true
    Peter [email protected], Email added = true to vector to the store
    Save I have 2 - name = McMillan Desilva, Email = [email protected], URL =, Send = false
    Added McMillan detailed [email protected], email = false to Vector to the store

    The NEXT TIME that I RAN the APPLICATION

    Nobody GOT = name = Peter Simon, email = [email protected], URL = store/samples/pictures/Cascade.png, Send = true
    Size PersonVector = 1
    Object obtained I = 3 - src.se.PersonInfo
    Nobody GOT = name = Peter Simon, email = [email protected], URL = store/home/user/iBeloved/photo1, Send = true
    Size PersonVector = 2
    GOT people = 2 size = 4 data store

    To SAVE the people = 2 to the size of the data store = 4
    Save I 0 - name = Peter Simon, email = [email protected], URL = store/samples/pictures/Cascade.png, Send = true
    Peter [email protected], Email added = true to vector to the store
    I save 1 - name = Peter Simon, email = [email protected], URL = store/home/user/iBeloved/photo1, Send = true
    Peter [email protected], Email added = true to vector to the store
    DATA size now = 6

    You CAN SEE FROM THE results, how the data changes and incompatibilities. Sometimes he gives good resutls sometimes incompatibilities. Someone can say, where I'm going wrong or what makes the results of the get code.

    Thank you

    Not looked at seriously, but there seems to be a coding bug in this piece of code:

    for (int i = 0; i)< data.size();="" i++)="">
    System.out.println ("object got I I =" + i + "-" + data.elementAt (i) .getClass () .getName ());
    If (data.elementAt (i) .getClass () .getName () .endsWith ("PersonInfo")) {}
    ....
    data.removeElementAt (i);
    }
    }

    Say that the vector has 3 elements inside.  You spend the first at the beginning of the second loop, I = 1, and the for loop see data.size () 3.  Then you deal with the second and delete.  Then when you go back to the loop for I = 2, and data.size () = 2, so you never treat a third.

    Of course, logic could just as easily result in code by jumping the elements of the vector.

    Maybe that's your problem?

  • work on deleting the object from the persistent store.

    Hello

    I use permanent storage to store custom objects, I am able to save, retrieve, and update object. I'm ranger object persistent using State figure "obj" below.here is my custom object that implements Persistable interafce.

    PersistentObject store = PersistentStore.getPersistentObject (0xa1a569278238dad2L);

    store.setContents (obj);

    Store.Commit ();

    But, when I'm trying to delete 'obj' to permanent storage, I found it is ignored, I use possible subsequently remove the object

    permanent storage.

    PersistentStore.destroyPersistentObject (0xa1a569278238dad2L);

    but when I try to get again in my code by using the following statement

    MyObject obj = store.getContents ();

    I get all the properties of 'obj', is there a programmatic way to destroy the object of permanent storage? or is it expected behavior?

    Make sure that you not only remove the store, but also get the new PersistentObject object thus:

    PersistentStore.destroyPersistentObject (key);

    PersistentObject persistObj = PersistentStore.getPersistentObject (key);

    Object myObject = persistObj.getContents ();

    If this does not work then you might have some problems with synchronization - remove any synchronization around this code and check again.

    See you soon

    Nik

  • "Order by" in the persistent store

    Hello

    I want to sort the records to permanent storage, by putting in place a query as

    "Select TimeStamp in the Table where ID = + someID order by Date desc limit 0,1 '.

    How can I order documents in the store and pick up the most recent date?

    Help, please

    Take a look around the available sorting collections - for example SimpleSortingVector.

  • can we save the bitmap to persistent store?

    City previous forums:

    Smiley

    Messages: 29
    From: Canada
    Join date: May 2008

    can we save the bitmap to persistent store?
    Posted the: July 14, 2008 12:41
    Response
    I am trying to save a bitmap in Bank persistence and get an error msg saying Bitmap is not persistent.

    is it possible to save a bitmap?

    Thank you

    Yes it is possible.  You can use the Bitmap.getARGB method to get an array of bytes of the Bitmap image.  Then store its contents in a ByteVector.

    I am aware of the problem and would use a solution like that set up by MiuTunes.  Basically, generating thumbnails on the front and store them on the SD card.

    As neil says, there is a small performance lag, compared, but I find personally unacceptable in this application.  Don't know what you develop, and perhaps there are moments where in memory is better.  I'm also assuming (wrongly?) that you were going to leave them in the persistent store after your application ends.  Anyway, Neil knows more about what I do.

  • JMS persist Store: how to store the messages in a table?

    Hi all

    I'm looking to create a composite that stores messages to a JMS queue on a custom table created. Please advise if the following approach is correct.

    1 has created a table within the dev soainfra: TEST_TABLE
    2 created a wls data source to point to the table: TestDS
    3. has created a persistent store based on above data source: TestStore
    4. has created a server with TestStore JMS in the persistent store: TestServer
    5 has created a JMS Module and the queue to the breast (* TestMod * & jms/TestQueue) it addressed to the TestServer.

    I created a JMS in my composite adapter configured to use my queue jms/TestQueue. The JNDI name used for the JMS adapter is the environmental assessment environmental/wls/queue.

    I ran a test and see nothing in my table. Is there something that I missed?

    JDev version: 11.1.1.4

    Thank you and best regards.

    in response to

    Also, how you consume messages from this table when the data is to the LONG RAW format?

    You do not have. It is an integral part of WLS JMS. You consume messages using a JMS consumer, whether another instance of the adapter or another java client. If you start deleting messages from this table manually, you will mess up JMS and cause of exceptions. I suggest you leave well alone.

  • Persistent Store - is this good or bad idea?

    Currently, I have setup an application with a vector of objects that I store, works great!  For my next request, I want to save more information and thought of different ways to do this.  This first one saves a whole bunch of a single type of object...

    I want to create 3 vectors over other types of objects I created... I thought I could store each vector with id different, maybe I could make a vector of vectors, or maybe make another object that has inside and just vectors that store... examples below:

    the idea of vectors vector

    Vector vectorOfAObjects;

    Vector vectorOfBObjects;

    Vector vectorOfCObjects;

    Vector vectorOfDObjects;

    Vector storeMyVectors;

    storeMyVectors.insertElementAt (vectorOfAObjects, 0);

    storeMyVectors.insertElementAt (vectorOfBObjects, 0);

    storeMyVectors.insertElementAt (vectorOfCObjects, 0);

    storeMyVectors.insertElementAt (vectorOfDObjects, 0);

    and then to get my stuff back, I would use storeMyVectors.elementAt (0) to return vectorOfAobjects...

    I thought I could do as an object that contained the four vectors as fields... like

    class relatedVectors implements {persistable

    Vector vectorOfAObjects;

    Vector vectorOfBObjects;

    Vector vectorOfCObjects;

    Vector vectorOfDObjects;

    relatedVectors (vector a, vector b, vector c, vector d) {}

    vectorOfAObjects = a;

    vectorOfBObjects = b;

    vectorOfCObjects = c;

    vectorOfDObjects = d;

    }

    }

    Finally, could I simply store different types of objects in the same vector, keeping the tack of indexing point?  For some reason any I have in my head a vector must be of the same type of object, but I don't think it's true...  In this case, I could do a vector and the index 1, 5, 9, etc... Once object type and 2, 6, 10 other etc...

    What idea is the best?

    Thank you!

    Vector objects are not the same.  Mix them as you like.

    Re have one or several store ID persisting, I actually don't think it's important.  I have found that if you update some of the vector, then commit, it does not take too long - I think that only the modified part commits again.  Replacement of the entire vehicle with a completely new would have more load.

    The design basically your data store around the needs of your application, rather than worrying about the consequences this will have on the device.

    BUT, a big concern.

    Remember that the objects that you save in the persistent store must remain the same to be accessible, if persist you an object with 2 integer values, then change this class so that there are three integer values, then your persistent object becomes illegible.  So try to future proof your persistent objects or design a path for them.

  • Force the persistent data that is not retained on App upgrade

    Hello

    I'm developing a new version of an existing application. The earlier version of the data stored in the persistent store of the device. When a user installs the new version of the application, they get a prompt saying something like "the persistent data is stored on the device. You want to keep these data? ».

    If the user answers Yes, the application will continue to use the old data which has been made persistent by the initial version of the application. This isn't what I need to happen.

    If the user answers no, the app will wipe the old dat and rebuild the store persistent with my current data. It is the course of action I want to request each time.

    Since there is no way to guarantee that each user will select 'NO' to this prompt, is it possible to configure the new version so that the data is not retained automatically?

    What other options are there for dealing with this situation?

    Thank you

    The f

    If the application can access the old data, why not just remove them when the application runs? In order to distinguish, again, you can design new data to contain a signature value that is not present in the old data. (For example, you can set your local record store to have record 1 always contain version store data, in a format that is not likely to be present in earlier formats.)

    An upgrade does not (usually) follow the same procedure with regard to the persistent data as a sequence of uninstall/install. However, there are occasional messages here on updates apparently lose persisted data that was supposed to be preserved. I did not understand everything exactly what are the causes which, but it has not considered the norm.

    P.S. If you use RecordStore instead of Persistable, custom classes are not relevant. The record store is deleted when all the MIDlets in the MIDlet suite, who created the store folder is uninstalled.

  • Journ.E touch - blank page while trying to access the virtual store

    After resetting the account and update the virtual store.
    I get a blank page while trying to access the online store.

    I went to update firmaware. always blank page.

    Hello

    Try to do a RESET on Journ.e
    Use a pointed object, like a pen, drag the left reset button first, then right and press in and hold the power button for about 2 seconds light up your DAY. E TOUCH.

Maybe you are looking for