01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdo.sco;
12:
13: import com.versant.core.jdo.VersantPersistenceManagerImp;
14: import com.versant.core.common.CollectionDiff;
15: import com.versant.core.common.PersistenceContext;
16:
17: import java.util.Map;
18:
19: /**
20: * SCO's that are maps must implement this to have efficient database access.
21: * <p/>
22: * SCO maps that do not implement this will be treated like replaced maps on
23: * commit or flush. All the old values will be deleted and all the current
24: * values insert.
25: */
26: public interface VersantSCOMap extends VersantSimpleSCO, Map {
27:
28: /**
29: * Put references to all the keys and values into mapData. If the keys
30: * and/or values are PC instances then the instances themselves or their
31: * OIDs may be stored in mapData.
32: */
33: public MapData fillMapData(MapData mapData);
34:
35: /**
36: * Called on commit or flush to get changes to this map.
37: */
38: public CollectionDiff getMapDiff(PersistenceContext pm);
39:
40: }
|