01: /*
02: * Copyright 2002 (C) TJDO.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the TJDO License version 1.0.
06: * See the terms of the TJDO License in the documentation provided with this software.
07: *
08: * $Id: MapStore.java,v 1.3 2004/01/18 03:01:06 jackknifebarber Exp $
09: */
10:
11: package com.triactive.jdo.store;
12:
13: import com.triactive.jdo.StateManager;
14: import java.util.Map;
15:
16: /**
17: * Implements the backing store for a Map field.
18: * <p>
19: * Different implementations of MapStore employ different techniques for
20: * modeling the Java concept of a Map in a relational data store.
21: * Individual instances of MapStore are responsible for managing the storage
22: * for some Java class's Map field across all instances of that class.
23: *
24: * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
25: * @version $Revision: 1.3 $
26: */
27:
28: public interface MapStore {
29: StoreManager getStoreManager();
30:
31: Class getKeyType();
32:
33: Class getValueType();
34:
35: boolean allowsNullValues();
36:
37: Map load(StateManager sm);
38:
39: int size(StateManager sm);
40:
41: boolean isEmpty(StateManager sm);
42:
43: boolean containsKey(StateManager sm, Object key);
44:
45: boolean containsValue(StateManager sm, Object value);
46:
47: boolean containsEntry(StateManager sm, Object key, Object value);
48:
49: Object get(StateManager sm, Object key);
50:
51: Object put(StateManager sm, Object key, Object value);
52:
53: void putAll(StateManager sm, Map m);
54:
55: Object remove(StateManager sm, Object key);
56:
57: boolean removeEntry(StateManager sm, Object key, Object value);
58:
59: void clear(StateManager sm);
60:
61: Queryable keySetQuery(StateManager sm);
62:
63: Queryable valuesQuery(StateManager sm);
64:
65: Queryable entrySetQuery(StateManager sm);
66: }
|