KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > VersantPMInternal


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdo;
13
14 import com.versant.core.server.QueryResultWrapper;
15 import com.versant.core.server.CompiledQuery;
16 import com.versant.core.common.QueryResultContainer;
17 import com.versant.core.common.StatesReturned;
18
19 import javax.jdo.spi.PersistenceCapable;
20
21 /**
22  * This interface is there to make it easier for instances like sco's or queryresult,
23  * that are directly accessible to the client to invoke methods on the pm.
24  * This also ensures that the method is run within a synchronized block if nec.
25  *
26  * @see UnsynchronizedPMProxy
27  * @see SynchronizedPMProxy
28  */

29 public interface VersantPMInternal {
30     public QueryResultWrapper executeQuery(CompiledQuery cq, Object JavaDoc[] params);
31
32     public QueryResultContainer getNextQueryResult(QueryResultWrapper aQrs,
33             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 JavaDoc[] params);
49
50     public QueryResultContainer getAllQueryResults(CompiledQuery cq,
51             Object JavaDoc[] params);
52
53     public void setMasterOnDetail(PersistenceCapable detail, int managedFieldNo,
54             PersistenceCapable master, boolean removeFromCurrentMaster);
55
56
57     public Object JavaDoc getObjectField(PersistenceCapable pc,
58             int fieldNo);
59 }
60
Popular Tags