KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > common > DummyStateContainer


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.common;
13
14 import com.versant.core.server.StateContainer;
15 import com.versant.core.metadata.FetchGroup;
16 import com.versant.core.common.OID;
17 import com.versant.core.common.State;
18
19 /**
20  * Dummy implementation of StateContainer that does not contain anything
21  * and discards anything added to it.
22  */

23 public class DummyStateContainer implements StateContainer {
24
25     public static final DummyStateContainer INSTANCE = new DummyStateContainer();
26
27     public void visited(OID oid) {
28     }
29
30     public boolean isStateRequired(OID oid, FetchGroup fetchGroup) {
31         return false;
32     }
33
34     public void addState(OID oid, State state) {
35         throw BindingSupportImpl.getInstance().notImplemented("");
36     }
37
38     public boolean containsKey(Object JavaDoc key) {
39         return false;
40     }
41
42     public State add(OID key, State value) {
43         return null;
44     }
45
46     public State get(Object JavaDoc key) {
47         return null;
48     }
49 }
50
Popular Tags