KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > store > MapStore


1 /*
2  * Copyright 2002 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: MapStore.java,v 1.3 2004/01/18 03:01:06 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13 import com.triactive.jdo.StateManager;
14 import java.util.Map JavaDoc;
15
16
17 /**
18  * Implements the backing store for a Map field.
19  * <p>
20  * Different implementations of MapStore employ different techniques for
21  * modeling the Java concept of a Map in a relational data store.
22  * Individual instances of MapStore are responsible for managing the storage
23  * for some Java class's Map field across all instances of that class.
24  *
25  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
26  * @version $Revision: 1.3 $
27  */

28
29 public interface MapStore
30 {
31     StoreManager getStoreManager();
32
33     Class JavaDoc getKeyType();
34
35     Class JavaDoc getValueType();
36
37     boolean allowsNullValues();
38
39     Map JavaDoc load(StateManager sm);
40
41     int size(StateManager sm);
42
43     boolean isEmpty(StateManager sm);
44
45     boolean containsKey(StateManager sm, Object JavaDoc key);
46
47     boolean containsValue(StateManager sm, Object JavaDoc value);
48
49     boolean containsEntry(StateManager sm, Object JavaDoc key, Object JavaDoc value);
50
51     Object JavaDoc get(StateManager sm, Object JavaDoc key);
52
53     Object JavaDoc put(StateManager sm, Object JavaDoc key, Object JavaDoc value);
54
55     void putAll(StateManager sm, Map JavaDoc m);
56
57     Object JavaDoc remove(StateManager sm, Object JavaDoc key);
58
59     boolean removeEntry(StateManager sm, Object JavaDoc key, Object JavaDoc value);
60
61     void clear(StateManager sm);
62
63     Queryable keySetQuery(StateManager sm);
64
65     Queryable valuesQuery(StateManager sm);
66
67     Queryable entrySetQuery(StateManager sm);
68 }
69
Popular Tags