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.common;
12:
13: import com.versant.core.metadata.ClassMetaData;
14:
15: import java.io.Serializable;
16:
17: /**
18: * Factory for OID and State instances. These must be Serializable so they
19: * can be sent with the meta data to remote clients.
20: */
21: public interface StateAndOIDFactory extends Serializable {
22:
23: /**
24: * Create a new empty OID for cmd.
25: *
26: * @param resolved Is this a resolved OID?
27: * @see OID#isResolved
28: * @see OID#resolve
29: */
30: public OID createOID(ClassMetaData cmd, boolean resolved);
31:
32: /**
33: * Create a new empty State for cmd.
34: */
35: public State createState(ClassMetaData cmd);
36:
37: /**
38: * Create a new NewObjectOID.
39: */
40: public NewObjectOID createNewObjectOID(ClassMetaData cmd);
41:
42: /**
43: * Create a new untyped OID if the store supports these or throw an
44: * unsupported option exception if not.
45: */
46: public OID createUntypedOID();
47:
48: }
|