Source Code Cross Referenced for PersistenceStore.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » components » persistence » 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 » Portal » jetspeed 2.1.3 » org.apache.jetspeed.components.persistence.store 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.jetspeed.components.persistence.store;
018:
019:        import java.util.Collection;
020:        import java.util.Iterator;
021:
022:        import org.apache.jetspeed.components.persistence.store.LockFailedException;
023:
024:        /**
025:         * <p>
026:         * PersistenceStore
027:         * </p>
028:         * 
029:         * <p>
030:         * The persistence store allows access to the persistent
031:         * storage mechanism within the application.
032:         * <br/>
033:         * PersistenceStore instances <strong>ARE NOT</strong> 
034:         * thread safe.  The best practices approach for using
035:         * the persistence store is to use 
036:         * <code>PersistenceStoreContainer.getStoreForThread()</code>
037:         * any time the store is to be accessed.
038:         *  
039:         * </p>
040:         * 
041:         * @
042:         * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
043:         * @version $ $
044:         *
045:         */
046:        public interface PersistenceStore {
047:            /** 
048:             * No lock at all aka the object is read only changes WILL NOT be persisted
049:             * at checkPoints or commits.
050:             */
051:            int LOCK_NO_LOCK = 0;
052:
053:            /** 
054:             * changes to the object will be written to the database, in this case the lock 
055:             * will be automatically upgraded to the write lock on transaction
056:             */
057:            int LOCK_READ = 1;
058:
059:            /**
060:             * changes to the object will be written to the database. 
061:             */
062:            int LOCK_PESSIMISTIC = 2;
063:
064:            void addEventListener(PersistenceStoreEventListener listener);
065:
066:            void close();
067:
068:            void deletePersistent(Object obj) throws LockFailedException;
069:
070:            void deleteAll(Object query) throws LockFailedException;
071:
072:            Collection getCollectionByQuery(Object query);
073:
074:            Collection getCollectionByQuery(Object query, int lockLevel);
075:
076:            Object getObjectByQuery(Object query);
077:
078:            Object getObjectByQuery(Object query, int lockLevel);
079:
080:            Object getObjectByIdentity(Object object)
081:                    throws LockFailedException;
082:
083:            Object getObjectByIdentity(Object object, int lockLevel)
084:                    throws LockFailedException;
085:
086:            int getCount(Object query);
087:
088:            Iterator getIteratorByQuery(Object query);
089:
090:            Iterator getIteratorByQuery(Object query, int lockLevel);
091:
092:            /**
093:             * 
094:             * <p>
095:             * isClosed
096:             * </p>
097:             * <p>
098:             * indicates whether or not this <code>PersistenceStore</code>
099:             * instance has been closed.  A closed store will generally
100:             * throw exceptions when any operation is performed upon it.
101:             * </p>
102:             * 
103:             * @return
104:             *
105:             */
106:            boolean isClosed();
107:
108:            /**
109:             * 
110:             * <p>
111:             * getTransaction
112:             * </p>
113:             * <p>
114:             * Returns the current <code>Transaction</code> for thsis
115:             * <code>PersistenceStore</code> instance.  The transaction
116:             * will always be the same for the lifetime of the
117:             * <code>PersistenceStore</code> instance. 
118:             * </p>
119:             * 
120:             * @return <code>Transaction</code> for this 
121:             * <code>PersistenceStore</code>
122:             *
123:             */
124:            Transaction getTransaction();
125:
126:            void invalidate(Object obj) throws LockFailedException;
127:
128:            void invalidateAll() throws LockFailedException;
129:
130:            void invalidateExtent(Class clazz) throws LockFailedException;
131:
132:            void invalidateByQuery(Object query) throws LockFailedException;
133:
134:            void lockForWrite(Object obj) throws LockFailedException;
135:
136:            void makePersistent(Object obj) throws LockFailedException;
137:
138:            Filter newFilter();
139:
140:            Object newQuery(Class clazz, Filter filter);
141:
142:            Collection getExtent(Class clazz);
143:
144:            Collection getExtent(Class clazz, int lockLevel);
145:
146:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.