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.util;
12:
13: import com.versant.core.common.OID;
14: import com.versant.core.metadata.ClassMetaData;
15: import com.versant.core.metadata.ModelMetaData;
16:
17: import java.io.ObjectInput;
18: import java.io.IOException;
19:
20: /**
21: * ObjectInput with special support for reading in OIDs. This ensures that
22: * there is only one instance for each NewObjectOID read for a flattened
23: * graph.
24: */
25: public interface OIDObjectInput extends ObjectInput {
26:
27: /**
28: * Read an OID.
29: */
30: public OID readOID() throws IOException, ClassNotFoundException;
31:
32: /**
33: * Read the OID for cmd. If it is a NewObjectOID that has been previously
34: * read then return the previously read instance.
35: */
36: public OID readOID(ClassMetaData cmd) throws IOException,
37: ClassNotFoundException;
38:
39: /**
40: * Get the meta data associated with this read operation.
41: */
42: public ModelMetaData getModelMetaData();
43: }
|