Source Code Cross Referenced for AutoStartMechanism.java in  » Database-ORM » JPOX » org » jpox » store » 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 » Database ORM » JPOX » org.jpox.store 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************
002:        Copyright (c) 2003 Andy Jefferson and others. All rights reserved. 
003:        Licensed under the Apache License, Version 2.0 (the "License");
004:        you may not use this file except in compliance with the License.
005:        You may obtain a copy of the License at
006:
007:            http://www.apache.org/licenses/LICENSE-2.0
008:
009:        Unless required by applicable law or agreed to in writing, software
010:        distributed under the License is distributed on an "AS IS" BASIS,
011:        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012:        See the License for the specific language governing permissions and
013:        limitations under the License. 
014:
015:
016:        Contributors:
017:        2004 Andy Jefferson - changed to use StoreData instead of AutoStartData
018:        2004 Erik Bengtson - added open()/close()/isOpen()
019:            ...
020:         **********************************************************************/package org.jpox.store;
021:
022:        import java.util.Collection;
023:
024:        import org.jpox.ClassLoaderResolver;
025:        import org.jpox.store.exceptions.DatastoreInitialisationException;
026:
027:        /**
028:         * Interface defining an Auto-Start Mechanism.
029:         * An Auto-Start Mechanism is a means of auto-populating the classes supported by a StoreManager.
030:         * <P>
031:         * If the user changes their persistence definition a problem can occur when starting up JPOX. 
032:         * JPOX loads up its existing data from a repository (e.g the table "JPOX_TABLES" for SchemaTableAutoStarter) and finds that a table/class 
033:         * required by the repository data no longer exists. There are 3 options for what JPOX will do in this situation. 
034:         * <ul>
035:         * <li>Checked will mean that JPOX will throw an exception and the user will be expected to manually fix their datastore mismatch 
036:         *     (perhaps by removing the existing tables).</li>
037:         * <li>Quiet (the default) will simply remove the entry from the repository and continue without exception.</li>
038:         * <li>Ignored will simply continue without doing anything.</li>
039:         * </ul>
040:         * </P>
041:         * 
042:         * Implementations must have a public constructor taking the arguments {@link StoreManager} and {@link ClassLoaderResolver}
043:         * 
044:         * @version $Revision: 1.6 $
045:         **/
046:        public interface AutoStartMechanism {
047:            /** mechanism is disabled if None **/
048:            public static final String NONE = "None";
049:
050:            /** mechanism is in Quiet mode **/
051:            public static final String MODE_QUIET = "Quiet";
052:
053:            /** mechanism is in Checked mode **/
054:            public static final String MODE_CHECKED = "Checked";
055:
056:            /** mechanism is in Ignored mode **/
057:            public static final String MODE_IGNORED = "Ignored";
058:
059:            /**
060:             * Accessor for the mode of operation.
061:             * @return The mode of operation
062:             **/
063:            String getMode();
064:
065:            /**
066:             * Mutator for the mode of operation.
067:             * @param mode The mode of operation
068:             **/
069:            void setMode(String mode);
070:
071:            /**
072:             * Accessor for the data for the classes that are currently auto started.
073:             * @return Collection of {@link StoreData} elements
074:             * @throws DatastoreInitialisationException
075:             **/
076:            Collection getAllClassData()
077:                    throws DatastoreInitialisationException;
078:
079:            /**
080:             * Starts a transaction for writing (add/delete) classes to the auto start mechanism.
081:             */
082:            void open();
083:
084:            /**
085:             * Closes a transaction for writing (add/delete) classes to the auto start mechanism.
086:             */
087:            void close();
088:
089:            /**
090:             * Whether it's open for writing (add/delete) classes to the auto start mechanism.
091:             * @return whether this is open for writing 
092:             */
093:            public boolean isOpen();
094:
095:            /**
096:             * Method to add a class/field (with its data) to the currently-supported list.
097:             * @param data The data for the class.
098:             **/
099:            void addClass(StoreData data);
100:
101:            /**
102:             * Method to delete a class/field that is currently listed as supported in
103:             * the internal storage.
104:             * It does not drop the schema of the DatastoreClass 
105:             * neither the contents of it. It only removes the class from the 
106:             * AutoStart mechanism.
107:             * TODO Rename this method to allow for deleting fields
108:             * @param name The name of the class/field
109:             **/
110:            void deleteClass(String name);
111:
112:            /**
113:             * Method to delete all classes that are currently listed as supported in
114:             * the internal storage. It does not drop the schema of the DatastoreClass 
115:             * neither the contents of it. It only removes the classes from the 
116:             * AutoStart mechanism.
117:             **/
118:            void deleteAllClasses();
119:
120:            /**
121:             * Utility to return a description of the storage for this mechanism.
122:             * @return The storage description.
123:             **/
124:            String getStorageDescription();
125:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.