|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

A read-only view to the state of the object graph in the repository of the underlying session at a
specific time at a specific branch.
If the time of a view is unspecified the objects
provided and managed by that view always show the latest state the repository graph.
Objects that are accessed through this view are immutable for the client. Each attempt to call a mutator on one of
these objects or one of their feature lists will result in a ReadOnlyException being thrown immediately.
Mutable objects can be provided by a transaction.
A view is opened through API of the underlying session like this:
CDOSession session = ... CDOView view = session.openView(); ...
| Nested Class Summary | |
|---|---|
static interface |
CDOView.Options
Encapsulates a set of notifying view configuration options. |
| Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer |
|---|
IContainer.Modifiable<E> |
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPoint |
|---|
INVALID_DATE, UNSPECIFIED_DATE |
| Fields inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable |
|---|
NO_TIMEOUT |
| Method Summary | ||
|---|---|---|
void |
addObjectHandler(CDOObjectHandler handler)
|
|
CDOChangeSetData |
compareRevisions(CDOBranchPoint source)
|
|
CDOQuery |
createQuery(String language,
String queryString)
Same as createQuery(language, queryString, null). |
|
CDOQuery |
createQuery(String language,
String queryString,
Object context)
|
|
void |
disableDurableLocking(boolean releaseLocks)
Disables the storage of all information that's needed to reopen this view at a
later point in time. |
|
String |
enableDurableLocking()
Enables the storage of all information that's needed to reopen this view at a
later point in time. |
|
String |
enableDurableLocking(boolean enable)
Deprecated. Use enableDurableLocking() instead or disableDurableLocking(boolean), respectively. |
|
CDOBinaryResource |
getBinaryResource(String path)
|
|
CDOObject |
getObject(CDOID id)
Returns the object for the given CDOID. |
|
CDOObject |
getObject(CDOID id,
boolean loadOnDemand)
Returns the object for the given CDOID. |
|
|
getObject(T objectFromDifferentView)
Takes an object from a (possibly) different view and contextifies it for the usage with this view. |
|
CDOObjectHandler[] |
getObjectHandlers()
|
|
CDOResource |
getResource(String path)
Same as getResource(String, true). |
|
CDOResource |
getResource(String path,
boolean loadOnDemand)
|
|
CDOResourceFolder |
getResourceFolder(String path)
|
|
CDOResourceNode |
getResourceNode(String path)
Returns the resource node with the given path. |
|
ResourceSet |
getResourceSet()
Returns the resource set this view is associated with. |
|
CDOResource |
getRootResource()
Returns the root resource of the repository. |
|
CDOSession |
getSession()
Returns the session this view was opened by. |
|
CDOTextResource |
getTextResource(String path)
|
|
URIHandler |
getURIHandler()
|
|
CDOViewSet |
getViewSet()
Returns the view set this view is associated with. |
|
boolean |
hasConflict()
Returns always false. |
|
boolean |
hasResource(String path)
Returns true if a resource with the given path exists in the repository, false. |
|
boolean |
isDirty()
Returns always false. |
|
boolean |
isInvalidationRunnerActive()
|
|
boolean |
isLegacyModeEnabled()
Deprecated. As of 4.2 the legacy mode is always enabled. |
|
boolean |
isObjectRegistered(CDOID id)
Returns true if an object with the given id is currently registered in
this view, false otherwise. |
|
void |
lockObjects(Collection<? extends CDOObject> objects,
IRWLockManager.LockType lockType,
long timeout)
Locks the given objects. |
|
void |
lockObjects(Collection<? extends CDOObject> objects,
IRWLockManager.LockType lockType,
long timeout,
boolean recursive)
|
|
CDOView.Options |
options()
Returns the options of this view. |
|
List<CDOResourceNode> |
queryResources(CDOResourceFolder folder,
String name,
boolean exactMatch)
Returns a list of the resources in the given folder with a name equal to or starting with the value of the name parameter. |
|
CloseableIterator<CDOResourceNode> |
queryResourcesAsync(CDOResourceFolder folder,
String name,
boolean exactMatch)
Returns an iterator over the resources in the given folder with a name equal to or starting with the value of the name parameter. |
|
List<CDOObjectReference> |
queryXRefs(CDOObject targetObject,
EReference... sourceReferences)
Returns a list of object references that represent the cross references to the specified
target object. |
|
List<CDOObjectReference> |
queryXRefs(Set<CDOObject> targetObjects,
EReference... sourceReferences)
Returns a list of object references that represent the cross references to the specified
target objects. |
|
CloseableIterator<CDOObjectReference> |
queryXRefsAsync(Set<CDOObject> targetObjects,
EReference... sourceReferences)
Returns an iterator over the object references that represent the cross references to
the specified target objects. |
|
int |
reload(CDOObject... objects)
Reloads the given objects from the repository. |
|
void |
removeObjectHandler(CDOObjectHandler handler)
|
|
boolean |
setBranch(CDOBranch branch)
Same as calling setBranchPoint(branch, getTimeStamp()). |
|
boolean |
setBranchPoint(CDOBranch branch,
long timeStamp)
Sets the branch and the point in (repository) time this view should refer to. |
|
boolean |
setBranchPoint(CDOBranchPoint branchPoint)
Same as calling setBranchPoint(branchPoint.getBranch(),
branchPoint.getTimeStamp()). |
|
void |
setResourcePathCache(Map<String,CDOID> resourcePathCache)
Sets the new map to be used as a cache for various get*Resource*(String path) methods. |
|
boolean |
setTimeStamp(long timeStamp)
Same as calling setBranchPoint(getBranch(), timeStamp). |
|
void |
unlockObjects()
Unlocks all locked objects of this view. |
|
void |
unlockObjects(Collection<? extends CDOObject> objects,
IRWLockManager.LockType lockType)
Unlocks the given locked objects of this view. |
|
void |
unlockObjects(Collection<? extends CDOObject> objects,
IRWLockManager.LockType lockType,
boolean recursive)
|
|
| Methods inherited from interface org.eclipse.emf.cdo.common.CDOCommonView |
|---|
getDurableLockingID, getViewID, isReadOnly |
| Methods inherited from interface org.eclipse.emf.cdo.common.lock.CDOLockOwner |
|---|
getSessionID, isDurableView |
| Methods inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPoint |
|---|
getBranch, getTimeStamp |
| Methods inherited from interface org.eclipse.emf.cdo.common.revision.CDORevisionProvider |
|---|
getRevision |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.net4j.util.collection.Closeable |
|---|
close, isClosed |
| Methods inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable |
|---|
getLastUpdateTime, waitForUpdate, waitForUpdate |
| Methods inherited from interface org.eclipse.emf.cdo.common.commit.CDOCommitHistory.Provider |
|---|
getHistory, getHistory |
| Methods inherited from interface org.eclipse.net4j.util.container.IContainer |
|---|
getElements, isEmpty |
| Methods inherited from interface org.eclipse.net4j.util.event.INotifier |
|---|
addListener, getListeners, hasListeners, removeListener |
| Method Detail |
|---|
CDOSession getSession()
session this view was opened by.
getSession in interface CDOCommonViewnull if this view is closed.Closeable.close(),
Closeable.isClosed(),
CDOViewContainer.openView(),
CDOTransactionContainer.openTransaction()CDOViewSet getViewSet()
view set this view is associated with.
null.CDOViewSet.getViews()ResourceSet getResourceSet()
resource set this view is associated with.
Same as calling getViewSet().getResourceSet().
CDOViewSet.getResourceSet()URIHandler getURIHandler()
boolean setBranchPoint(CDOBranch branch,
long timeStamp)
branch and the point in (repository) time this view should refer to. Objects provided by this view will be valid at this time. The special value
UNSPECIFIED_DATE denotes a "floating view" that always shows the latest
state of the repository.
true if the branch point was changed, false otherwise.boolean setBranchPoint(CDOBranchPoint branchPoint)
setBranchPoint(branchPoint.getBranch(),
branchPoint.getTimeStamp()).
boolean setBranch(CDOBranch branch)
setBranchPoint(branch, getTimeStamp()).
boolean setTimeStamp(long timeStamp)
setBranchPoint(getBranch(), timeStamp).
boolean isInvalidationRunnerActive()
@Deprecated boolean isLegacyModeEnabled()
CDOUtil.setLegacyModeDefault(boolean)boolean isDirty()
false.
This method has a special implementation in CDOTransaction as well.
CDOTransaction.isDirty()boolean hasConflict()
false.
This method has a special implementation in CDOTransaction as well.
CDOTransaction.hasConflict()boolean hasResource(String path)
true if a resource with the given path exists in the repository, false.
Applies to file resources, as well.
getResource(String, boolean)
CDOResource getResource(String path,
boolean loadOnDemand)
ResourceSet.getResource(URI, boolean)CDOResource getResource(String path)
getResource(String, true).
ResourceSet.getResource(URI, boolean)CDOTextResource getTextResource(String path)
CDOBinaryResource getBinaryResource(String path)
CDOResourceNode getResourceNode(String path)
throws CDOException
null.
CDOException - if no such resource node exists.CDOResourceFolder getResourceFolder(String path)
CDOResource getRootResource()
The root resource is a special resource with only CDOResourceNodes in its contents list.
You can use it as the main entry into the new resource and folder structure.
void setResourcePathCache(Map<String,CDOID> resourcePathCache)
map to be used as a cache for various get*Resource*(String path) methods.
Can be used to reset/clear the resource path cache by passing a new HashMap<String, CDOID>().
Smarter maps could implement a LRU eviction policy to limit the map capacity.
Passing null disables resource path caching.
The default value is new HashMap<String, CDOID>().
getResourceNode(String),
getResource(String),
getResource(String, boolean),
getBinaryResource(String),
getTextResource(String),
getResourceFolder(String),
hasResource(String)
List<CDOResourceNode> queryResources(CDOResourceFolder folder,
String name,
boolean exactMatch)
folder - The folder to search in, or null for top level resource nodes.name - the name or prefix of the resource nodes to return.exactMatch - true if the complete name of the resource must match, false if only a common
prefix of the name must match.
CloseableIterator<CDOResourceNode> queryResourcesAsync(CDOResourceFolder folder,
String name,
boolean exactMatch)
folder - The folder to search in, or null for top level resource nodes.name - the name or prefix of the resource nodes to return.exactMatch - true if the complete name of the resource must match, false if only a common
prefix of the name must match.
List<CDOObjectReference> queryXRefs(CDOObject targetObject,
EReference... sourceReferences)
object references that represent the cross references to the specified
target object.
targetObject - The target object that referencing objects are requested for.
An external target object can be used with the help of CDOUtil.wrapExternalObject().sourceReferences - The reference features that referencing objects are requested for, or an empty array if all reference
features are to be used in the request.queryXRefs(Set, EReference...),
queryXRefsAsync(Set, EReference...),
CDOUtil.wrapExternalObject(EObject, CDOView)
List<CDOObjectReference> queryXRefs(Set<CDOObject> targetObjects,
EReference... sourceReferences)
object references that represent the cross references to the specified
target objects.
targetObjects - The set of target objects that referencing objects are requested for.
External target objects can be used with the help of CDOUtil.wrapExternalObject().sourceReferences - The reference features that referencing objects are requested for, or an empty array if all reference
features are to be used in the request.queryXRefs(CDOObject, EReference...),
queryXRefsAsync(Set, EReference...),
CDOUtil.wrapExternalObject(EObject, CDOView)
CloseableIterator<CDOObjectReference> queryXRefsAsync(Set<CDOObject> targetObjects,
EReference... sourceReferences)
object references that represent the cross references to
the specified target objects. The underlying query will be executed asynchronously.
targetObjects - The set of target objects that referencing objects are requested for.
External target objects can be used with the help of CDOUtil.wrapExternalObject().sourceReferences - The reference features that referencing objects are requested for, or an empty array if all reference
features are to be used in the request.queryXRefs(CDOObject, EReference...),
queryXRefs(Set, EReference...),
CDOUtil.wrapExternalObject(EObject, CDOView)
CDOObject getObject(CDOID id,
boolean loadOnDemand)
loadOnDemand - whether to create and load the object, if it doesn't already exist.
null, or null if there isn't
one and loadOnDemand is false.CDOObject getObject(CDOID id)
Same as getObject(id, true).
getObject(CDOID, boolean)<T extends EObject> T getObject(T objectFromDifferentView)
CDOObject it is returned unmodified.
IllegalArgumentException is
thrown.
null is passed null is returned.
boolean isObjectRegistered(CDOID id)
true if an object with the given id is currently registered in
this view, false otherwise.
int reload(CDOObject... objects)
objects from the repository.
void lockObjects(Collection<? extends CDOObject> objects,
IRWLockManager.LockType lockType,
long timeout)
throws InterruptedException
InterruptedException
void lockObjects(Collection<? extends CDOObject> objects,
IRWLockManager.LockType lockType,
long timeout,
boolean recursive)
throws InterruptedException
InterruptedException
void unlockObjects(Collection<? extends CDOObject> objects,
IRWLockManager.LockType lockType)
void unlockObjects(Collection<? extends CDOObject> objects,
IRWLockManager.LockType lockType,
boolean recursive)
void unlockObjects()
@Deprecated String enableDurableLocking(boolean enable)
enableDurableLocking() instead or disableDurableLocking(boolean), respectively.
String enableDurableLocking()
reopen this view at a
later point in time. This information includes the branch point, the user ID of the
session, whether it's a read-only view or a transaction and all the locks
that are acquired or will be acquired while durable locking is enabled.
CDOViewContainer.openView(String),
CDOViewContainer.openView(String, ResourceSet),
CDOTransactionContainer.openTransaction(String),
CDOTransactionContainer.openTransaction(String, ResourceSet),
disableDurableLocking(boolean)void disableDurableLocking(boolean releaseLocks)
reopen this view at a
later point in time. If such information is stored when this method is called it is removed. Note that locks
acquired by this view are only released if true is passed to the releaseLocks parameter.
enableDurableLocking()void addObjectHandler(CDOObjectHandler handler)
void removeObjectHandler(CDOObjectHandler handler)
CDOObjectHandler[] getObjectHandlers()
CDOQuery createQuery(String language,
String queryString)
createQuery(language, queryString, null).
createQuery(String, String, Object)
CDOQuery createQuery(String language,
String queryString,
Object context)
CDOChangeSetData compareRevisions(CDOBranchPoint source)
CDOView.Options options()
CDOCommonViewoptions of this view.
options in interface CDOCommonViewoptions in interface IOptionsContainer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||