Source Code Cross Referenced for JODBQueryList.java in  » Database-DBMS » JODB » com » mobixess » jodb » core » transaction » 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 DBMS » JODB » com.mobixess.jodb.core.transaction 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:        Copyright (C) 2007  Mobixess Inc. http://www.java-objects-database.com
003:
004:        This file is part of the JODB (Java Objects Database) open source project.
005:
006:        JODB is free software; you can redistribute it and/or modify it under
007:        the terms of version 2 of the GNU General Public License as published
008:        by the Free Software Foundation.
009:
010:        JODB is distributed in the hope that it will be useful, but WITHOUT ANY
011:        WARRANTY; without even the implied warranty of MERCHANTABILITY or
012:        FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
013:        for more details.
014:
015:        You should have received a copy of the GNU General Public License along
016:        with this program; if not, write to the Free Software Foundation, Inc.,
017:        59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
018:         */
019:        package com.mobixess.jodb.core.transaction;
020:
021:        import java.io.IOException;
022:        import java.util.Collection;
023:        import java.util.Iterator;
024:        import java.util.List;
025:        import java.util.ListIterator;
026:
027:        import com.mobixess.jodb.soda.api.ObjectSet;
028:
029:        public class JODBQueryList implements  ObjectSet, Iterable {
030:            private long[] _offsets;
031:            private JODBSession _session;
032:            private int _iteratorIndex;
033:
034:            /**
035:             * @param offsets
036:             */
037:            public JODBQueryList(long[] offsets, JODBSession session) {
038:                super ();
039:                _offsets = offsets;
040:                _session = session;
041:            }
042:
043:            public boolean add(Object o) {
044:                throw new UnsupportedOperationException();
045:            }
046:
047:            public void add(int index, Object element) {
048:                throw new UnsupportedOperationException();
049:            }
050:
051:            public boolean addAll(Collection c) {
052:
053:                throw new UnsupportedOperationException();
054:                //return false;
055:            }
056:
057:            public boolean addAll(int index, Collection c) {
058:
059:                throw new UnsupportedOperationException();
060:                //return false;
061:            }
062:
063:            public void clear() {
064:
065:                throw new UnsupportedOperationException();
066:                //
067:            }
068:
069:            public boolean contains(Object o) {
070:
071:                throw new UnsupportedOperationException();
072:                //return false;
073:            }
074:
075:            public boolean containsAll(Collection c) {
076:
077:                throw new UnsupportedOperationException();
078:                //return false;
079:            }
080:
081:            public Object get(int index) {
082:                long offset = _offsets[index];
083:                try {
084:                    return _session.getObjectForOffset(offset);
085:                } catch (IOException e) {
086:                    throw new RuntimeException(e);
087:                }
088:            }
089:
090:            public int indexOf(Object o) {
091:                for (int i = 0; i < _offsets.length; i++) {
092:                    Object next = get(i);
093:                    if (next == null && o != null) {
094:                        continue;
095:                    }
096:                    if (o == next || o.equals(next)) {
097:                        return i;
098:                    }
099:                }
100:                return -1;
101:            }
102:
103:            public boolean isEmpty() {
104:                return _offsets == null || _offsets.length == 0;
105:            }
106:
107:            public Iterator iterator() {
108:                return new JODBQueryList(_offsets, _session);
109:            }
110:
111:            public int lastIndexOf(Object o) {
112:                for (int i = _offsets.length - 1; i >= 0; i--) {
113:                    Object next = get(i);
114:                    if (o == next || o.equals(next)) {
115:                        return i;
116:                    }
117:                }
118:                return -1;
119:            }
120:
121:            public ListIterator listIterator() {
122:
123:                throw new UnsupportedOperationException();
124:                //return null;
125:            }
126:
127:            public ListIterator listIterator(int index) {
128:
129:                throw new UnsupportedOperationException();
130:                //return null;
131:            }
132:
133:            public boolean remove(Object o) {
134:
135:                throw new UnsupportedOperationException();
136:                //return false;
137:            }
138:
139:            public Object remove(int index) {
140:
141:                throw new UnsupportedOperationException();
142:                //return null;
143:            }
144:
145:            public boolean removeAll(Collection c) {
146:
147:                throw new UnsupportedOperationException();
148:                //return false;
149:            }
150:
151:            public boolean retainAll(Collection c) {
152:
153:                throw new UnsupportedOperationException();
154:                //return false;
155:            }
156:
157:            public Object set(int index, Object element) {
158:
159:                throw new UnsupportedOperationException();
160:                //return null;
161:            }
162:
163:            public int size() {
164:                return _offsets.length;
165:            }
166:
167:            public List subList(int fromIndex, int toIndex) {
168:
169:                throw new UnsupportedOperationException();
170:                //return null;
171:            }
172:
173:            public Object[] toArray() {
174:
175:                throw new UnsupportedOperationException();
176:                //return null;
177:            }
178:
179:            @SuppressWarnings("unchecked")
180:            public Object[] toArray(Object[] a) {
181:
182:                throw new UnsupportedOperationException();
183:                //return null;
184:            }
185:
186:            public boolean hasNext() {
187:                return _iteratorIndex < _offsets.length;
188:            }
189:
190:            public Object next() {
191:                return get(_iteratorIndex++);
192:            }
193:
194:            public void reset() {
195:                _iteratorIndex = 0;
196:            }
197:
198:            public void remove() {
199:                throw new UnsupportedOperationException();
200:            }
201:
202:            public long[] getAllObjectIds() {
203:                long[] result = new long[_offsets.length];
204:                System.arraycopy(_offsets, 0, result, 0, _offsets.length);
205:                return result;
206:            }
207:
208:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.