Memento pattern for databas operation

Hi I'm a french student and I have a problem using the memento pattern
I have to undo or redo database transaction
but i, don't really understand how it works
I've got another problem with the undo menuitem
If someone know an interesting website or can explain me how i've got to do ...
Thanks

Memento is only part of the solution to this problem, you probably also need to use the command pattern to for each action/command, a chain of responsibility to mange your undo & redo stack and memento to hold the details.
http://www.burn-rubber.demon.co.uk/articles/memento.doc
http://directory.google.com/Top/Computers/Programming/Methodologies/Patterns_and_Anti-Patterns/

Similar Messages

  • Design pattern for Switching Operation Modes

    Hi,
    I'm trying to create an application that has three operational modes (training, exercise production).
    I desire to know what design pattern I should use to optimize it.
    The logic is simple, the user must log in and then must choose which mode it wants to use.
    According to the selected mode, the business will be different.
    thank you in advance for your help
    mhadjis

    Hi,
    You can defined operation modes under exception in SM63 where on particular date you can define which operation mode you want. But I don't think so you can schedule it. You have to define it manually for days you want particular exception.
    Thanks
    Sunny

  • Undo with Memento pattern vs swing undo

    I was tempted to add this question to the end of http://forum.java.sun.com/thread.jsp?forum=425&thread=440740&tstart=0&trange=15 but I've had a poor response in the past by adding a question to the end of an existing thread.
    I am working on a project with a rather poor implementation of undo where every Action has to extend an UndoableAction and a copy of the Action itself is stored on the undo queue. This gives me the following problems -
    1. Only Actions are undoable, not events such as scolling the display area.
    2. We can't make use of an other Action hierarchy other than one with an UndoableAction ancestor.
    I'm familiar with the idea of implementing undo/redo using the memento pattern.
    My plan is to modify this code so that Actions record current state in a Memento and store that memento in an undo queue instead. Events such as scrolling can then create and store mementos also.
    In my plans to implement this someone brought up the swing undo mechanism. I've had little success in finding how to implement swing undo on anything other than a simple text field. It also seems to be something that is based around the control rather than the model.
    We have various complex models to keep in synch plus several views onto those models. It seems simpler to me to generate mementos on Actions that effect the model (at least it's something I understand). When a memento gets undone all views listening to model changes will update anyway.
    Can anyone see an argument to use swing undo in preference? If so can anyone point me to a better example for implementing swing undo on anything other than text edit controls.
    Thanks
    Bob.

    I don't know much about the Swing undo but it seems unlikely that it would handle anything complex. It would only be able to keep track of changes in the graphical representation of you data, not the model behind it.

  • IPod Classic 80GB - "iTunes library cannot be saved you do not have enough access privileges for this operation" It says it has synced but it hasn't. Help please I am not very tech minded

    iPod Classic 80GB. Message reads ' iTunes library cannot be saved you do not have enough access privileges for this operation'.  It says it has synced but it hasn't. Please help, I am not very tech minded.

    See this article about troubleshooting the error message regarding access privelages.  It may be preventing your iTunes library from being able to save/retain music you have recently imported to it, which may explain why no new content is being added to your device.
    Trouble adding music to iTunes library or importing audio CD
    B-rock

  • Books about MVVM, architecture, design patterns for Windows Phone 8.1

    Hi,
    I'm looking for a book or books (or other resources) that explain how to develop an app with a proper architecture. I mean what each layer (bussines layer, data layer, network access) should do and how should it look like. I'm also looking for a book about
    MVVM.
    Right now I'm struggling with how to create a layer for network communication - how to separate classes for requests and responses, how to manage requests and create some queue of requests and also to provide some way to cancel them when they are no longer
    needed, how to work with servers that use some level of security (cookies, certificates etc.).
    Another thing is caching - how to design a short-term cache or a persistant cache (database), what technologies I can use etc.
    Last thing that I'm struggling with is also naming. How to name classes in those layers, e.g. to distinguish between classes mapping data from some ORM database, for mapping on JSON in network communication. etc.
    I hope you got the idea :)
    Thanks.

    Currently, I don't find a book about MVVM pattern for Windows Phone 8.1, but I think MSDN and some blogs have some useful samples and conceptions: http://msdn.microsoft.com/en-us/library/windows/apps/jj883732.aspx
    http://channel9.msdn.com/Series/Windows-Phone-8-1-Development-for-Absolute-Beginners
    And I think your question includes too much scopes, maybe you need to split it into some blocks and get help in the related forum
    Best Regards,
    Please remember to mark the replies as answers if they help

  • CVP Opsconsole: Patterns for RNA timeout on outbound SIP calls - Dialed Number (DN) text box does not take any input

    Hi there,
    I'm having problems modifying the 'Dialed Number (DN)' text box under 'Advanced Configuration->Patterns for RNA timeout on outbound SIP calls' of the SIP tab in the Cisco Unified Customer Voice Portal 8.5(1) opsconsole. In a nut shell, I need to change the RNA timeout but some reason when typing into the Dialed Number text box, the input is not taken. The reason I want to change this settings is because my ICM Rona is not working with CVP:
    https://supportforums.cisco.com/thread/2031366
    Thanks in advance for any help.
    Carlos A Trivino
    [email protected]

    Hello Dale,
    CVP doesn't allow you to exceed the RNA more than 60  Seconds. If you want to configure the timer for DN Patterns you should  do it via OPS console, It would update the sip.properties files in  correct way, the above way is incorrect.
    Regards,
    Senthil

  • What does this message mean, "The iPad cannot be synced.  You do not have enough access privileges for this operation?"

    I need some help syncing my iPad.  I get a message about not having enough privileges for this operation.  Any help would be appreciated.
    Thanks,

    It means you are using windows and the user agent stuff is messed up.
    Try looking at permissions on the drive iTunes library is on.

  • Problem in Wfetch client for Update operations

    Hi,
    I am using the Wfetch client for the 'Update' operation of an RFC Gateway consumption model . But it seems to always give this error : 'HTTP/1.0 400 Bad Request\r\n'
    I have passed only those fields that have been exposed in the GW Data model. Is there anything else that needs to be taken care of ?
    The read and query operations are executed successfully though.
    Thanks,
    Shubhada

    Hi Shubhada,
    Just recheck two things in Wfetch with below details.
    1. Check the path. It should be below formate for update operation
    Verb : Put
    Path:  /sap/opu/sdata/sap/<CONSUM_MODEL>/<data_model>Collection(value='  ',scheme_id='<DATA_MODEL>',scheme_agency_id='  ')?sap-client=< >&$format=xml
    Above formate you can take from Read operation which you already executed successfully.
    2. Check the XML formate on right handside in Wfetch it should be header & body with below details.
    Xml Formate:
    x-requested-with: XMLHttpRequest\r\n
    \r\n
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>\r\n
      <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">\r\n
          <content type="application/xml">\r\n
            <m:properties>\r\n
       <d:value> </d:value> \r\n
      <d:scheme_id> </d:scheme_id> \r\n
      <d:scheme_agency_id> </d:scheme_agency_id> \r\n
    Just copy from read operation Read operation which you already executed successfully. And update the fields what you required.
    </m:properties>\r\n
          </content>\r\n
    </entry>\r\n
    Hope you this will help above information.
    Thanks & Regards,
    Mahesh Devershetty

  • HT1386 I get an error message when I try to sync my iPod touch - "you do not have enough access privileges for this operation"

    I recently installed a new hard drive on my PC, downloaded iTunes, updated the software on my iPod touch and now I get this error message when I try to sync:  "you do not have enough access privileges for this operation."  It never did this before, whether it's the upgrade in software or something in iTunes, but it's very frustrating, since I'd like to add more things to my iPod.

    See:
    iPhone - not enough access privileges: Apple Support Communities

  • How do i resolve my itunes from saying " The itunes application could not be opened. You do not have enough access privileges for this operation."

    Everytime i click to go to my itunes, the message "The Itunes application could not be opened. You do not have enough access privileges for this operation." pops up. I have tried my best to fix it by adding another account to my computer and setting that one as the administator and mine as the regular user. When i did that the itunes worked on both, but when i changed my account back to administator and the other account to the regular user my account didnt work but the other one did. I also tried to uninstall and reinstall itunes. This message popped up when i tried to update the itunes to the newest one. And still it wont go away. Can someone help me please. Thanks!

    Are you logged in with administrative rights? Did you check your security software settings? Troubleshooting security software issues

  • Single concurrent program for multiple operating units

    HI
    I am working on XML/BI publisher to generate AR invoice reports.
    We have single rdf report using which rtf templates are generated.
    There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID
    Eg: ORG_ID's = 11, 12, 13, 14..........etc
    Eg: Responsibility = xx, yy, zz...........etc
    I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
    How can i register one concurrent program for multiple operating units.
    Thanks!
    Edited by: 994628 on Mar 18, 2013 4:39 PM
    Edited by: 994628 on Mar 18, 2013 4:42 PM

    >
    There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID
    Eg: ORG_ID's = 11, 12, 13, 14..........etc
    Eg: Responsibility = xx, yy, zz...........etc
    I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
    >
    interesting case for 10 OE set 10 template
    what is purpose? for each OE different requirements for layout?
    BTW
    if each Responsibility associated with one org_id then
    - you can get current org_id when you run concurrent program
    - create main template (will be #11) with condition like
    <?choose:?>
    <?when: ORG_ID=11?>
    <?import:xdo://FND.XX11_SUB.en.00/?>
    <?call:TEMPLATE11?>
    <?end when?>
    <?when: ORG_ID=12?>
    <?import:xdo://FND.XX12_SUB.en.00/?>
    <?call:TEMPLATE12?>
    <?end when?>
    <?otherwise:?>
    <?import:xdo://FND.XX21_SUB.en.00/?>
    <?call:TEMPLATE21?>
    <?end otherwise?>
    <?end choose?>so based on org_id will be import of needed subtemplate
    - re-register your "10 rtf templates" as subtemplates
    another way is substitution of template for concurrent then it running
    in before_report trigger set needed template
    l_conc_request_id := fnd_global.conc_request_id;
        if ORG_ID = 11 then
          UPDATE fnd_conc_pp_actions t
             SET t.argument2 = 'XX11'
           where t.concurrent_request_id = l_conc_request_id
             and t.action_type = 6;
      if ORG_ID = 21 then
          UPDATE fnd_conc_pp_actions t
             SET t.argument2 = 'XX21'
           where t.concurrent_request_id = l_conc_request_id
             and t.action_type = 6;

  • I can't synchronize my iPod's with my iTunes software (Windows Vista Home Premium) due to problems with the access authorization / rights for this operation

    Hi there,
    I'd like to ask you something:
    I'm trying to synchronize all my iPod's (I have as many as 4 iPods: 2 iPod touch a 8 GB each and 2 iPod classic a 160 GB each) with my iTunes software (Version 11.3.1 which is installed on a Windows PC (Windows Vista Home Premium)). Unfortunately, the iTunes software refuses to run the command "synchronize with the iPod connected" regarding each and every iPod I have. iTunes just declares:
    Synchronizing is impossible because I wouldn't hold the access authorization / rights for this operation.
    I uploaded the songs at issue to my iTunes folder from CD's (all songs are in AAC format now).
    What is this access authorization, why was something like that invented and what can I do to get it?
    How do I have to proceed in detail?
    What would it cost?
    I am brand new here and have never ever made a post in any support community anywhere in the world in my life. Well, and I am not excessively knowledgeable about the particular computer or mac language but I know the very basics or can find out about them.
    Anyways - can you help me please?
    If you can't help me, who can do so?
    It would be nice if you could answer me as soon as possible!
    Thank you guys
    Prying Pedro

    Yes, others have experienced the problem, a simple search of the forums would have revealed that and the simple solution.
    Termporarily disable any security software on the computer.

  • I have a new PC and I am getting the message "The iTunes Library File cannot be saved.  You do not have enough access privileges for this operation."  I am the only one using this PC and I have Windows 7 Pro and have an administrator account.  Help

    Can anyone help me with this problem.  ITunes message," The iTunes library file cannot be saved.  You do not have enough access privileges for this operation."   I have administrator account and transferred files from old PC.  I downloaded new iTunes program on new PC.  I synced my iPhone to new PC, no problem.  I deleted old account after indicating shared files to new admin account.  Can anyone help?

    A belated reply, as the problems itunes has have discouraged me from using it much. If you uncheck the "read only" box, it doesn't stay that way! Next time you use it, the box comes up checked.
    I'm still having that problem, even when I open iTunes as administrator.
    I've yet to see the answer to this problem. I use itunes mostly to download audiobooks, and I'm ready to download more, and want to save them!

  • I keep getting dialog box saying " The itunes Library file cannot be saved. You do not have enough access privileges for this operation"  I am the only user on this computer and only one library! how do i change access privileges please?

    hi I keep getting the dialog box " The iTunes Library file cannot be saved. You do not have enough access privileges for this operation"
    How do i  amend this  as i only have one account and one library. I cannot save new work or delete duplicate files

    A belated reply, as the problems itunes has have discouraged me from using it much. If you uncheck the "read only" box, it doesn't stay that way! Next time you use it, the box comes up checked.
    I'm still having that problem, even when I open iTunes as administrator.
    I've yet to see the answer to this problem. I use itunes mostly to download audiobooks, and I'm ready to download more, and want to save them!

  • How to enter a valid Edit Pattern for Time?

    I'm tring to enter a pattern for the Edit Pattern and it kept giving me the invalid pattern error.
    Here is what I have for the Display Pattern: h:MM A
    And for Edit Pattern: h|hh|h:MM|h A|hh A|h:MM A|hh:MM A
    The textbox is set to Type: Date/Time Field.
    Help is appreciated.

    [email protected] wrote:
    > I'm tring to enter a pattern for the Edit Pattern and it kept giving me the invalid pattern error.
    >
    > Here is what I have for the Display Pattern: h:MM A
    > And for Edit Pattern: h|hh|h:MM|h A|hh A|h:MM A|hh:MM A
    >
    > The textbox is set to Type: Date/Time Field.
    >
    > Help is appreciated.
    The last two are the only valid edit patterns. All of the others are invalid. Here are the reasons:
    - You have to specify the minutes
    - If not using military hours (H, HH) you have to specify AM or PM
    The only way to support the other patterns you are trying to use is to make it a text field and put
    custom javascript validation on it.
    Justin Klei
    Cardinal Solutions Group
    www.cardinalsolutions.com

Maybe you are looking for

  • Organization unit ID is different in Dev and Quality Systems

    Hi Experts, We have downloaded the Organizational Structure from ECC in the Dev System, Sales organizations, Sales offices and sales groups were created with number range Assigned to Current Active Plan version. but the number for the Sales orgs star

  • IMac Refuses to Read Brand New CDs

    I've been having intermittent problems with the Mac reading certain CDs, but now I'm getting worried. I have five brand new CDs that I got for Christmas; I just took off the shrink-wrap. When I insert it, it makes some noises, and after a couple seco

  • My iPhone freezes while typing

    Hello My iphone 6 plus freezes while typing. doesn't matter if I'm typing a text message or a URL the problem is everywhere. My collegue at my work has the same problem. I can still continue to type when it freezes, and when it unfreeze the letters a

  • Strange output from format command

    Hi, We have a Sun V480 running Solaris 8. We have installed 2 SG-XPCI2FC-QF2 fibercards. They are connected to an EVA3000 system. SFS newest version are also installed. Have configured the cards with the cfgadm command. But when i run a format comman

  • Spotlight cannot find file

    Hi All, I am very frustrated because Spotlight is incapable of finding a file on my Mac. The file is named: "Maya.env" And is located here:  Users/username/Library/Preferences/Autodesk/maya/2011-x64 Can anyone tell me why Spotlight is not able to fin