Skip to main content
summaryrefslogtreecommitdiffstats
blob: 9a27bf735fceba5090130678ce7984aaf806c7f6 (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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
/*******************************************************************************
 * Copyright (c) 2001, 2006 IBM Corporation 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:
 * IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.j2ee.jca.internal.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
import org.eclipse.jst.j2ee.jca.AdminObject;
import org.eclipse.jst.j2ee.jca.AuthenticationMechanism;
import org.eclipse.jst.j2ee.jca.ConfigProperty;
import org.eclipse.jst.j2ee.jca.InboundResourceAdapter;
import org.eclipse.jst.j2ee.jca.JcaPackage;
import org.eclipse.jst.j2ee.jca.OutboundResourceAdapter;
import org.eclipse.jst.j2ee.jca.ResourceAdapter;
import org.eclipse.jst.j2ee.jca.SecurityPermission;
import org.eclipse.jst.j2ee.jca.TransactionSupportKind;


/**
 * Specifies information about the resource adapter. The information includes fully-qualified names of class//interfaces required as part of the connector architecture specified contracts, level of transaction support provided, configurable properties for ManagedConnectionFactory instances, one or more authentication mechanisms supported and additional
 * required security permissions.
 * 
 * If there is no authentication-mechanism specified as part of
 * resource adapter element then the resource adapter does not
 * support any standard security authentication mechanisms as part
 * of security contract. The application server ignores the security
 * part of the system contracts in this case.
 * @generated
 */
public class ResourceAdapterImpl extends J2EEEObjectImpl implements ResourceAdapter {

	/**
	 * The default value of the '{@link #getManagedConnectionFactoryClass() <em>Managed Connection Factory Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getManagedConnectionFactoryClass()
	 * @generated
	 * @ordered
	 */
	protected static final String MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT = null;

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected String managedConnectionFactoryClass = MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT;
	/**
	 * The default value of the '{@link #getConnectionFactoryInterface() <em>Connection Factory Interface</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConnectionFactoryInterface()
	 * @generated
	 * @ordered
	 */
	protected static final String CONNECTION_FACTORY_INTERFACE_EDEFAULT = null;

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected String connectionFactoryInterface = CONNECTION_FACTORY_INTERFACE_EDEFAULT;
	/**
	 * The default value of the '{@link #getConnectionFactoryImplClass() <em>Connection Factory Impl Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConnectionFactoryImplClass()
	 * @generated
	 * @ordered
	 */
	protected static final String CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT = null;

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected String connectionFactoryImplClass = CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT;
	/**
	 * The default value of the '{@link #getConnectionInterface() <em>Connection Interface</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConnectionInterface()
	 * @generated
	 * @ordered
	 */
	protected static final String CONNECTION_INTERFACE_EDEFAULT = null;

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected String connectionInterface = CONNECTION_INTERFACE_EDEFAULT;
	/**
	 * The default value of the '{@link #getConnectionImplClass() <em>Connection Impl Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getConnectionImplClass()
	 * @generated
	 * @ordered
	 */
	protected static final String CONNECTION_IMPL_CLASS_EDEFAULT = null;

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected String connectionImplClass = CONNECTION_IMPL_CLASS_EDEFAULT;
	/**
	 * The default value of the '{@link #getTransactionSupport() <em>Transaction Support</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTransactionSupport()
	 * @generated
	 * @ordered
	 */
	protected static final TransactionSupportKind TRANSACTION_SUPPORT_EDEFAULT = TransactionSupportKind.NO_TRANSACTION_LITERAL;

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected TransactionSupportKind transactionSupport = TRANSACTION_SUPPORT_EDEFAULT;
	/**
	 * This is true if the Transaction Support attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean transactionSupportESet = false;

	/**
	 * The default value of the '{@link #isReauthenticationSupport() <em>Reauthentication Support</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isReauthenticationSupport()
	 * @generated
	 * @ordered
	 */
	protected static final boolean REAUTHENTICATION_SUPPORT_EDEFAULT = false;

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected boolean reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT;
	/**
	 * This is true if the Reauthentication Support attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean reauthenticationSupportESet = false;

	/**
	 * The default value of the '{@link #getResourceAdapterClass() <em>Resource Adapter Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getResourceAdapterClass()
	 * @generated
	 * @ordered
	 */
	protected static final String RESOURCE_ADAPTER_CLASS_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getResourceAdapterClass() <em>Resource Adapter Class</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getResourceAdapterClass()
	 * @generated
	 * @ordered
	 */
	protected String resourceAdapterClass = RESOURCE_ADAPTER_CLASS_EDEFAULT;

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected EList securityPermissions = null;
	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected EList authenticationMechanisms = null;
	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	protected EList configProperties = null;
	/**
	 * The cached value of the '{@link #getOutboundResourceAdapter() <em>Outbound Resource Adapter</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOutboundResourceAdapter()
	 * @generated
	 * @ordered
	 */
	protected OutboundResourceAdapter outboundResourceAdapter = null;

	/**
	 * The cached value of the '{@link #getInboundResourceAdapter() <em>Inbound Resource Adapter</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getInboundResourceAdapter()
	 * @generated
	 * @ordered
	 */
	protected InboundResourceAdapter inboundResourceAdapter = null;

	/**
	 * The cached value of the '{@link #getAdminObjects() <em>Admin Objects</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAdminObjects()
	 * @generated
	 * @ordered
	 */
	protected EList adminObjects = null;

	protected ResourceAdapterImpl() {
		super();
	}
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return JcaPackage.Literals.RESOURCE_ADAPTER;
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 * Specifies the fully qualified name of the Java class that implements the javax.resource.spi.Managed-ConnectionFactory interface. This Java class is provided as part of resource adapter's implementation of connector architecture specified contracts.

	 */
	public String getManagedConnectionFactoryClass() {
		return managedConnectionFactoryClass;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public void setManagedConnectionFactoryClass(String newManagedConnectionFactoryClass) {
		String oldManagedConnectionFactoryClass = managedConnectionFactoryClass;
		managedConnectionFactoryClass = newManagedConnectionFactoryClass;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS, oldManagedConnectionFactoryClass, managedConnectionFactoryClass));
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 * Specifies the fully-qualified name of the ConnectionFactory interface supported by the resource adapter.

	 */
	public String getConnectionFactoryInterface() {
		return connectionFactoryInterface;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public void setConnectionFactoryInterface(String newConnectionFactoryInterface) {
		String oldConnectionFactoryInterface = connectionFactoryInterface;
		connectionFactoryInterface = newConnectionFactoryInterface;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE, oldConnectionFactoryInterface, connectionFactoryInterface));
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 * Specifies the fully-qualified name of the ConnectionFactory class that implements resource adapter specific ConnectionFactory interface.
	 */
	public String getConnectionFactoryImplClass() {
		return connectionFactoryImplClass;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public void setConnectionFactoryImplClass(String newConnectionFactoryImplClass) {
		String oldConnectionFactoryImplClass = connectionFactoryImplClass;
		connectionFactoryImplClass = newConnectionFactoryImplClass;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS, oldConnectionFactoryImplClass, connectionFactoryImplClass));
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 */
	public String getConnectionInterface() {
		return connectionInterface;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public void setConnectionInterface(String newConnectionInterface) {
		String oldConnectionInterface = connectionInterface;
		connectionInterface = newConnectionInterface;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE, oldConnectionInterface, connectionInterface));
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 * Specifies the fully-qualified name of the Connection interface supported by the resource adapter.
	 */
	public String getConnectionImplClass() {
		return connectionImplClass;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public void setConnectionImplClass(String newConnectionImplClass) {
		String oldConnectionImplClass = connectionImplClass;
		connectionImplClass = newConnectionImplClass;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS, oldConnectionImplClass, connectionImplClass));
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 * The transaction-support element specifies the level of transaction
	 * support provided by the resource adapter.
	 * The value of transaction-support must be one of the following:
	 *   NoTransaction
	 *   LocalTransaction
	 *   XATransaction
	 */
	public TransactionSupportKind getTransactionSupport() {
		return transactionSupport;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTransactionSupport(TransactionSupportKind newTransactionSupport) {
		TransactionSupportKind oldTransactionSupport = transactionSupport;
		transactionSupport = newTransactionSupport == null ? TRANSACTION_SUPPORT_EDEFAULT : newTransactionSupport;
		boolean oldTransactionSupportESet = transactionSupportESet;
		transactionSupportESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, transactionSupport, !oldTransactionSupportESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetTransactionSupport() {
		TransactionSupportKind oldTransactionSupport = transactionSupport;
		boolean oldTransactionSupportESet = transactionSupportESet;
		transactionSupport = TRANSACTION_SUPPORT_EDEFAULT;
		transactionSupportESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT, oldTransactionSupport, TRANSACTION_SUPPORT_EDEFAULT, oldTransactionSupportESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetTransactionSupport() {
		return transactionSupportESet;
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 * Specifies whether the resource adapter implementation supports re-authentication of existing Managed-Connection instance. Note that this information is for the resource adapter implementation and not for the underlying EIS instance.
	 */
	public boolean isReauthenticationSupport() {
		return reauthenticationSupport;
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	public void setReauthenticationSupport(boolean newReauthenticationSupport) {
		boolean oldReauthenticationSupport = reauthenticationSupport;
		reauthenticationSupport = newReauthenticationSupport;
		boolean oldReauthenticationSupportESet = reauthenticationSupportESet;
		reauthenticationSupportESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, reauthenticationSupport, !oldReauthenticationSupportESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetReauthenticationSupport() {
		boolean oldReauthenticationSupport = reauthenticationSupport;
		boolean oldReauthenticationSupportESet = reauthenticationSupportESet;
		reauthenticationSupport = REAUTHENTICATION_SUPPORT_EDEFAULT;
		reauthenticationSupportESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT, oldReauthenticationSupport, REAUTHENTICATION_SUPPORT_EDEFAULT, oldReauthenticationSupportESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetReauthenticationSupport() {
		return reauthenticationSupportESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getResourceAdapterClass() {
		return resourceAdapterClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setResourceAdapterClass(String newResourceAdapterClass) {
		String oldResourceAdapterClass = resourceAdapterClass;
		resourceAdapterClass = newResourceAdapterClass;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS, oldResourceAdapterClass, resourceAdapterClass));
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 */
	public EList getSecurityPermissions() {
		if (securityPermissions == null) {
			securityPermissions = new EObjectContainmentEList(SecurityPermission.class, this, JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS);
		}
		return securityPermissions;
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 */
	public EList getAuthenticationMechanisms() {
		if (authenticationMechanisms == null) {
			authenticationMechanisms = new EObjectContainmentEList(AuthenticationMechanism.class, this, JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS);
		}
		return authenticationMechanisms;
	}

	/**
	 * @generated This field/method will be replaced during code generation 
	 */
	public EList getConfigProperties() {
		if (configProperties == null) {
			configProperties = new EObjectContainmentEList(ConfigProperty.class, this, JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES);
		}
		return configProperties;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public OutboundResourceAdapter getOutboundResourceAdapter() {
		return outboundResourceAdapter;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetOutboundResourceAdapter(OutboundResourceAdapter newOutboundResourceAdapter, NotificationChain msgs) {
		OutboundResourceAdapter oldOutboundResourceAdapter = outboundResourceAdapter;
		outboundResourceAdapter = newOutboundResourceAdapter;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, oldOutboundResourceAdapter, newOutboundResourceAdapter);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOutboundResourceAdapter(OutboundResourceAdapter newOutboundResourceAdapter) {
		if (newOutboundResourceAdapter != outboundResourceAdapter) {
			NotificationChain msgs = null;
			if (outboundResourceAdapter != null)
				msgs = ((InternalEObject)outboundResourceAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, null, msgs);
			if (newOutboundResourceAdapter != null)
				msgs = ((InternalEObject)newOutboundResourceAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, null, msgs);
			msgs = basicSetOutboundResourceAdapter(newOutboundResourceAdapter, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER, newOutboundResourceAdapter, newOutboundResourceAdapter));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public InboundResourceAdapter getInboundResourceAdapter() {
		return inboundResourceAdapter;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetInboundResourceAdapter(InboundResourceAdapter newInboundResourceAdapter, NotificationChain msgs) {
		InboundResourceAdapter oldInboundResourceAdapter = inboundResourceAdapter;
		inboundResourceAdapter = newInboundResourceAdapter;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, oldInboundResourceAdapter, newInboundResourceAdapter);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setInboundResourceAdapter(InboundResourceAdapter newInboundResourceAdapter) {
		if (newInboundResourceAdapter != inboundResourceAdapter) {
			NotificationChain msgs = null;
			if (inboundResourceAdapter != null)
				msgs = ((InternalEObject)inboundResourceAdapter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, null, msgs);
			if (newInboundResourceAdapter != null)
				msgs = ((InternalEObject)newInboundResourceAdapter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, null, msgs);
			msgs = basicSetInboundResourceAdapter(newInboundResourceAdapter, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER, newInboundResourceAdapter, newInboundResourceAdapter));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList getAdminObjects() {
		if (adminObjects == null) {
			adminObjects = new EObjectContainmentEList(AdminObject.class, this, JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS);
		}
		return adminObjects;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS:
				return ((InternalEList)getSecurityPermissions()).basicRemove(otherEnd, msgs);
			case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS:
				return ((InternalEList)getAuthenticationMechanisms()).basicRemove(otherEnd, msgs);
			case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES:
				return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs);
			case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER:
				return basicSetOutboundResourceAdapter(null, msgs);
			case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER:
				return basicSetInboundResourceAdapter(null, msgs);
			case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS:
				return ((InternalEList)getAdminObjects()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS:
				return getManagedConnectionFactoryClass();
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE:
				return getConnectionFactoryInterface();
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS:
				return getConnectionFactoryImplClass();
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE:
				return getConnectionInterface();
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS:
				return getConnectionImplClass();
			case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT:
				return getTransactionSupport();
			case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT:
				return isReauthenticationSupport() ? Boolean.TRUE : Boolean.FALSE;
			case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS:
				return getResourceAdapterClass();
			case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS:
				return getSecurityPermissions();
			case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS:
				return getAuthenticationMechanisms();
			case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES:
				return getConfigProperties();
			case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER:
				return getOutboundResourceAdapter();
			case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER:
				return getInboundResourceAdapter();
			case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS:
				return getAdminObjects();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS:
				setManagedConnectionFactoryClass((String)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE:
				setConnectionFactoryInterface((String)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS:
				setConnectionFactoryImplClass((String)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE:
				setConnectionInterface((String)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS:
				setConnectionImplClass((String)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT:
				setTransactionSupport((TransactionSupportKind)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT:
				setReauthenticationSupport(((Boolean)newValue).booleanValue());
				return;
			case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS:
				setResourceAdapterClass((String)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS:
				getSecurityPermissions().clear();
				getSecurityPermissions().addAll((Collection)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS:
				getAuthenticationMechanisms().clear();
				getAuthenticationMechanisms().addAll((Collection)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES:
				getConfigProperties().clear();
				getConfigProperties().addAll((Collection)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER:
				setOutboundResourceAdapter((OutboundResourceAdapter)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER:
				setInboundResourceAdapter((InboundResourceAdapter)newValue);
				return;
			case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS:
				getAdminObjects().clear();
				getAdminObjects().addAll((Collection)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS:
				setManagedConnectionFactoryClass(MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE:
				setConnectionFactoryInterface(CONNECTION_FACTORY_INTERFACE_EDEFAULT);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS:
				setConnectionFactoryImplClass(CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE:
				setConnectionInterface(CONNECTION_INTERFACE_EDEFAULT);
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS:
				setConnectionImplClass(CONNECTION_IMPL_CLASS_EDEFAULT);
				return;
			case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT:
				unsetTransactionSupport();
				return;
			case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT:
				unsetReauthenticationSupport();
				return;
			case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS:
				setResourceAdapterClass(RESOURCE_ADAPTER_CLASS_EDEFAULT);
				return;
			case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS:
				getSecurityPermissions().clear();
				return;
			case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS:
				getAuthenticationMechanisms().clear();
				return;
			case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES:
				getConfigProperties().clear();
				return;
			case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER:
				setOutboundResourceAdapter((OutboundResourceAdapter)null);
				return;
			case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER:
				setInboundResourceAdapter((InboundResourceAdapter)null);
				return;
			case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS:
				getAdminObjects().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case JcaPackage.RESOURCE_ADAPTER__MANAGED_CONNECTION_FACTORY_CLASS:
				return MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT == null ? managedConnectionFactoryClass != null : !MANAGED_CONNECTION_FACTORY_CLASS_EDEFAULT.equals(managedConnectionFactoryClass);
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_INTERFACE:
				return CONNECTION_FACTORY_INTERFACE_EDEFAULT == null ? connectionFactoryInterface != null : !CONNECTION_FACTORY_INTERFACE_EDEFAULT.equals(connectionFactoryInterface);
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_FACTORY_IMPL_CLASS:
				return CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT == null ? connectionFactoryImplClass != null : !CONNECTION_FACTORY_IMPL_CLASS_EDEFAULT.equals(connectionFactoryImplClass);
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_INTERFACE:
				return CONNECTION_INTERFACE_EDEFAULT == null ? connectionInterface != null : !CONNECTION_INTERFACE_EDEFAULT.equals(connectionInterface);
			case JcaPackage.RESOURCE_ADAPTER__CONNECTION_IMPL_CLASS:
				return CONNECTION_IMPL_CLASS_EDEFAULT == null ? connectionImplClass != null : !CONNECTION_IMPL_CLASS_EDEFAULT.equals(connectionImplClass);
			case JcaPackage.RESOURCE_ADAPTER__TRANSACTION_SUPPORT:
				return isSetTransactionSupport();
			case JcaPackage.RESOURCE_ADAPTER__REAUTHENTICATION_SUPPORT:
				return isSetReauthenticationSupport();
			case JcaPackage.RESOURCE_ADAPTER__RESOURCE_ADAPTER_CLASS:
				return RESOURCE_ADAPTER_CLASS_EDEFAULT == null ? resourceAdapterClass != null : !RESOURCE_ADAPTER_CLASS_EDEFAULT.equals(resourceAdapterClass);
			case JcaPackage.RESOURCE_ADAPTER__SECURITY_PERMISSIONS:
				return securityPermissions != null && !securityPermissions.isEmpty();
			case JcaPackage.RESOURCE_ADAPTER__AUTHENTICATION_MECHANISMS:
				return authenticationMechanisms != null && !authenticationMechanisms.isEmpty();
			case JcaPackage.RESOURCE_ADAPTER__CONFIG_PROPERTIES:
				return configProperties != null && !configProperties.isEmpty();
			case JcaPackage.RESOURCE_ADAPTER__OUTBOUND_RESOURCE_ADAPTER:
				return outboundResourceAdapter != null;
			case JcaPackage.RESOURCE_ADAPTER__INBOUND_RESOURCE_ADAPTER:
				return inboundResourceAdapter != null;
			case JcaPackage.RESOURCE_ADAPTER__ADMIN_OBJECTS:
				return adminObjects != null && !adminObjects.isEmpty();
		}
		return super.eIsSet(featureID);
	}

	/**
	 * @generated This field/method will be replaced during code generation.
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (managedConnectionFactoryClass: "); //$NON-NLS-1$
		result.append(managedConnectionFactoryClass);
		result.append(", connectionFactoryInterface: "); //$NON-NLS-1$
		result.append(connectionFactoryInterface);
		result.append(", connectionFactoryImplClass: "); //$NON-NLS-1$
		result.append(connectionFactoryImplClass);
		result.append(", connectionInterface: "); //$NON-NLS-1$
		result.append(connectionInterface);
		result.append(", connectionImplClass: "); //$NON-NLS-1$
		result.append(connectionImplClass);
		result.append(", transactionSupport: "); //$NON-NLS-1$
		if (transactionSupportESet) result.append(transactionSupport); else result.append("<unset>"); //$NON-NLS-1$
		result.append(", reauthenticationSupport: "); //$NON-NLS-1$
		if (reauthenticationSupportESet) result.append(reauthenticationSupport); else result.append("<unset>"); //$NON-NLS-1$
		result.append(", resourceAdapterClass: "); //$NON-NLS-1$
		result.append(resourceAdapterClass);
		result.append(')');
		return result.toString();
	}

}

Back to the top