1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/***************************************************************************
* Copyright (c) 2004 - 2008 Eike Stepper, Germany.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
package org.eclipse.emf.cdo.common.revision;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.id.CDOIDObjectFactory;
import org.eclipse.emf.cdo.common.model.CDOClass;
import java.util.Collection;
import java.util.List;
/**
* @author Eike Stepper
*/
public interface CDORevisionResolver
{
public CDOIDObjectFactory getCDOIDObjectFactory();
/**
* @return The type of an object if a revision for that object is in the revision cache, <code>null</code> otherwise.
*/
public CDOClass getObjectType(CDOID id);
public boolean containsRevision(CDOID id);
public boolean containsRevisionByTime(CDOID id, long timeStamp);
public boolean containsRevisionByVersion(CDOID id, int version);
public CDORevision getRevision(CDOID id, int referenceChunk);
public CDORevision getRevision(CDOID id, int referenceChunk, boolean loadOnDemand);
public CDORevision getRevisionByTime(CDOID id, int referenceChunk, long timeStamp);
public CDORevision getRevisionByTime(CDOID id, int referenceChunk, long timeStamp, boolean loadOnDemand);
public CDORevision getRevisionByVersion(CDOID id, int referenceChunk, int version);
public CDORevision getRevisionByVersion(CDOID id, int referenceChunk, int version, boolean loadOnDemand);
public List<CDORevision> getRevisions(Collection<CDOID> ids, int referenceChunk);
public List<CDORevision> getRevisionsByTime(Collection<CDOID> ids, int referenceChunk, long timeStamp);
public CDOID resolveReferenceProxy(CDOReferenceProxy referenceProxy);
/**
* Analyzing a list of values with respect to consecutive sequences of {@link CDOReferenceProxy} instances. A sequence
* of reference proxies is considered consecutive if and only if the {@link CDOReferenceProxy#getIndex() ids} of each
* proxy is the ids of its predecessor increased by one.
* <p>
* Implementation note: The implementation of this method should try to determine and deliver the longest possible
* consecutive sequences.
*
* @return An integer list of the range <b>sizes</b>. A positive integer denotes a range of non-proxies. A negative
* integer denotes a range of proxies. Ranges of zero size are not possible by definition.
*/
public List<Integer> analyzeReferenceRanges(List<Object> list);
}
|