Skip to main content
summaryrefslogtreecommitdiffstats
blob: 49f5d6e8d7428bd33732068c227c915dbb6b8d49 (plain) (blame)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN"
    "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<!--
/**
 * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others.
 * 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
 */
-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>CDO - New &amp; Noteworthy</title>
</head>
<body background="#ffffff">
<h2>New &amp; Noteworthy</h2>
<table id=table415 cellSpacing=0 cellPadding=10>
  <tbody>
  <tr>
    <td vAlign=top align=left width="200" bgColor=#e0d0e6>
      <P align=right><B>Create save point</B></p></td>
    <td vAlign=top>
      <P align=left>
 Creates a save point in the <i>CDOTransaction, </i>that can be used to roll back a part of the 
	transaction and
 specifies the save point.<p>
 <b>Note:</b> Save points do not involve the server side, everything is done on 
	the client side.</p></td></tr>
  </tbody></table>
<hr>
	
<table id=table417 cellSpacing=0 cellPadding=10>
  <tbody>
  <tr>
    <td vAlign=top align=left width="200" bgColor=#e0d0e6>
      <P align=right><B>Make remote invalidation configurable</B></p></td>
    <td vAlign=top>
      <P align=left>Specifies whether an object will be invalidated by others 
		users' changes.<br>
		e.g. : <i>session.setPassiveUpdateEnabled(false);</i></p>
		<P align=left>By default this property is enabled. If this property is 
		disabled the latest versions of objects can still be obtained by calling <i>{@link #refresh()}</i>.<br>
		e.g. : <i>session.refresh();</i></p>
		<P align=left>Passive update can be disabled in cases where more 
		performance is needed and/or more control over when objects will be 
		refreshed.</p>
		<P align=left>When the feature is turned on, it will automatically performs a refresh 
		to be in sync with the server.</p></td></tr>
  </tbody></table>
<hr>
	
<table id=table403 cellSpacing=0 cellPadding=10>
  <tbody>
  <tr>
    <td vAlign=top align=left width="200" bgColor=#e0d0e6>
      <P align=right><b>Change subscription</b></p></td>
    <td vAlign=top>
      <P align=left>Allows listeners to be 
		notified when objects are modified from other <i>CDOTransaction</i> 
		(remotely or not). It uses adapters for the notification process (see 
		CDONotification).</p>
		<P align=left>To activate the policy, you must to do the following: <br>
		e.g.: <i>
		transaction.setChangeSubscriptionPolicy(CDOChangeSubscriptionPolicy.ALL);</i></p>
		<P align=left>To register an object, you must add an adapter to the 
		object in which you are interested.<br>
		e.g.: <i>eObject.eAdapters().add(anAdapter);</i></p>
		<P align=left>If <i>anAdapter</i> matches the current policy, <i>
		eObject</i> will be registered to the server and<br>
		you will receive all changes from others <i>{@link CDOTransaction}.</i></p>
		<P align=left>By default, the 
		value is set to <i>{@link CDOChangeSubscriptionPolicy#NONE}</i>.</p>
		<P align=left>When this feature is activated, every object that has at 
		least one adapter matching the current policy will be registered to 
		the server and will be notified for every change happening in any other
		<i>CDOTransaction</i>.</p>
		<P align=left><i>{@link CDOChangeSubscriptionPolicy#NONE}</i> - 
		Disabled.<br>
		<i>{@link CDOChangeSubscriptionPolicy#ALL}</i> - Enabled for all 
		adapters used.<br>
		<i>{@link CDOChangeSubscriptionPolicy#ONLY_CDOADAPTER} </i>- Enabled 
		only for adapters that implement {@link CDOAdapter}.</p>
		<P align=left>Any other classes that implement <i>{@link 
		CDOChangeSubscriptionPolicy}</i> will enable the feature for whatever 
		rules defined in that class. </p></td></tr>
  </tbody></table>
<hr>
	
<table id=table410 cellSpacing=0 cellPadding=10>
  <tbody>
  <tr>
    <td vAlign=top align=left width="200" bgColor=#e0d0e6>
      <P align=right><b>Query</b></p></td>
    <td vAlign=top>
      <P align=left>The <i>query</i> feature allows you to retrieve objects from the 
		repository in a native way. It could support as many languages as the <i>
		Store&nbsp;</i>wants to support.<i><br>
		</i>e.g.: <i>CDOQuery query = view.createQuery(&lt;LANGUAGE&gt;, &lt;QUERY 
		StrING&gt;);</i></p>
		<P align=left>At this point, it can set parameters that are going to be 
		transferred to the server. (Eclass, EObject or primitive)<br>
		e.g.: <i>query.setParameter(key, value);</i></p>
		<P align=left>Once all your parameters are set, you can retrieve the 
		results in a standard way.<br>
		e.g.: <i>List&lt;SalesOrder&gt; salesOrders = query.getResult(SalesOrder.class);</i></p>
		<P align=left>or asynchronously <br>
		e.g.<i>:CloseableIterator</i><i>&lt;SalesOrder&gt; salesOrders = 
		query.getResultAsync(SalesOrder.class);</i></p>
		<P align=left>In asynchronous mode, objects are returned as soon as they 
		are retrieved from the <i>Server</i>. The query feature does not keep any reference to 
		the results. This means that you could possibly return millions of 
		objects.</p>
		<P align=left>The iterator could be closed at any time, resulting in the 
		query being cancelled at the server side.<br>
		e.g.: <i>salesOrders.close();</i></p></td></tr>
  </tbody></table>
<hr>
	
<table id=table418 cellSpacing=0 cellPadding=10>
  <tbody>
  <tr>
    <td vAlign=top align=left width="200" bgColor=#e0d0e6>
      <P align=right><b>Support getURIFragment and getEObject</b></p></td>
    <td vAlign=top>
      <P align=left>CDOResource now supports the getURIFragment and getEObject methods. </p>
		<P align=left><b>Note:</b> The URIs of temporary objects will 
		change when the <i>CDOTransaction</i> is committed. Objects will no 
		longer be accessible using their temporary URI once the <i>CDOTransaction</i> is 
		committed.</p></td></tr>
  </tbody></table>
  <hr>
	
<table id=table418 cellSpacing=0 cellPadding=10>
  <tbody>
  <tr>
    <td vAlign=top align=left width="200" bgColor=#e0d0e6>
      <P align=right><b>Support external references</b></p></td>
    <td vAlign=top>
    	<p>CDO supports many resources from different sources in the same resource set. Objects can refer to each other even if they are not from the same store or source.</p>
    	<ul>
    		<li>An object from XMIResource can refer to objects from CDOResource.</li>
    		<li>An object from CDOResource can refer to objects from XMIResource.</li>
    		<li>An object from CDOResourceA (repositoryA) can refer to objects from another CDOResourceB(repositoryB)</li>
    	</ul>
    	<p>Each resource set has a CDOViewSet. A CDOViewSet could have many CDOViews but each CDOView refers to one CDOViewSet only.</p>
    	<p>To use that feature, the same resource set must be used when opening CDOView.</p>
    	<p>e.g.:
    		<i>ResourceSet resourceSet = new ResourceSetImpl();</i><br>
      		<i>CDOTransaction transactionA1 = sessionA.openTransaction(resourceSet);</i><br>
      		<i>CDOTransaction transactionB1 = sessionB.openTransaction(resourceSet);</i>
      	</p>
      	<p><b>Note:</b> Two CDOViews from the same repository cannot belong to the same resource set.</p></td></tr>
  </tbody></table>
  <hr>
	
<table id=table418 cellSpacing=0 cellPadding=10>
  <tbody>
  <tr>
    <td vAlign=top align=left width="200" bgColor=#e0d0e6>
      <P align=right><b>XATransaction</b></p></td>
    <td vAlign=top></i><p>This feature provides the ability to use many transactions from many repositories as a whole instead of individually. Its three-phase commit allows the clients to commit circular graphs and complex graphs that are from multiple repositories or CDOTransactions.</p>
    <p>e.g.:<br>
    	<i>CDOXATransaction xaTransaction = CDOUtil.createXATransaction();</i><br>
    	<i>CDOUtil.prepareResourceSet(resourceSet);</i><br>
    	<i>xaTransaction.add(CDOUtil.getViewSet(resourceSet));</i><br>
    	<i>xaTransaction.setSavepoint();</i><br>
    	<i>xaTransaction.rollback();</i><br>
    	<i>xaTransaction.commit();</i>
</td></tr>
  </tbody></table>
  <hr>
	
<table id=table418 cellSpacing=0 cellPadding=10>
  <tbody>
  <tr>
    <td vAlign=top align=left width="200" bgColor=#e0d0e6>
      <P align=right><b>Support containment proxies</b></p></td>
    <td vAlign=top></i><p>This feature provides the ability to have an object that is in resourceA and its container could be  in another resource. The object and container are in different  resource and it does support external references as wellThis is to be in line with EMF. However, it needs to be define in your model.</p>
    <p>
</td></tr>
  </tbody></table>
</body>
</html>

Back to the top