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;
12:
13: import com.versant.core.server.QueryResultWrapper;
14: import com.versant.core.server.CompiledQuery;
15: import com.versant.core.common.QueryResultContainer;
16: import com.versant.core.common.StatesReturned;
17:
18: import javax.jdo.spi.PersistenceCapable;
19:
20: /**
21: * This interface is there to make it easier for instances like sco's or queryresult,
22: * that are directly accessible to the client to invoke methods on the pm.
23: * This also ensures that the method is run within a synchronized block if nec.
24: *
25: * @see UnsynchronizedPMProxy
26: * @see SynchronizedPMProxy
27: */
28: public interface VersantPMInternal {
29: public QueryResultWrapper executeQuery(CompiledQuery cq,
30: Object[] params);
31:
32: public QueryResultContainer getNextQueryResult(
33: QueryResultWrapper aQrs, int skipAmount);
34:
35: public void closeQuery(QueryResultWrapper qrw);
36:
37: public void flushIfDepOn(int[] bits);
38:
39: public void processLocalCacheReferenceQueue();
40:
41: public void addToCache(StatesReturned container);
42:
43: public QueryResultContainer getAbsolute(QueryResultWrapper qrsIF,
44: int index, int fetchAmount);
45:
46: public int getResultCount(QueryResultWrapper qrsIF);
47:
48: public int getQueryRowCount(CompiledQuery cq, Object[] params);
49:
50: public QueryResultContainer getAllQueryResults(CompiledQuery cq,
51: Object[] params);
52:
53: public void setMasterOnDetail(PersistenceCapable detail,
54: int managedFieldNo, PersistenceCapable master,
55: boolean removeFromCurrentMaster);
56:
57: public Object getObjectField(PersistenceCapable pc, int fieldNo);
58: }
|