Java Doc for IDatastoreChange.java in  » ERP-CRM-Financial » jmoney » net » sf » jmoney » model2 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » jmoney » net.sf.jmoney.model2 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.sf.jmoney.model2.IDatastoreChange

IDatastoreChange
public interface IDatastoreChange (Code)
Interface to objects that control a change to the datastore. All changes to the datastore must be done thru a datastore change object.

There are a number of reasons why changes should be made thru an IDatastoreChange object, and why plug-ins should not simply call 'setter' methods, 'add' methods, and 'remove' methods.

  • If the underlying datastore supports transactions (using 'transaction' with the meaning usually assumed in the database community) then each IDatastoreChange object will correspond to a single transaction in the datastore.
  • By using IDatastoreChange objects, multiple changes may be consolidated into more efficient updates. For example, if multiple property values are changed by calling the setter methods then these can all result in a single 'update' statement being sent to the database.
  • IDatastoreChange objects manage locks. For example, consider a user who opens two views that both allow the user to change the properties of the same account. Neither view will see changes from the other view until those changes are committed. This can cause confusion and cause changes to be lost, if the user switched back and forth between the two views. By using IDatastoreChange objects, the second view will not be able to obtain an IDatastoreChange object and must act appropriately (for example, by disabling the property value fields).
  • 'Undo' and 'Redo' support. The 'Undo'/'Redo' feature keeps a list of the IDatastoreChange objects that performed changes to the datastore. Every IDatastoreChange object must implement the undo and redo methods.




Method Summary
 voidcommit()
     Commits the changes to the datastore.
 StringgetDescription()
     The description of the change.
 voidredo()
     Redo the change and commit the change so that other views see the change again.
 voidrollback()
     Releases the locks.

Either commit or rollback must be called after the changes have been set in this object.

 voidundo()
     Undo the change and commit the 'undo' so that other views see that the change has been 'undone'.



Method Detail
commit
void commit()(Code)
Commits the changes to the datastore. Other views will see the changes, when this method is called.

This method also adds this object to the 'undo'/'redo' list.

Either commit or rollback must be called after the changes have been set in this object. If not, locks will not be released.




getDescription
String getDescription()(Code)
The description of the change. This stringis shown to the user by the 'undo' and 'redo'feature. This description must be localized.



redo
void redo()(Code)
Redo the change and commit the change so that other views see the change again.

In most implementations this method will have an identical implementation to the commit method.




rollback
void rollback()(Code)
Releases the locks.

Either commit or rollback must be called after the changes have been set in this object. If not, locks will not be released.




undo
void undo()(Code)
Undo the change and commit the 'undo' so that other views see that the change has been 'undone'.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.