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: import com.versant.core.jdo.VersantPersistenceManagerImp;
17:
18: /**
19: * SCO's that are collections must implement this to have efficient database access.
20: * <p/>
21: * SCO collections that do not implement this will be treated like replaced
22: * collections on commit or flush. All the old values will be deleted and all the
23: * current values insert.
24: */
25: public interface VersantSCOCollection extends VersantSimpleSCO {
26:
27: /**
28: * Called on commit or flush to get changes to this collection.
29: */
30: CollectionDiff getCollectionDiff(PersistenceContext pm);
31:
32: /**
33: * Put references to all the values into collectionData. If the
34: * values are PC instances then the instances themselves or their
35: * OIDs may be stored in collectionData.
36: */
37: CollectionData fillCollectionData(CollectionData collectionData);
38:
39: }
|