|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides access to revisions
in a CDO repository
by demand loading
and caching them.
Revisions are generally queried by:
If querying by timestamp it's also possible to ask for multiple revisions (identified by a list of object IDs) in one
round trip (to the server if this revision manager is contained by a session
or to the
backend store if it is contained by a repository
.
Method Summary | |
---|---|
boolean |
containsRevision(CDOID id,
CDOBranchPoint branchPoint)
Returns true if the revision cache contains a revision
with the given ID at the given branch point (branch + timestamp),
false otherwise. |
boolean |
containsRevisionByVersion(CDOID id,
CDOBranchVersion branchVersion)
Returns true if the revision cache contains a revision
with the given ID at the given branch version (branch + version),
false otherwise. |
EClass |
getObjectType(CDOID id)
Returns the type of an object if a revision for that object is in the revision
cache, null otherwise. |
EClass |
getObjectType(CDOID id,
CDOBranchManager branchManagerForLoadOnDemand)
Returns the type of an object. |
CDORevision |
getRevision(CDOID id,
CDOBranchPoint branchPoint,
int referenceChunk,
int prefetchDepth,
boolean loadOnDemand)
Returns the revision with the given ID at the given branch
point (branch + timestamp), optionally demand loading it if it is not already in the cache . |
CDORevision |
getRevisionByVersion(CDOID id,
CDOBranchVersion branchVersion,
int referenceChunk,
boolean loadOnDemand)
Returns the revision with the given ID at the given branch version (branch + version), optionally demand loading it if it is not already in the
cache . |
List<CDORevision> |
getRevisions(List<CDOID> ids,
CDOBranchPoint branchPoint,
int referenceChunk,
int prefetchDepth,
boolean loadOnDemand)
Returns the revisions with the given IDs at the given branch point (branch + timestamp), optionally demand loading them if they are not already in the
cache . |
Method Detail |
---|
EClass getObjectType(CDOID id)
type
of an object if a revision for that object is in the revision
cache, null
otherwise.
Same as calling getObjectType(id, null)
.
EObject.eClass()
,
getObjectType(CDOID, CDOBranchManager)
EClass getObjectType(CDOID id, CDOBranchManager branchManagerForLoadOnDemand)
type
of an object.
If no revision for that object is found in the revision cache the following is tried:
branchManagerForLoadOnDemand
is not null
the first revision of the object in the
main branch is loaded from the server and its type is returned.
branchManagerForLoadOnDemand
is null
or the object does not
exist) null
is returned.
A branch manager
is required instead of just a boolean value to specify whether to
demand-load or not because this revision manager must be able to access the
main branch
while demand-loading.
EObject.eClass()
,
getObjectType(CDOID)
boolean containsRevision(CDOID id, CDOBranchPoint branchPoint)
true
if the revision cache
contains a revision
with the given ID
at the given branch point
(branch + timestamp),
false
otherwise.
getRevision(CDOID, CDOBranchPoint, int, int, boolean)
,
getRevisions(List, CDOBranchPoint, int, int, boolean)
CDORevision getRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand)
revision
with the given ID
at the given branch
point
(branch + timestamp), optionally demand loading it if it is not already in the cache
.
referenceChunk
- The number of target IDs
to load for each many-valued reference in the returned revision, or
CDORevision.UNCHUNKED
for all such list elements (IDs).prefetchDepth
- The number of nested containment levels to load revisions for in one round trip. Use the symbolic
constants CDORevision.DEPTH_INFINITE
to prefetch all contained revisions or
CDORevision.DEPTH_NONE
to not prefetch anything. Only the explicitely requested revision is
returned by this method. If additional revisions are prefetched they are placed in the revision cache to
speed up subsequent calls to this method.loadOnDemand
- If the requested revision is not contained in the revision cache it depends on this parameter's value
whether the revision is loaded from the server or null
is returned.getRevisions(List, CDOBranchPoint, int, int, boolean)
,
getRevisionByVersion(CDOID, CDOBranchVersion, int, boolean)
List<CDORevision> getRevisions(List<CDOID> ids, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth, boolean loadOnDemand)
revisions
with the given IDs
at the given branch point
(branch + timestamp), optionally demand loading them if they are not already in the
cache
.
referenceChunk
- The number of target IDs
to load for each many-valued reference in the returned revisions,
or CDORevision.UNCHUNKED
for all such list elements (IDs).prefetchDepth
- The number of nested containment levels to load revisions for in one round trip. Use the symbolic
constants CDORevision.DEPTH_INFINITE
to prefetch all contained revisions or
CDORevision.DEPTH_NONE
to not prefetch anything. Only the explicitely requested revisions are
returned by this method. If additional revisions are prefetched they are placed in the revision cache to
speed up subsequent calls to this method.loadOnDemand
- If one or more of the requested revisions is/are not contained in the revision cache it depends on this
parameter's value whether the revision(s) is/are loaded from the server or null
is placed in
the list that is returned.getRevision(CDOID, CDOBranchPoint, int, int, boolean)
boolean containsRevisionByVersion(CDOID id, CDOBranchVersion branchVersion)
true
if the revision cache
contains a revision
with the given ID
at the given branch version
(branch + version),
false
otherwise.
getRevisionByVersion(CDOID, CDOBranchVersion, int, boolean)
CDORevision getRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int referenceChunk, boolean loadOnDemand)
revision
with the given ID
at the given branch version
(branch + version), optionally demand loading it if it is not already in the
cache
.
Prefetching of nested containment levels is not support by this method because the version of a particular revision can not serve as a reasonable baseline criterium for a consistent graph of multiple revisions.
referenceChunk
- The number of target IDs
to load for each many-valued reference in the returned revision, or
CDORevision.UNCHUNKED
for all such list elements (IDs).loadOnDemand
- If the requested revision is not contained in the revision cache it depends on this parameter's value
whether the revision is loaded from the server or null
is returned.getRevision(CDOID, CDOBranchPoint, int, int, boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |