001: /* Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com
002:
003: This file is part of the db4o open source object database.
004:
005: db4o is free software; you can redistribute it and/or modify it under
006: the terms of version 2 of the GNU General Public License as published
007: by the Free Software Foundation and as clarified by db4objects' GPL
008: interpretation policy, available at
009: http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
010: Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
011: Suite 350, San Mateo, CA 94403, USA.
012:
013: db4o is distributed in the hope that it will be useful, but WITHOUT ANY
014: WARRANTY; without even the implied warranty of MERCHANTABILITY or
015: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
016: for more details.
017:
018: You should have received a copy of the GNU General Public License along
019: with this program; if not, write to the Free Software Foundation, Inc.,
020: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
021: package com.db4o.internal;
022:
023: import com.db4o.*;
024: import com.db4o.config.*;
025: import com.db4o.ext.*;
026: import com.db4o.foundation.*;
027: import com.db4o.query.*;
028: import com.db4o.types.*;
029:
030: /**
031: * @exclude
032: */
033: public abstract class ExternalObjectContainer extends
034: ObjectContainerBase implements InternalObjectContainer {
035:
036: public ExternalObjectContainer(Configuration config,
037: ObjectContainerBase parentContainer) {
038: super (config, parentContainer);
039: }
040:
041: public final void activate(Object obj, int depth)
042: throws DatabaseClosedException {
043: activate(null, obj, depth);
044: }
045:
046: public final void bind(Object obj, long id)
047: throws ArgumentNullException, IllegalArgumentException {
048: bind(null, obj, id);
049: }
050:
051: public Db4oCollections collections() {
052: return collections(null);
053: }
054:
055: public final void commit() throws DatabaseReadOnlyException,
056: DatabaseClosedException {
057: commit(null);
058: }
059:
060: public final void deactivate(Object obj, int depth)
061: throws DatabaseClosedException {
062: deactivate(null, obj, depth);
063: }
064:
065: public final void delete(Object a_object) {
066: delete(null, a_object);
067: }
068:
069: public Object descend(Object obj, String[] path) {
070: return descend(null, obj, path);
071: }
072:
073: public ExtObjectContainer ext() {
074: return this ;
075: }
076:
077: public final ObjectSet get(Object template)
078: throws DatabaseClosedException {
079: return get(null, template);
080: }
081:
082: public final Object getByID(long id)
083: throws DatabaseClosedException, InvalidIDException {
084: return getByID(null, id);
085: }
086:
087: public final Object getByUUID(Db4oUUID uuid) {
088: return getByUUID(null, uuid);
089: }
090:
091: public final long getID(Object obj) {
092: return getID(null, obj);
093: }
094:
095: public final ObjectInfo getObjectInfo(Object obj) {
096: return getObjectInfo(null, obj);
097: }
098:
099: public boolean isActive(Object obj) {
100: return isActive(null, obj);
101: }
102:
103: public boolean isCached(long id) {
104: return isCached(null, id);
105: }
106:
107: public boolean isStored(Object obj) {
108: return isStored(null, obj);
109: }
110:
111: public final Object peekPersisted(Object obj, int depth,
112: boolean committed) throws DatabaseClosedException {
113: return peekPersisted(null, obj, depth, committed);
114: }
115:
116: public final void purge(Object obj) {
117: purge(null, obj);
118: }
119:
120: public Query query() {
121: return query((Transaction) null);
122: }
123:
124: public final ObjectSet query(Class clazz) {
125: return get(clazz);
126: }
127:
128: public final ObjectSet query(Predicate predicate) {
129: return query(predicate, (QueryComparator) null);
130: }
131:
132: public final ObjectSet query(Predicate predicate,
133: QueryComparator comparator) {
134: return query(null, predicate, comparator);
135: }
136:
137: public final void refresh(Object obj, int depth) {
138: refresh(null, obj, depth);
139: }
140:
141: public final void rollback() {
142: rollback(null);
143: }
144:
145: public final void set(Object obj) throws DatabaseClosedException,
146: DatabaseReadOnlyException {
147: set(obj, Const4.UNSPECIFIED);
148: }
149:
150: public final void set(Object obj, int depth)
151: throws DatabaseClosedException, DatabaseReadOnlyException {
152: set(null, obj, depth);
153: }
154:
155: public final StoredClass storedClass(Object clazz) {
156: return storedClass(null, clazz);
157: }
158:
159: public StoredClass[] storedClasses() {
160: return storedClasses(null);
161: }
162:
163: public abstract void backup(String path) throws Db4oIOException,
164: DatabaseClosedException, NotSupportedException;
165:
166: public abstract Db4oDatabase identity();
167:
168: }
|