public class CDOPushTransaction extends Notifier implements CDOTransaction
transaction
that persists changes to the object graph locally on commit and can later load
these changes and push them to the repository
.CDOTransaction.Options
IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>
PROP_TIME_MACHINE_DISABLED
NO_TIMEOUT
INVALID_DATE, UNSPECIFIED_DATE
Constructor and Description |
---|
CDOPushTransaction(CDOTransaction delegate) |
CDOPushTransaction(CDOTransaction delegate,
File file) |
CDOPushTransaction(CDOTransaction delegate,
File file,
boolean reconstructSavepoints) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(IListener listener) |
void |
addObjectHandler(CDOObjectHandler handler) |
void |
addTransactionHandler(CDOTransactionHandlerBase handler) |
void |
close() |
CDOCommitInfo |
commit()
Same as
commit(null) . |
CDOCommitInfo |
commit(IProgressMonitor progressMonitor)
Commits the modifications of this transaction to the repository and returns a
commit info object if successful. |
CDOChangeSetData |
compareRevisions(CDOBranchPoint source) |
CDOBinaryResource |
createBinaryResource(String path) |
CDOQuery |
createQuery(String language,
String queryString)
Same as
createQuery(language, queryString, null) . |
CDOQuery |
createQuery(String language,
String queryString,
boolean considerDirtyState) |
CDOQuery |
createQuery(String language,
String queryString,
Object context) |
CDOQuery |
createQuery(String language,
String queryString,
Object context,
boolean considerDirtyState) |
CDOResource |
createResource(String path) |
CDOResourceFolder |
createResourceFolder(String path) |
URI |
createResourceURI(String path)
Returns a
URI that can be used in ResourceSet.getResource(URI, boolean) to load the resource with the specified path. |
static File |
createTempFile(CDOTransaction transaction) |
CDOTextResource |
createTextResource(String path) |
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. |
CDOSavepoint[] |
exportChanges(OutputStream out) |
Object |
getAdapter(Class adapter) |
CDOBinaryResource |
getBinaryResource(String path) |
CDOBranch |
getBranch()
Returns the branch of this branch point, or
null if this branch point is the
base of the main branch . |
CDOChangeSetData |
getChangeSetData() |
String |
getCommitComment()
Returns the comment to be used in the next commit operation.
|
Set<? extends EObject> |
getCommittables() |
Set<CDOObject> |
getConflicts() |
CDOTransaction |
getDelegate() |
Map<CDOID,CDOObject> |
getDetachedObjects() |
Map<CDOID,CDOObject> |
getDirtyObjects() |
String |
getDurableLockingID() |
CDOResourceNode[] |
getElements() |
File |
getFile() |
CDOSavepoint |
getFirstSavepoint() |
CDOCommitHistory |
getHistory() |
CDOObjectHistory |
getHistory(CDOObject object) |
long |
getLastCommitTime() |
CDOSavepoint |
getLastSavepoint() |
long |
getLastUpdateTime()
Returns the time stamp of the last commit operation.
|
IListener[] |
getListeners() |
Map<CDOID,CDOObject> |
getNewObjects() |
CDOObject |
getObject(CDOID id)
Returns the object for the given CDOID.
|
CDOObject |
getObject(CDOID id,
boolean loadOnDemand)
Returns the object for the given CDOID.
|
<T extends EObject> |
getObject(T objectFromDifferentView)
Takes an object from a (possibly) different view and contextifies it for the usage with this view.
|
CDOObjectHandler[] |
getObjectHandlers() |
CDOBinaryResource |
getOrCreateBinaryResource(String path) |
CDOResource |
getOrCreateResource(String path) |
CDOResourceFolder |
getOrCreateResourceFolder(String path) |
CDOTextResource |
getOrCreateTextResource(String path) |
CDOViewProvider |
getProvider()
Returns the
provider that has opened this view. |
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. |
CDORevision |
getRevision(CDOID id) |
Map<CDOID,CDORevisionDelta> |
getRevisionDeltas() |
CDOResource |
getRootResource()
Returns the root resource of the repository.
|
CDOSession |
getSession()
Returns the
session this view was opened by. |
int |
getSessionID() |
CDOTextResource |
getTextResource(String path) |
long |
getTimeStamp()
Returns the time stamp of this branch point, or the fixed special time stamp
unspecified if this branch point marks the head of a branch. |
CDOTransactionHandler[] |
getTransactionHandlers() |
CDOTransactionHandler1[] |
getTransactionHandlers1() |
CDOTransactionHandler2[] |
getTransactionHandlers2() |
CDOUnitManager |
getUnitManager() |
URIHandler |
getURIHandler() |
int |
getViewID() |
Lock |
getViewLock() |
CDOViewSet |
getViewSet()
Returns the
view set this view is associated with. |
boolean |
hasConflict()
Returns
true if this transaction contains local modifications that are conflicting with remote
modifications, false otherwise. |
boolean |
hasListeners() |
boolean |
hasResource(String path)
Returns
true if a resource with the given path exists in the repository, false . |
CDOSavepoint[] |
importChanges(InputStream in,
boolean reconstructSavepoints) |
boolean |
isClosed() |
boolean |
isDirty()
Returns
true if this transaction is not closed and contains uncommitted changes, false
otherwise. |
boolean |
isDurableView() |
boolean |
isEmpty() |
boolean |
isHistorical() |
boolean |
isInvalidationRunnerActive() |
boolean |
isLegacyModeEnabled()
Deprecated.
|
boolean |
isObjectRegistered(CDOID id)
|
boolean |
isReadOnly() |
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) |
CDOChangeSetData |
merge(CDOBranchPoint source,
CDOBranchPoint sourceBase,
CDOMerger merger) |
CDOChangeSetData |
merge(CDOBranchPoint source,
CDOMerger merger) |
CDOTransaction.Options |
options()
Returns the
options of this view. |
IRegistry<String,Object> |
properties() |
void |
push() |
void |
push(IProgressMonitor progressMonitor) |
<T extends EObject> |
queryInstances(EClass type)
Returns a list of the instances of the given type.
|
<T extends EObject> |
queryInstancesAsync(EClass type)
Returns an iterator over the instances of the given type.
|
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)
Deprecated.
|
void |
removeListener(IListener listener) |
void |
removeObjectHandler(CDOObjectHandler handler) |
void |
removeTransactionHandler(CDOTransactionHandlerBase handler) |
void |
rollback() |
boolean |
runAfterUpdate(long updateTime,
Runnable runnable) |
boolean |
setBranch(CDOBranch branch)
Same as calling
setBranchPoint(branch, getTimeStamp()) . |
boolean |
setBranch(CDOBranch branch,
IProgressMonitor monitor)
Same as
CDOView.setBranch(CDOBranch) with IProgressMonitor . |
boolean |
setBranchPoint(CDOBranch branch,
long timeStamp)
Sets the
branch and the point in (repository) time this view should refer to. |
boolean |
setBranchPoint(CDOBranch branch,
long timeStamp,
IProgressMonitor monitor)
Same as
CDOView.setBranchPoint(CDOBranch, long) with a IProgressMonitor . |
boolean |
setBranchPoint(CDOBranchPoint branchPoint)
Same as calling
setBranchPoint(branchPoint.getBranch(),
branchPoint.getTimeStamp()) . |
boolean |
setBranchPoint(CDOBranchPoint branchPoint,
IProgressMonitor monitor)
Same as calling
CDOView.setBranchPoint(CDOBranchPoint) with a IProgressMonitor . |
void |
setCommitComment(String comment)
Sets the comment to be used in the next commit operation.
|
void |
setCommittables(Set<? extends EObject> committables) |
protected void |
setDirty(boolean dirty) |
void |
setResourcePathCache(Map<String,CDOID> resourcePathCache)
Sets the new
map to be used as a cache for various get*Resource*(String path) methods. |
CDOSavepoint |
setSavepoint()
Creates a save point in the
CDOTransaction that can be used to roll back a part of the transaction
Save points do not involve the server side, everything is done on the client side. |
boolean |
setTimeStamp(long timeStamp)
Same as calling
setBranchPoint(getBranch(), timeStamp) . |
boolean |
setTimeStamp(long timeStamp,
IProgressMonitor monitor)
Same as
CDOView.setTimeStamp(long) with IProgressMonitor . |
<V> V |
syncExec(Callable<V> callable) |
void |
syncExec(Runnable runnable) |
String |
toString() |
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) |
void |
waitForUpdate(long updateTime)
Blocks the calling thread until a commit operation with the given time stamp (or higher) has occured.
|
boolean |
waitForUpdate(long updateTime,
long timeoutMillis)
Blocks the calling thread until a commit operation with the given time stamp (or higher) has occured or the given
timeout has expired.
|
fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getNotificationService, lastListenerRemoved
public CDOPushTransaction(CDOTransaction delegate) throws IOException
IOException
public CDOPushTransaction(CDOTransaction delegate, File file) throws IOException
IOException
public CDOPushTransaction(CDOTransaction delegate, File file, boolean reconstructSavepoints) throws IOException
IOException
public CDOTransaction getDelegate()
public File getFile()
public final IRegistry<String,Object> properties()
properties
in interface IPropertiesContainer
public boolean isDirty()
CDOTransaction
true
if this transaction is not closed and contains uncommitted changes, false
otherwise.isDirty
in interface CDOTransaction
isDirty
in interface CDOView
CDOTransaction.isDirty()
protected void setDirty(boolean dirty)
public CDOCommitInfo commit() throws CommitException
CDOUserTransaction
commit(null)
.commit
in interface CDOUserTransaction
CommitException
public CDOCommitInfo commit(IProgressMonitor progressMonitor) throws CommitException
CDOUserTransaction
commit info
object if successful.
Various kinds of problems can cause the commit to fail and not all of them can be avoided by acquiring pessimistic locks
on the modified objects. In particular you must expect and handle containment cycle exceptions
. The following example shows how
write robust transactions:
CDOTransaction transaction = null; try { transaction = session.openTransaction(); for (;;) { transaction.getViewLock().lock(); try { CDOResource resource = transaction.getResource("/stock/resource1"); // Modify the model here... transaction.commit(); break; } catch (ConcurrentAccessException ex) { transaction.rollback(); } catch (CommitException ex) { throw ex.wrap(); } finally { transaction.getViewLock().unlock(); } } } finally { if (transaction != null) { transaction.close(); } }Note that the transaction stays functional after a any call to the
commit()
methods. If the transaction is not closed after a commit
it can be used to apply additional modifications to the model.commit
in interface CDOUserTransaction
CommitException
public void rollback()
rollback
in interface CDOUserTransaction
public void push() throws CommitException
CommitException
public void push(IProgressMonitor progressMonitor) throws CommitException
CommitException
public CDOSavepoint[] exportChanges(OutputStream out) throws IOException
exportChanges
in interface CDOTransaction
IOException
public CDOSavepoint[] importChanges(InputStream in, boolean reconstructSavepoints) throws IOException
importChanges
in interface CDOTransaction
IOException
public long getLastCommitTime()
getLastCommitTime
in interface CDOTransaction
public void addListener(IListener listener)
addListener
in interface INotifier
addListener
in class Notifier
public void removeListener(IListener listener)
removeListener
in interface INotifier
removeListener
in class Notifier
public boolean hasListeners()
hasListeners
in interface INotifier
hasListeners
in class Notifier
public IListener[] getListeners()
getListeners
in interface INotifier
getListeners
in class Notifier
public void addObjectHandler(CDOObjectHandler handler)
addObjectHandler
in interface CDOView
public void addTransactionHandler(CDOTransactionHandlerBase handler)
addTransactionHandler
in interface CDOTransaction
public CDOQuery createQuery(String language, String queryString)
CDOView
createQuery(language, queryString, null)
.createQuery
in interface CDOView
CDOView.createQuery(String, String, Object)
public CDOQuery createQuery(String language, String queryString, Object context)
createQuery
in interface CDOView
public CDOQuery createQuery(String language, String queryString, boolean considerDirtyState)
createQuery
in interface CDOTransaction
public CDOQuery createQuery(String language, String queryString, Object context, boolean considerDirtyState)
createQuery
in interface CDOTransaction
public CDOResourceFolder createResourceFolder(String path)
createResourceFolder
in interface CDOTransaction
public CDOResource createResource(String path)
createResource
in interface CDOTransaction
ResourceSet.createResource(URI)
@Deprecated public boolean isLegacyModeEnabled()
isLegacyModeEnabled
in interface CDOView
CDOUtil.setLegacyModeDefault(boolean)
public long getLastUpdateTime()
CDOUpdatable
passive updates
are disabled.getLastUpdateTime
in interface CDOUpdatable
public void waitForUpdate(long updateTime)
CDOUpdatable
waitForUpdate
in interface CDOUpdatable
public boolean waitForUpdate(long updateTime, long timeoutMillis)
CDOUpdatable
waitForUpdate
in interface CDOUpdatable
true
if the specified commit operation has occured within the given timeout period,
false
otherwise.public boolean runAfterUpdate(long updateTime, Runnable runnable)
runAfterUpdate
in interface CDOUpdatable
public Set<CDOObject> getConflicts()
getConflicts
in interface CDOTransaction
public CDOChangeSetData getChangeSetData()
getChangeSetData
in interface CDOChangeSetDataProvider
public Map<CDOID,CDOObject> getDetachedObjects()
getDetachedObjects
in interface CDOTransaction
public Map<CDOID,CDOObject> getDirtyObjects()
getDirtyObjects
in interface CDOTransaction
public CDORevision getRevision(CDOID id)
getRevision
in interface CDORevisionProvider
public CDOSavepoint getFirstSavepoint()
getFirstSavepoint
in interface CDOTransaction
public CDOSavepoint getLastSavepoint()
getLastSavepoint
in interface CDOTransaction
getLastSavepoint
in interface CDOUserTransaction
public boolean isInvalidationRunnerActive()
isInvalidationRunnerActive
in interface CDOView
public Map<CDOID,CDOObject> getNewObjects()
getNewObjects
in interface CDOTransaction
public CDOObject getObject(CDOID id, boolean loadOnDemand)
CDOView
public CDOObject getObject(CDOID id)
CDOView
Same as getObject(id, true)
.
getObject
in interface CDOView
CDOView.getObject(CDOID, boolean)
public <T extends EObject> T getObject(T objectFromDifferentView)
CDOView
CDOObject
it is returned unmodified.
IllegalArgumentException
is
thrown.
null
is passed null
is returned.
public CDOObjectHandler[] getObjectHandlers()
getObjectHandlers
in interface CDOView
public CDOResource getOrCreateResource(String path)
getOrCreateResource
in interface CDOTransaction
public CDOResourceFolder getOrCreateResourceFolder(String path)
getOrCreateResourceFolder
in interface CDOTransaction
public CDOResource getResource(String path, boolean loadOnDemand)
getResource
in interface CDOView
ResourceSet.getResource(URI, boolean)
public CDOResource getResource(String path)
CDOView
getResource(String, true)
.getResource
in interface CDOView
ResourceSet.getResource(URI, boolean)
public CDOResourceNode getResourceNode(String path)
CDOView
getResourceNode
in interface CDOView
null
.public CDOTextResource createTextResource(String path)
createTextResource
in interface CDOTransaction
public CDOTextResource getOrCreateTextResource(String path)
getOrCreateTextResource
in interface CDOTransaction
public CDOBinaryResource createBinaryResource(String path)
createBinaryResource
in interface CDOTransaction
public CDOBinaryResource getOrCreateBinaryResource(String path)
getOrCreateBinaryResource
in interface CDOTransaction
public CDOTextResource getTextResource(String path)
getTextResource
in interface CDOView
public CDOBinaryResource getBinaryResource(String path)
getBinaryResource
in interface CDOView
public CDOResourceFolder getResourceFolder(String path)
getResourceFolder
in interface CDOView
public void setResourcePathCache(Map<String,CDOID> resourcePathCache)
CDOView
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>()
.
setResourcePathCache
in interface CDOView
CDOView.getResourceNode(String)
,
CDOView.getResource(String)
,
CDOView.getResource(String, boolean)
,
CDOView.getBinaryResource(String)
,
CDOView.getTextResource(String)
,
CDOView.getResourceFolder(String)
,
CDOView.hasResource(String)
public ResourceSet getResourceSet()
CDOView
resource set
this view is associated with.
Same as calling getViewSet().getResourceSet().
getResourceSet
in interface CDOView
CDOViewSet.getResourceSet()
public Map<CDOID,CDORevisionDelta> getRevisionDeltas()
getRevisionDeltas
in interface CDOTransaction
public CDOResource getRootResource()
CDOView
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.
getRootResource
in interface CDOView
public CDOSession getSession()
CDOView
session
this view was opened by.getSession
in interface CDOCommonView
getSession
in interface CDOView
null
if this view is closed.Closeable.close()
,
Closeable.isClosed()
,
CDOViewContainer.openView()
,
CDOTransactionContainer.openTransaction()
public CDOViewProvider getProvider()
CDOView
provider
that has opened this view.getProvider
in interface CDOView
public URI createResourceURI(String path)
CDOView
URI
that can be used in ResourceSet.getResource(URI, boolean)
to load the resource with the specified path.createResourceURI
in interface CDOView
public long getTimeStamp()
CDOBranchPoint
unspecified
if this branch point marks the head
of a branch.getTimeStamp
in interface CDOBranchPoint
getTimeStamp
in interface CDOTimeProvider
public String getDurableLockingID()
getDurableLockingID
in interface CDOCommonView
getDurableLockingID
in interface CDOLockOwner
public CDOTransactionHandler[] getTransactionHandlers()
getTransactionHandlers
in interface CDOTransaction
public CDOTransactionHandler1[] getTransactionHandlers1()
getTransactionHandlers1
in interface CDOTransaction
public CDOTransactionHandler2[] getTransactionHandlers2()
getTransactionHandlers2
in interface CDOTransaction
public int getSessionID()
getSessionID
in interface CDOLockOwner
public boolean isDurableView()
isDurableView
in interface CDOLockOwner
public int getViewID()
getViewID
in interface CDOCommonView
getViewID
in interface CDOLockOwner
public CDOViewSet getViewSet()
CDOView
view set
this view is associated with.getViewSet
in interface CDOView
null
.CDOViewSet.getViews()
public Lock getViewLock()
getViewLock
in interface CDOView
public void syncExec(Runnable runnable)
public boolean hasConflict()
CDOTransaction
true
if this transaction contains local modifications that are conflicting with remote
modifications, false
otherwise.hasConflict
in interface CDOTransaction
hasConflict
in interface CDOView
CDOTransaction.hasConflict()
public boolean hasResource(String path)
CDOView
true
if a resource with the given path exists in the repository, false
.
Applies to file resources
, as well.hasResource
in interface CDOView
CDOView.getResource(String, boolean)
public boolean isObjectRegistered(CDOID id)
CDOView
isObjectRegistered
in interface CDOView
public void lockObjects(Collection<? extends CDOObject> objects, IRWLockManager.LockType lockType, long timeout) throws InterruptedException
CDOView
lockObjects
in interface CDOView
InterruptedException
public void lockObjects(Collection<? extends CDOObject> objects, IRWLockManager.LockType lockType, long timeout, boolean recursive) throws InterruptedException
lockObjects
in interface CDOView
InterruptedException
public CDOTransaction.Options options()
CDOCommonView
options
of this view.options
in interface CDOCommonView
options
in interface CDOTransaction
options
in interface CDOView
options
in interface IOptionsContainer
public List<CDOResourceNode> queryResources(CDOResourceFolder folder, String name, boolean exactMatch)
CDOView
queryResources
in interface CDOView
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.public CloseableIterator<CDOResourceNode> queryResourcesAsync(CDOResourceFolder folder, String name, boolean exactMatch)
CDOView
queryResourcesAsync
in interface CDOView
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.public <T extends EObject> List<T> queryInstances(EClass type)
CDOView
queryInstances
in interface CDOView
public <T extends EObject> CloseableIterator<T> queryInstancesAsync(EClass type)
CDOView
queryInstancesAsync
in interface CDOView
public List<CDOObjectReference> queryXRefs(CDOObject targetObject, EReference... sourceReferences)
CDOView
object references
that represent the cross references to the specified
target object.queryXRefs
in interface CDOView
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.CDOView.queryXRefs(Set, EReference...)
,
CDOView.queryXRefsAsync(Set, EReference...)
,
CDOUtil.wrapExternalObject(EObject, CDOView)
public List<CDOObjectReference> queryXRefs(Set<CDOObject> targetObjects, EReference... sourceReferences)
CDOView
object references
that represent the cross references to the specified
target objects.queryXRefs
in interface CDOView
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.CDOView.queryXRefs(CDOObject, EReference...)
,
CDOView.queryXRefsAsync(Set, EReference...)
,
CDOUtil.wrapExternalObject(EObject, CDOView)
public CloseableIterator<CDOObjectReference> queryXRefsAsync(Set<CDOObject> targetObjects, EReference... sourceReferences)
CDOView
object references
that represent the cross references to
the specified target objects. The underlying query will be executed asynchronously.queryXRefsAsync
in interface CDOView
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.CDOView.queryXRefs(CDOObject, EReference...)
,
CDOView.queryXRefs(Set, EReference...)
,
CDOUtil.wrapExternalObject(EObject, CDOView)
@Deprecated public int reload(CDOObject... objects)
CDOView
objects
from the repository.public void removeObjectHandler(CDOObjectHandler handler)
removeObjectHandler
in interface CDOView
public void removeTransactionHandler(CDOTransactionHandlerBase handler)
removeTransactionHandler
in interface CDOTransaction
public CDOChangeSetData merge(CDOBranchPoint source, CDOMerger merger)
merge
in interface CDOTransaction
public CDOChangeSetData merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOMerger merger)
merge
in interface CDOTransaction
public CDOChangeSetData compareRevisions(CDOBranchPoint source)
compareRevisions
in interface CDOView
public CDOCommitHistory getHistory()
getHistory
in interface CDOCommitHistory.Provider<CDOObject,CDOObjectHistory>
public CDOObjectHistory getHistory(CDOObject object)
getHistory
in interface CDOCommitHistory.Provider<CDOObject,CDOObjectHistory>
public CDOSavepoint setSavepoint()
CDOUserTransaction
CDOTransaction
that can be used to roll back a part of the transaction
Save points do not involve the server side, everything is done on the client side.
setSavepoint
in interface CDOTransaction
setSavepoint
in interface CDOUserTransaction
public void unlockObjects()
CDOView
unlockObjects
in interface CDOView
public void unlockObjects(Collection<? extends CDOObject> objects, IRWLockManager.LockType lockType)
CDOView
unlockObjects
in interface CDOView
public void unlockObjects(Collection<? extends CDOObject> objects, IRWLockManager.LockType lockType, boolean recursive)
unlockObjects
in interface CDOView
@Deprecated public String enableDurableLocking(boolean enable)
enableDurableLocking()
instead or disableDurableLocking(boolean)
, respectively.enableDurableLocking
in interface CDOView
public String enableDurableLocking()
CDOView
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.enableDurableLocking
in interface CDOView
CDOViewContainer.openView(String)
,
CDOViewOpener.openView(String, ResourceSet)
,
CDOTransactionContainer.openTransaction(String)
,
CDOTransactionOpener.openTransaction(String, ResourceSet)
,
CDOView.disableDurableLocking(boolean)
public void disableDurableLocking(boolean releaseLocks)
CDOView
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.disableDurableLocking
in interface CDOView
CDOView.enableDurableLocking()
public boolean isReadOnly()
isReadOnly
in interface CDOCommonView
public boolean isHistorical()
isHistorical
in interface CDOCommonView
public CDOBranch getBranch()
CDOBranchPoint
null
if this branch point is the
base
of the main branch
.getBranch
in interface CDOBranchPoint
public boolean setBranchPoint(CDOBranch branch, long timeStamp)
CDOView
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.setBranchPoint
in interface CDOView
true
if the branch point was changed, false
otherwise.public boolean setBranchPoint(CDOBranch branch, long timeStamp, IProgressMonitor monitor)
CDOView
CDOView.setBranchPoint(CDOBranch, long)
with a IProgressMonitor
.setBranchPoint
in interface CDOView
public boolean setBranchPoint(CDOBranchPoint branchPoint)
CDOView
setBranchPoint(branchPoint.getBranch(),
branchPoint.getTimeStamp())
.setBranchPoint
in interface CDOView
public boolean setBranchPoint(CDOBranchPoint branchPoint, IProgressMonitor monitor)
CDOView
CDOView.setBranchPoint(CDOBranchPoint)
with a IProgressMonitor
.setBranchPoint
in interface CDOView
public boolean setBranch(CDOBranch branch)
CDOView
setBranchPoint(branch, getTimeStamp())
.public boolean setBranch(CDOBranch branch, IProgressMonitor monitor)
CDOView
CDOView.setBranch(CDOBranch)
with IProgressMonitor
.public boolean setTimeStamp(long timeStamp)
CDOView
setBranchPoint(getBranch(), timeStamp)
.setTimeStamp
in interface CDOView
public boolean setTimeStamp(long timeStamp, IProgressMonitor monitor)
CDOView
CDOView.setTimeStamp(long)
with IProgressMonitor
.setTimeStamp
in interface CDOView
public URIHandler getURIHandler()
getURIHandler
in interface CDOView
public CDOUnitManager getUnitManager()
getUnitManager
in interface CDOView
public String getCommitComment()
CDOTransaction
getCommitComment
in interface CDOTransaction
CDOCommitInfo.getComment()
public void setCommitComment(String comment)
CDOTransaction
setCommitComment
in interface CDOTransaction
CDOCommitInfo.getComment()
public void setCommittables(Set<? extends EObject> committables)
setCommittables
in interface CDOTransaction
public Set<? extends EObject> getCommittables()
getCommittables
in interface CDOTransaction
public boolean isEmpty()
isEmpty
in interface IContainer<CDOResourceNode>
public CDOResourceNode[] getElements()
getElements
in interface IContainer<CDOResourceNode>
public Object getAdapter(Class adapter)
getAdapter
in interface IAdaptable
public static File createTempFile(CDOTransaction transaction) throws IOException
IOException
Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.