summaryrefslogtreecommitdiffstats
path: root/sandbox/jboynes/sdo/tools/templates/models/SDOClass.javajet
blob: 8daf6a9904690387a1acd485af0594d3436181d3 (plain)
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
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
<%@ jet package="org.apache.tuscany.sdo.generate.templates.model" imports="org.eclipse.emf.codegen.util.* java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="SDOClass" version="$Id: Class.javajet,v 1.41 2006/02/15 19:58:39 emerks Exp $" %>
<%
/**
 *
 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 */
%>
<%GenClass genClass = (GenClass)((Object[])argument)[0]; GenPackage genPackage = genClass.getGenPackage(); GenModel genModel=genPackage.getGenModel();%>
<%boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);%>
<%String publicStaticFinalFlag = isImplementation ? "public static final " : "";%>
<%@ include file="../Header.javajetinc"%>
<%if (isInterface) {%>
package <%=genPackage.getInterfacePackageName()%>;
<%} else {%>
package <%=genPackage.getClassPackageName()%>;
<%}%>

<%genModel.markImportLocation(stringBuffer, genPackage);%>

<%if (isInterface) {%>
/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b><%=genClass.getFormattedName()%></b></em>'.
 * <!-- end-user-doc -->
<%if (genClass.hasDocumentation()) {%>
 *
 * <!-- begin-model-doc -->
 * <%=genClass.getDocumentation(genModel.getIndentation(stringBuffer))%>
 * <!-- end-model-doc -->
<%}%>
 *
<%if (!genClass.getGenFeatures().isEmpty()) {%>
 * <p>
 * The following features are supported:
 * <ul>
<%for (Iterator i=genClass.getGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
  <%if (!genFeature.isSuppressedGetVisibility()) {%>
 *   <li>{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}</li>
  <%}%>
<%}%>
 * </ul>
 * </p>
<%}%>
 *
<%if (!genModel.isSuppressEMFMetaData()) {%>
 * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genClass.getClassifierAccessorName()%>()
<%}%>
<%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genClass.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%>
 * @model <%=modelInfo%>
<%} else {%>
 *        <%=modelInfo%>
<%}} if (first) {%>
 * @model
<%}}%>
<%if (genClass.needsRootExtendsInterfaceExtendsTag()) {%>
 * @extends <%=genModel.getImportedName(genModel.getRootExtendsInterface())%>
<%}%>
 * @generated
 */
<%} else {%>
/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b><%=genClass.getFormattedName()%></b></em>'.
 * <!-- end-user-doc -->
 * <p>
<%if (!genClass.getImplementedGenFeatures().isEmpty()) {%>
 * The following features are implemented:
 * <ul>
<%for (Iterator i=genClass.getImplementedGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
 *   <li>{@link <%=genClass.getQualifiedClassName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}</li>
<%}%>
 * </ul>
<%}%>
 * </p>
 *
 * @generated
 */
<%}%>
<%if (isImplementation) {%>
public<%if (genClass.isAbstract()) {%> abstract<%}%> class <%=genClass.getClassName()%><%=genClass.getClassExtends()%><%=genClass.getClassImplements()%>
<%} else {%>
public interface <%=genClass.getInterfaceName()%><%=genClass.getInterfaceExtends()%>
<%}%>
{
<%if (genModel.getCopyrightText() != null) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	<%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> copyright = "<%=genModel.getCopyrightText()%>";<%=genModel.getNonNLS()%>

<%}%>
<%if (isImplementation && genModel.getDriverNumber() != null) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final <%=genModel.getImportedName("java.lang.String")%> mofDriverNumber = "<%=genModel.getDriverNumber()%>";<%=genModel.getNonNLS()%>

<%}%>
<%if (isImplementation && genClass.isJavaIOSerializable()) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final long serialVersionUID = 1L;

<%}%>
<%if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();%>
  <%if (eVirtualValuesField != null) {%>
	/**
	 * An array of objects representing the values of non-primitive features.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected Object[] <%=eVirtualValuesField%> = null;

  <%}%>
  <%{ List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());%>
    <%if (!eVirtualIndexBitFields.isEmpty()) {%>
      <%for (Iterator i = eVirtualIndexBitFields.iterator(); i.hasNext();) { String eVirtualIndexBitField = (String)i.next();%>
	/**
	 * A bit field representing the indices of non-primitive feature values.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected int <%=eVirtualIndexBitField%> = 0;

      <%}%>
    <%}%>
  <%}%>
<%}%>
<%if (isImplementation && genClass.isModelRoot() && genModel.isBooleanFlagsEnabled() && genModel.getBooleanFlagsReservedBits() == -1) {%>
	/**
	 * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected int <%=genModel.getBooleanFlagsField()%> = 0;

<%}%>
<%if (isImplementation && !genModel.isReflectiveDelegation()) {%>
  <%for (Iterator f=genClass.getAllGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next();%>
	/**
	 * The feature id for the '<em><b><%=genFeature.getFormattedName()%></b></em>' <%=genFeature.getFeatureKind()%>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
    <%String featureValue = "";
    List allFeatures = genClass.getAllGenFeatures();
    int g = allFeatures.indexOf(genFeature);
    GenClass base = genClass.getBaseGenClass();
    if (base == null)
    {
      featureValue = Integer.toString(g);
    } else {
      int baseCount = base.getFeatureCount();    
      if (g < baseCount)
      {
        featureValue = base.getClassName() + "." + genFeature.getUpperName();
      } else {
        String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
        featureValue =  baseCountID + " + " + Integer.toString(g - baseCount);
       }
     }%>	 
	public final static int <%=genFeature.getUpperName()%> = <%=featureValue%>;

  <%}%>
	/**
	 * This represents the number of properties for this type.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	<%String featureCount = "";
	GenClass base = genClass.getBaseGenClass();
    if (base == null)
    {
      featureCount = Integer.toString(genClass.getFeatureCount());
    } 
    else {
      String baseCountID = base.getClassName() + "." + "SDO_PROPERTY_COUNT";
      featureCount = baseCountID + " + " + Integer.toString(genClass.getFeatureCount() - base.getFeatureCount());
    }%>
	public final static int SDO_PROPERTY_COUNT = <%=featureCount%>;

  <%for (Iterator i=genClass.getDeclaredFieldGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
<%@ include file="Class/declaredFieldGenFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
    <%if (genFeature.isListType() || genFeature.isReferenceType()) {%>
      <%if (genClass.isField(genFeature)) {%>
	/**
	 * The cached value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #<%=genFeature.getGetAccessor()%>()
	 * @generated
	 * @ordered
	 */
	
	protected <%=genModel.getImportedName(genFeature.getType())%> <%=genFeature.getSafeName()%> = null;
	
      <%}%>
      <%if (genModel.isArrayAccessors() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {%>
	/**
	 * The empty value for the '{@link #<%=genFeature.getGetArrayAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' array accessor.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #<%=genFeature.getGetArrayAccessor()%>()
	 * @generated
	 * @ordered
	 */
	protected static final <%=genFeature.getListItemType()%>[] <%=genFeature.getUpperName()%>_EEMPTY_ARRAY = new <%=genFeature.getListItemType()%> [0];

      <%}%>
    <%} else {%>
      <%if (!genFeature.isVolatile() || !genModel.isReflectiveDelegation() && (!genFeature.hasDelegateFeature() || !genFeature.isUnsettable())) {%>
	/**
	 * The default value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #<%=genFeature.getGetAccessor()%>()
	 * @generated
	 * @ordered
	 */
	protected static final <%=genFeature.getImportedType()%> <%=genFeature.getUpperName()%>_DEFAULT_ = <%=genFeature.getStaticDefaultValue()%>;<%=genModel.getNonNLS(genFeature.getStaticDefaultValue())%>

      <%}%>
      <%if (genClass.isField(genFeature)) {%>
        <%if (genClass.isFlag(genFeature)) {%>
          <%if (genClass.getFlagIndex(genFeature) > 31 && genClass.getFlagIndex(genFeature) % 32 == 0) {%>
	/**
	 * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected int <%=genClass.getFlagsField(genFeature)%> = 0;

          <%}%>
	/**
	 * The flag representing the value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #<%=genFeature.getGetAccessor()%>()
	 * @generated
	 * @ordered
	 */
	protected static final int <%=genFeature.getUpperName()%>_EFLAG = 1 <%="<< " + genClass.getFlagIndex(genFeature) % 32 %>;

        <%} else {%>
	/**
	 * The cached value of the '{@link #<%=genFeature.getGetAccessor()%>() <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #<%=genFeature.getGetAccessor()%>()
	 * @generated
	 * @ordered
	 */
	protected <%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = <%=genFeature.getUpperName()%>_DEFAULT_;

        <%}%>
      <%}%>
    <%}%>
    <%if (genClass.isESetField(genFeature)) {%>
      <%if (genClass.isESetFlag(genFeature)) {%>
        <%if (genClass.getESetFlagIndex(genFeature) > 31 && genClass.getESetFlagIndex(genFeature) % 32 == 0) {%>
	/**
	 * An additional set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected int <%=genClass.getESetFlagsField(genFeature)%> = 0;

        <%}%>
	/**
	 * The flag representing whether the <%=genFeature.getFormattedName()%> <%=genFeature.getFeatureKind()%> has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected static final int <%=genFeature.getUpperName()%>_ESETFLAG = 1 <%="<< " + genClass.getESetFlagIndex(genFeature) % 32 %>;

      <%} else {%>
	/**
	 * This is true if the <%=genFeature.getFormattedName()%> <%=genFeature.getFeatureKind()%> has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean <%=genFeature.getUncapName()%>_set_ = false;

      <%}%>
    <%}%>
  <%}%>
<%@ include file="Class/declaredFieldGenFeature.insert.javajetinc" fail="silent" %>
<%@ end %><%//Class/declaredFieldGenFeature.override.javajetinc%>
<%}%>
<%if (isImplementation) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected <%=genClass.getClassName()%>()
	{
		super();
  <%for (Iterator i=genClass.getFlagGenFeatures("true").iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
		<%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG;
  <%}%>
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public <%=genModel.getImportedName("commonj.sdo.Type")%> getType()
	{
		return ((<%=genPackage.getImportedFactoryClassName()%>)<%=genPackage.getImportedFactoryInterfaceName()%>.INSTANCE).get<%=genClass.getClassifierAccessorName()%>();
	}

<%}%>
<%for (Iterator i=(isImplementation ? genClass.getImplementedGenFeatures() : genClass.getDeclaredGenFeatures()).iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
<%@ include file="Class/genFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
  <%if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
    <%if (!isImplementation) {%>
	<%=genFeature.getListItemType()%>[] <%=genFeature.getGetArrayAccessor()%>();

    <%} else {%>
	public <%=genFeature.getListItemType()%>[] <%=genFeature.getGetArrayAccessor()%>()
	{
      <%if (genFeature.isVolatile()) {%>
		<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%> list = (<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%>)<%=genFeature.getGetAccessor()%>();
		if (list.isEmpty()) return <%=genFeature.getUpperName()%>_EEMPTY_ARRAY;
      <%} else {%>
		if (<%=genFeature.getSafeName()%> == null || <%=genFeature.getSafeName()%>.isEmpty()) return <%=genFeature.getUpperName()%>_EEMPTY_ARRAY;
		<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%> list = (<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%>)<%=genFeature.getSafeName()%>;
      <%}%>
		list.shrink();
		return (<%=genFeature.getListItemType()%>[])list.data();
	}

    <%}%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
    <%if (!isImplementation) {%>
	<%=genFeature.getListItemType()%> get<%=genFeature.getAccessorName()%>(int index);
    <%} else {%>
	public <%=genFeature.getListItemType()%> get<%=genFeature.getAccessorName()%>(int index)
	{
		return (<%=genFeature.getListItemType()%>)<%=genFeature.getGetAccessor()%>().get(index);
	}
    <%}%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
    <%if (!isImplementation) {%>
	int get<%=genFeature.getAccessorName()%>Length();

    <%} else {%>
	public int get<%=genFeature.getAccessorName()%>Length()
	{
      <%if (genFeature.isVolatile()) {%>
		return <%=genFeature.getGetAccessor()%>().size();
      <%} else {%>
		return <%=genFeature.getSafeName()%> == null ? 0 : <%=genFeature.getSafeName()%>.size();
      <%}%>
	}

    <%}%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
    <%if (!isImplementation) {%>
	void set<%=genFeature.getAccessorName()%>(<%=genFeature.getListItemType()%>[] new<%=genFeature.getCapName()%>);

    <%} else {%>
	public void set<%=genFeature.getAccessorName()%>(<%=genFeature.getListItemType()%>[] new<%=genFeature.getCapName()%>)
	{
		((<%=genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")%>)<%=genFeature.getGetAccessor()%>()).setData(new<%=genFeature.getCapName()%>.length, new<%=genFeature.getCapName()%>);
	}

    <%}%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
    <%if (!isImplementation) {%>
	void set<%=genFeature.getAccessorName()%>(int index, <%=genFeature.getListItemType()%> element);

    <%} else {%>
	public void set<%=genFeature.getAccessorName()%>(int index, <%=genFeature.getListItemType()%> element)
	{
		<%=genFeature.getGetAccessor()%>().set(index, element);
	}

    <%}%>
  <%}%>
  <%if (genFeature.isGet() && (isImplementation || !genFeature.isSuppressedGetVisibility())) {%>
<%@ include file="Class/getGenFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
<%if (isInterface) {%>
	/**
	 * Returns the value of the '<em><b><%=genFeature.getFormattedName()%></b></em>' <%=genFeature.getFeatureKind()%>.
    <%if (genFeature.isListType()) {%>
      <%if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature(); %>
	 * The key is of type <%if (keyFeature.isListType()) {%>list of {@link <%=keyFeature.getQualifiedListItemType()%>}<%} else {%>{@link <%=keyFeature.getType()%>}<%}%>,
	 * and the value is of type <%if (valueFeature.isListType()) {%>list of {@link <%=valueFeature.getQualifiedListItemType()%>}<%} else {%>{@link <%=valueFeature.getType()%>}<%}%>,
      <%} else if (!genFeature.isWrappedFeatureMapType() && !(genModel.isSuppressEMFMetaData() && "org.eclipse.emf.ecore.EObject".equals(genFeature.getQualifiedListItemType()))) {%>
	 * The list contents are of type {@link <%=genFeature.getQualifiedListItemType()%>}.
      <%}%>
    <%} else if (genFeature.isSetDefaultValue()) {%>
	 * The default value is <code><%=genFeature.getDefaultValue()%></code>.
    <%}%>
    <%if (genFeature.getTypeGenEnum() != null) {%>
	 * The literals are from the enumeration {@link <%=genFeature.getTypeGenEnum().getQualifiedName()%>}.
    <%}%>
    <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %>
      <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%>
	 * It is bidirectional and its opposite is '{@link <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=reverseGenFeature.getGetAccessor()%> <em><%=reverseGenFeature.getFormattedName()%></em>}'.
      <%}%>
    <%}%>
	 * <!-- begin-user-doc -->
    <%if (!genFeature.hasDocumentation()) {%>
	 * <p>
	 * If the meaning of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%> isn't clear,
	 * there really should be more of a description here...
	 * </p>
    <%}%>
	 * <!-- end-user-doc -->
    <%if (genFeature.hasDocumentation()) {%>
	 * <!-- begin-model-doc -->
	 * <%=genFeature.getDocumentation(genModel.getIndentation(stringBuffer))%>
	 * <!-- end-model-doc -->
    <%}%>
	 * @return the value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%>.
    <%if (genFeature.getTypeGenEnum() != null) {%>
	 * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%>
    <%}%>
    <%if (genFeature.isUnsettable()) {%>
      <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
	 * @see #isSet<%=genFeature.getAccessorName()%>()
      <%}%>
      <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%>
	 * @see #unset<%=genFeature.getAccessorName()%>()
      <%}%>
    <%}%>
    <%if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%>
	 * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>)
    <%}%>
    <%if (!genModel.isSuppressEMFMetaData()) {%>
	 * @see <%=genPackage.getQualifiedPackageInterfaceName()%>#get<%=genFeature.getFeatureAccessorName()%>()
    <%}%>
    <%if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); %>
      <%if (!reverseGenFeature.isSuppressedGetVisibility()) {%>
	 * @see <%=reverseGenFeature.getGenClass().getQualifiedInterfaceName()%>#<%=reverseGenFeature.getGetAccessor()%>
      <%}%>
    <%}%>
    <%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%>
	 * @model <%=modelInfo%>
    <%} else {%>
	 *        <%=modelInfo%>
    <%}} if (first) {%>
	 * @model
    <%}}%>
	 * @generated
	 */
<%} else {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
<%}%>
<%if (!isImplementation) {%>
	<%=genFeature.getImportedType()%> <%=genFeature.getGetAccessor()%>();

<%} else {%>
	public <%=genFeature.getImportedType()%> <%=genFeature.getGetAccessor()%>()
	{
<%@ include file="Class/getGenFeature.pre.insert.javajetinc" fail="silent" %>
    <%if (genModel.isReflectiveDelegation()) {%>
		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(<%=genFeature.getQualifiedFeatureAccessor()%>, true)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
    <%} else if (!genFeature.isVolatile()) {%>
      <%if (genFeature.isListType()) {%>
        <%if (genModel.isVirtualDelegation()) {%>
		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
        <%}%>
		if (<%=genFeature.getSafeName()%> == null)
		{
        <%if (genModel.isVirtualDelegation()) {%>
			eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%> = new <%=genClass.getListConstructor(genFeature)%>);
        <%} else {
				if (genFeature.getType().equals("commonj.sdo.Sequence")){%>
		  <%=genFeature.getSafeName()%> = createSequence(<%=genFeature.getUpperName()%>);<%} else {%>
		  <%=genFeature.getSafeName()%> = createPropertyList(ListKind.CONTAINMENT, <%=genFeature.getListItemType()%>.class, <%=genFeature.getUpperName()%>);<%}}%>
		}
		return <%=genFeature.getSafeName()%><%=genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""%>;
      <%} else if (genFeature.isContainer()) {%>
		if (eContainerFeatureID != <%=genFeature.getUpperName()%>) return null;
		return (<%=genFeature.getImportedType()%>)eContainer();
      <%} else {%>
        <%if (genFeature.isResolveProxies()) {%>
          <%if (genModel.isVirtualDelegation()) {%>
		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isReferenceType()) {%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>);
          <%}%>
		if (<%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeNameAsEObject()%>.isProxy())
		{
			<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> old<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>;
			<%=genFeature.getSafeName()%> = <%=genFeature.getNonEObjectInternalTypeCast()%>eResolveProxy(old<%=genFeature.getCapName()%>);
			if (<%=genFeature.getSafeName()%> != old<%=genFeature.getCapName()%>)
			{
          <%if (genFeature.isEffectiveContains()) {%>
				<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> new<%=genFeature.getCapName()%> = (<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>;
          <%if (!genFeature.isBidirectional()) {%>
				ChangeContext changeContext = old<%=genFeature.getCapName()%>.inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, null);
          <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
				<%=genModel.getImportedName("org.eclipse.emf.common.notify.ChangeContext")%> changeContext =  old<%=genFeature.getCapName()%>.inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, null);
          <%}%>
				if (new<%=genFeature.getCapName()%>.eInternalContainer() == null)
				{
          <%if (!genFeature.isBidirectional()) {%>
					changeContext = new<%=genFeature.getCapName()%>.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
          <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
					changeContext =  new<%=genFeature.getCapName()%>.eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
          <%}%>
				}
				if (changeContext != null) dispatch(changeContext);
          <%} else if (genModel.isVirtualDelegation()) {%>
				eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%>);
          <%}%>
          <%if (!genModel.isSuppressNotification()) {%>
				if (isNotifying())
					notify(ChangeKind.RESOLVE, <%=genFeature.getUpperName()%>, old<%=genFeature.getCapName()%>, <%=genFeature.getSafeName()%>);
          <%}%>
			}
		}
        <%}%>
        <%if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		return (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isReferenceType()) {%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>);
        <%} else if (genClass.isFlag(genFeature)) {%>
		return (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
        <%} else {%>
		return <%=genFeature.getSafeName()%>;
        <%}%>
      <%}%>
    <%} else {//volatile%>
      <%if (genFeature.isResolveProxies() && !genFeature.isListType()) {%>
		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = basicGet<%=genFeature.getAccessorName()%>();
		return <%=genFeature.getSafeName()%> != null && <%=genFeature.getSafeName()%>.isProxy() ? <%=genFeature.getNonEObjectInternalTypeCast()%>eResolveProxy((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>) : <%=genFeature.getSafeName()%>;
      <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
        <%if (genFeature.isFeatureMapType()) {%>
          <%if (delegateFeature.isWrappedFeatureMapType()) {%>
		return create<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
          <%} else {%>
		return (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>()).list(<%=genFeature.getQualifiedFeatureAccessor()%>);
          <%}%>
        <%} else if (genFeature.isListType()) {%>
          <%if (delegateFeature.isWrappedFeatureMapType()) {%>
          return get<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);

          <%} else {%>
		return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>)get<%=delegateFeature.getAccessorName()%>()).list(<%=genFeature.getQualifiedFeatureAccessor()%>);
          <%}%>
        <%} else {%>
          <%if (delegateFeature.isWrappedFeatureMapType()) {%>
		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>)<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
          <%} else {%>
		return <%if (genFeature.isPrimitiveType()) {%>(<%}%>(<%=genFeature.getObjectType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);<%if (genFeature.isPrimitiveType()) {%>).<%=genFeature.getPrimitiveValueFunction()%>()<%}%>;
          <%}%>
        <%}%>
      <%} else {%>
<%@ include file="Class/getGenFeature.TODO.override.javajetinc" fail="alternative" %>
<%@ start %>
		// TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
<%@ end %><%//Class/getGenFeature.todo.override.javajetinc%>
      <%}%>
    <%}%>
	}
<%}%>
<%@ end %><%//Class/getGenFeature.override.javajetinc%>
  <%}%>
  <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) {%>
<%@ include file="Class/basicGetGenFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public <%=genFeature.getImportedType()%> basicGet<%=genFeature.getAccessorName()%>()
	{
<%@ include file="Class/basicGetGenFeature.pre.insert.javajetinc" fail="silent" %>
    <%if (genFeature.isContainer()) {%>
		if (eContainerFeatureID != <%=genFeature.getUpperName()%>) return null;
		return (<%=genFeature.getImportedType()%>)eInternalContainer();
    <%} else if (!genFeature.isVolatile()) {%>
      <%if (genModel.isVirtualDelegation()) {%>
		return (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
      <%} else {%>
		return <%=genFeature.getSafeName()%>;
      <%}%>
    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
      <%if (delegateFeature.isWrappedFeatureMapType()) {%>
		return (<%=genFeature.getImportedType()%>)get(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
      <%} else {%>
		return (<%=genFeature.getImportedType()%>)get<%=delegateFeature.getAccessorName()%>().get(<%=genFeature.getQualifiedFeatureAccessor()%>, false);
      <%}%>
    <%} else {%>
<%@ include file="Class/basicGetGenFeature.TODO.override.javajetinc" fail="alternative" %>
<%@ start %>
		// TODO: implement this method to return the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
		// -> do not perform proxy resolution
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
<%@ end %><%//Class/basicGetGenFeature.todo.override.javajetinc%>
    <%}%>
	}

<%@ end %><%//Class/basicGetGenFeature.override.javajetinc%>
  <%}%>
  <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) {%>
<%@ include file="Class/basicSetGenFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ChangeContext basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedInternalType()%> new<%=genFeature.getCapName()%>, ChangeContext changeContext)
	{
    <%if (!genFeature.isVolatile()) {%>
<%@ include file="Class/basicSetGenFeature.pre.insert.javajetinc" fail="silent" %>
      <%if (genModel.isVirtualDelegation()) {%>
		Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>);
      <%} else {%>
		<%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
		<%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%>;
      <%}%>
      <%if (genFeature.isUnsettable()) {%>
        <%if (genModel.isVirtualDelegation()) {%>
		boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE;
        <%} else if (genClass.isESetFlag(genFeature)) {%>
		boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
		<%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
        <%} else {%>
		boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
		<%=genFeature.getUncapName()%>_set_ = true;
        <%}%>
      <%}%>
      <%if (!genModel.isSuppressNotification()) {%>
		if (isNotifying())
		{
         <%if (genFeature.isUnsettable()) {%>
			addNotification(this, ChangeKind.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>, changeContext);
         <%} else {%>
			addNotification(this, ChangeKind.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, new<%=genFeature.getCapName()%>, changeContext);
         <%}%>
		}
      <%}%>
<%@ include file="Class/basicSetGenFeature.post.insert.javajetinc" fail="silent" %>
		return changeContext;
    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
      <%if (delegateFeature.isWrappedFeatureMapType()) {%>
		return basicAdd(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, changeContext);
      <%} else {%>
		return basicAdd(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, changeContext);
      <%}%>
    <%} else {%>
<%@ include file="Class/basicSetGenFeature.TODO.override.javajetinc" fail="alternative" %>
<%@ start %>
		// TODO: implement this method to set the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
		// -> this method is automatically invoked to keep the containment relationship in synch
		// -> do not modify other features
		// -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
<%@ end %><%//Class/basicSetGenFeature.todo.override.javajetinc%>
    <%}%>
	}

<%@ end %><%//Class/basicSetGenFeature.override.javajetinc%>
  <%}%>
  <%if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) {%>
<%@ include file="Class/setGenFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
<%if (isInterface) { %>
	/**
	 * Sets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%>.
    <%if (genFeature.isEnumType()) {%>
	 * @see <%=genFeature.getTypeGenEnum().getQualifiedName()%>
    <%}%>
    <%if (genFeature.isUnsettable()) {%>
      <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
	 * @see #isSet<%=genFeature.getAccessorName()%>()
      <%}%>
      <%if (!genFeature.isSuppressedUnsetVisibility()) {%>
	 * @see #unset<%=genFeature.getAccessorName()%>()
      <%}%>
    <%}%>
	 * @see #<%=genFeature.getGetAccessor()%>()
	 * @generated
	 */
<%} else {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
<%}%>
<%if (!isImplementation) { %>
	void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%> value);

<%} else {%>
	public void set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%> new<%=genFeature.getCapName()%>)
	{
<%@ include file="Class/setGenFeature.pre.insert.javajetinc" fail="alternative" %>
    <%if (genModel.isReflectiveDelegation()) {%>
		_set_(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()) {%>)<%}%>);
    <%} else if (!genFeature.isVolatile()) {%>
      <%if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
		if (new<%=genFeature.getCapName()%> != eInternalContainer() || (eContainerFeatureID != <%=genFeature.getUpperName()%> && new<%=genFeature.getCapName()%> != null))
		{
			if (<%=genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")%>.isAncestor(this, <%=genFeature.getEObjectCast()%>new<%=genFeature.getCapName()%>))
				throw new <%=genModel.getImportedName("java.lang.IllegalArgumentException")%>("Recursive containment not allowed for " + toString());<%=genModel.getNonNLS()%>
			ChangeContext changeContext = null;
			if (eInternalContainer() != null)
				changeContext = eBasicRemoveFromContainer(changeContext);
			if (new<%=genFeature.getCapName()%> != null)
				changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>).eInverseAdd(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
			changeContext = eBasicSetContainer((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)new<%=genFeature.getCapName()%>, <%=genFeature.getUpperName()%>, changeContext);
			if (changeContext != null) dispatch(changeContext);
		}
        <%if (!genModel.isSuppressNotification()) {%>
		else if (isNotifying())
			notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>);
        <%}%>
      <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%>
        <%if (genModel.isVirtualDelegation()) {%>
		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
        <%}%>
		if (new<%=genFeature.getCapName()%> != <%=genFeature.getSafeName()%>)
		{
			ChangeContext changeContext = null;
			if (<%=genFeature.getSafeName()%> != null)
        <%if (!genFeature.isBidirectional()) {%>
				changeContext = inverseRemove(<%=genFeature.getSafeName()%>, this, OPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
			if (new<%=genFeature.getCapName()%> != null)
				changeContext = inverseAdd(new<%=genFeature.getCapName()%>, this, OPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
        <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
				changeContext = inverseRemove(<%=genFeature.getSafeName()%>, this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
			if (new<%=genFeature.getCapName()%> != null)
				changeContext = inverseAdd(new<%=genFeature.getCapName()%>, this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
        <%}%>
			changeContext = basicSet<%=genFeature.getAccessorName()%>(<%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>, changeContext);
			if (changeContext != null) dispatch(changeContext);
		}
        <%if (genFeature.isUnsettable()) {%>
		else
    	{
          <%if (genModel.isVirtualDelegation()) {%>
			boolean old<%=genFeature.getCapName()%>_set_ = eVirtualIsSet(<%=genFeature.getUpperName()%>);
          <%} else if (genClass.isESetFlag(genFeature)) {%>
            <%if (!genModel.isSuppressNotification()) {%>
			boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
            <%}%>
			<%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
          <%} else {%>
            <%if (!genModel.isSuppressNotification()) {%>
			boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
            <%}%>
			<%=genFeature.getUncapName()%>_set_ = true;
          <%}%>
          <%if (!genModel.isSuppressNotification()) {%>
			if (isNotifying())
				notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>, !old<%=genFeature.getCapName()%>_set_);
          <%}%>
    	}
        <%} else {%>
          <%if (!genModel.isSuppressNotification()) {%>
		else if (isNotifying())
			notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, new<%=genFeature.getCapName()%>, new<%=genFeature.getCapName()%>);
          <%}%>
        <%}%>
      <%} else {%>
        <%if (genClass.isFlag(genFeature)) {%>
          <%if (!genModel.isSuppressNotification()) {%>
		<%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
          <%}%>
		if (new<%=genFeature.getCapName()%>) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG;
        <%} else {%>
          <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
            <%if (!genModel.isSuppressNotification()) {%>
		<%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
            <%}%>
          <%}%>
          <%if (genFeature.isEnumType()) {%>
            <%if (genModel.isVirtualDelegation()) {%>
		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getUpperName()%>_DEFAULT_ : new<%=genFeature.getCapName()%>;
            <%} else {%>
		<%=genFeature.getSafeName()%> = new<%=genFeature.getCapName()%> == null ? <%=genFeature.getUpperName()%>_DEFAULT_ : new<%=genFeature.getCapName()%>;
            <%}%>
          <%} else {%>
            <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>;
            <%} else {%>
		<%=genFeature.getSafeName()%> = <%=genFeature.getInternalTypeCast()%>new<%=genFeature.getCapName()%>;
            <%}%>
          <%}%>
          <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		Object old<%=genFeature.getCapName()%> = eVirtualSet(<%=genFeature.getUpperName()%>, <%=genFeature.getSafeName()%>);
          <%}%>
        <%}%>
        <%if (genFeature.isUnsettable()) {%>
          <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		boolean isSetChange = old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE;
          <%} else if (genClass.isESetFlag(genFeature)) {%>
            <%if (!genModel.isSuppressNotification()) {%>
		boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
            <%}%>
		<%=genClass.getESetFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_ESETFLAG;
          <%} else {%>
            <%if (!genModel.isSuppressNotification()) {%>
		boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
            <%}%>
		<%=genFeature.getUncapName()%>_set_ = true;
          <%}%>
          <%if (!genModel.isSuppressNotification()) {%>
		if (isNotifying())
			notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? <%if (genFeature.isReferenceType()) {%>null<%} else {%><%=genFeature.getUpperName()%>_DEFAULT_<%}%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>);
          <%}%>
        <%} else {%>
          <%if (!genModel.isSuppressNotification()) {%>
		if (isNotifying())
			notify(ChangeKind.SET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? <%if (genFeature.isReferenceType()) {%>null<%} else {%><%=genFeature.getUpperName()%>_DEFAULT_<%}%> : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, <%if (genClass.isFlag(genFeature)) {%>new<%=genFeature.getCapName()%><%} else {%><%=genFeature.getSafeName()%><%}%>);
          <%}%>
        <%}%>
      <%}%>
<%@ include file="Class/setGenFeature.post.insert.javajetinc" fail="silent" %>
    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
      <%if (delegateFeature.isWrappedFeatureMapType()) {%>
		set(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>, <%if (genFeature.isPrimitiveType()){%> new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>);
      <%} else {%>
		((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).set(<%=genFeature.getQualifiedFeatureAccessor()%>, <%if (genFeature.isPrimitiveType()) {%>new <%=genFeature.getObjectType()%>(<%}%>new<%=genFeature.getCapName()%><%if (genFeature.isPrimitiveType()){%>)<%}%>);
      <%}%>
    <%} else {%>
<%@ include file="Class/setGenFeature.TODO.override.javajetinc" fail="alternative" %>
<%@ start %>
		// TODO: implement this method to set the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
<%@ end %><%//Class/setGenFeature.todo.override.javajetinc%>
    <%}%>
	}

<%}%>
<%@ end %><%//Class/setGenFeature.override.javajetinc%>
  <%}%>
  <%if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) {%>
<%@ include file="Class/basicUnsetGenFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ChangeContext basicUnset<%=genFeature.getAccessorName()%>(ChangeContext changeContext)
	{
    <%if (!genFeature.isVolatile()) {%>
      <%if (genModel.isVirtualDelegation()) {%>
		Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genFeature.getUpperName()%>);
      <%} else {%>
		<%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
		<%=genFeature.getSafeName()%> = null;
      <%}%>
      <%if (genModel.isVirtualDelegation()) {%>
		boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE;
      <%} else if (genClass.isESetFlag(genFeature)) {%>
		boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
		<%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
      <%} else {%>
		boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
		<%=genFeature.getUncapName()%>_set_ = false;
      <%}%>
        <%if (!genModel.isSuppressNotification()) {%>
		if (isNotifying())
		{
			<%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>);
			if (changeContext == null) changeContext = notification; else changeContext.add(notification);
		}
		return changeContext;
        <%}%>
    <%} else {%>
<%@ include file="Class/basicUnsetGenFeature.TODO.override.javajetinc" fail="alternative" %>
<%@ start %>
		// TODO: implement this method to unset the contained '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
		// -> this method is automatically invoked to keep the containment relationship in synch
		// -> do not modify other features
		// -> return changeContext, after adding any generated Notification to it (if it is null, a NotificationChain object must be created first)
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
<%@ end %><%//Class/basicUnsetGenFeature.todo.override.javajetinc%>
    <%}%>
	}

<%@ end %><%//Class.basicUnsetGenFeature.override.javajetinc%>
  <%}%>
  <%if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) {%>
<%@ include file="Class/unsetGenFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
<%if (isInterface) {%>
	/**
	 * Unsets the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
  <%if (!genFeature.isSuppressedIsSetVisibility()) {%>
	 * @see #isSet<%=genFeature.getAccessorName()%>()
  <%}%>
	 * @see #<%=genFeature.getGetAccessor()%>()
  <%if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) {%>
	 * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>)
  <%}%>
	 * @generated
	 */
<%} else {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
<%}%>
<%if (!isImplementation) {%>
	void unset<%=genFeature.getAccessorName()%>();

<%} else {%>
	public void unset<%=genFeature.getAccessorName()%>()
	{
    <%if (genModel.isReflectiveDelegation()) {%>
		unset(<%=genFeature.getQualifiedFeatureAccessor()%>);
    <%} else if (!genFeature.isVolatile()) {%>
      <%if (genFeature.isListType()) {%>
		((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable)get<%=genFeature.getAccessorName()%>()).unset();
      <%} else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) {%>
        <%if (genModel.isVirtualDelegation()) {%>
		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
        <%}%>
		if (<%=genFeature.getSafeName()%> != null)
		{
			ChangeContext changeContext = null;
        <%if (!genFeature.isBidirectional()) {%>
			changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
        <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
			changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
        <%}%>
			changeContext = basicUnset<%=genFeature.getAccessorName()%>(changeContext);
			if (changeContext != null) dispatch(changeContext);
		}
		else
    	{
        <%if (genModel.isVirtualDelegation()) {%>
			boolean old<%=genFeature.getCapName()%>_set_ = eVirtualIsSet(<%=genFeature.getUpperName()%>);
        <%} else if (genClass.isESetFlag(genFeature)) {%>
          <%if (!genModel.isSuppressNotification()) {%>
			boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
          <%}%>
			<%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
        <%} else {%>
          <%if (!genModel.isSuppressNotification()) {%>
			boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
          <%}%>
			<%=genFeature.getUncapName()%>_set_ = false;
        <%}%>
        <%if (!genModel.isSuppressNotification()) {%>
			if (isNotifying())
				notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, null, null, old<%=genFeature.getCapName()%>_set_);
        <%}%>
    	}
      <%} else {%>
        <%if (genClass.isFlag(genFeature)) {%>
          <%if (!genModel.isSuppressNotification()) {%>
		<%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = (<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0;
          <%}%>
        <%} else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		Object old<%=genFeature.getCapName()%> = eVirtualUnset(<%=genFeature.getUpperName()%>);
        <%} else {%>
          <%if (!genModel.isSuppressNotification()) {%>
		<%=genFeature.getImportedType()%> old<%=genFeature.getCapName()%> = <%=genFeature.getSafeName()%>;
          <%}%>
        <%}%>
        <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		boolean isSetChange = old<%=genFeature.getCapName()%> != EVIRTUAL_NO_VALUE;
        <%} else if (genClass.isESetFlag(genFeature)) {%>
		boolean old<%=genFeature.getCapName()%>_set_ = (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
        <%} else {%>
          <%if (!genModel.isSuppressNotification()) {%>
		boolean old<%=genFeature.getCapName()%>_set_ = <%=genFeature.getUncapName()%>_set_;
          <%}%>
        <%}%>
        <%if (genFeature.isReferenceType()) {%>
		<%=genFeature.getSafeName()%> = null;
          <%if (!genModel.isVirtualDelegation()) {%>
            <%if (genClass.isESetFlag(genFeature)) {%>
		<%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
            <%} else {%>
		<%=genFeature.getUncapName()%>_set_ = false;
            <%}%>
          <%}%>
          <%if (!genModel.isSuppressNotification()) {%>
		if (isNotifying())
			notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>);
          <%}%>
        <%} else {%>
          <%if (genClass.isFlag(genFeature)) {%>
		if (<%=genFeature.getUpperName()%>_DEFAULT_) <%=genClass.getFlagsField(genFeature)%> |= <%=genFeature.getUpperName()%>_EFLAG; else <%=genClass.getFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_EFLAG;
          <%} else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
		<%=genFeature.getSafeName()%> = <%=genFeature.getUpperName()%>_DEFAULT_;
          <%}%>
          <%if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) {%>
            <%if (genClass.isESetFlag(genFeature)) {%>
		<%=genClass.getESetFlagsField(genFeature)%> &= ~<%=genFeature.getUpperName()%>_ESETFLAG;
            <%} else {%>
		<%=genFeature.getUncapName()%>_set_ = false;
            <%}%>
          <%}%>
          <%if (!genModel.isSuppressNotification()) {%>
		if (isNotifying())
			notify(ChangeKind.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange ? old<%=genFeature.getCapName()%> : <%=genFeature.getUpperName()%>_DEFAULT_<%} else {%>old<%=genFeature.getCapName()%><%}%>, <%=genFeature.getUpperName()%>_DEFAULT_, <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>);
          <%}%>
        <%}%>
      <%}%>
    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
      <%if (delegateFeature.isWrappedFeatureMapType()) {%>
        unset(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
      <%} else {%>
        unset<%=genFeature.getImportedType()%>(get<%=delegateFeature.getAccessorName()%>());
      <%}%>
    <%} else {%>
<%@ include file="Class/unsetGenFeature.TODO.override.javajetinc" fail="alternative" %>
<%@ start %>
		// TODO: implement this method to unset the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%>
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
<%@ end %><%//Class/unsetGenFeature.todo.override.javajetinc%>
    <%}%>
	}

<%}%>
<%@ end %><%//Class/unsetGenFeature.override.javajetinc%>
  <%}%>
  <%if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) {%>
<%@ include file="Class/isSetGenFeature.override.javajetinc" fail="alternative" %>
<%@ start %>
<%if (isInterface) {%>
	/**
	 * Returns whether the value of the '{@link <%=genClass.getQualifiedInterfaceName()%>#<%=genFeature.getGetAccessor()%> <em><%=genFeature.getFormattedName()%></em>}' <%=genFeature.getFeatureKind()%> is set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return whether the value of the '<em><%=genFeature.getFormattedName()%></em>' <%=genFeature.getFeatureKind()%> is set.
    <%if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) {%>
	 * @see #unset<%=genFeature.getAccessorName()%>()
    <%}%>
	 * @see #<%=genFeature.getGetAccessor()%>()
    <%if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) {%>
	 * @see #set<%=genFeature.getAccessorName()%>(<%=genFeature.getImportedType()%>)
    <%}%>
	 * @generated
	 */
<%} else {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
<%}%>
<%if (!isImplementation) {%>
	boolean isSet<%=genFeature.getAccessorName()%>();

<%} else {%>
	public boolean isSet<%=genFeature.getAccessorName()%>()
	{
    <%if (genModel.isReflectiveDelegation()) {%>
		return isSet(<%=genFeature.getQualifiedFeatureAccessor()%>);
    <%} else if (!genFeature.isVolatile()) {%>
      <%if (genFeature.isListType()) {%>
        <%if (genModel.isVirtualDelegation()) {%>
		<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
        <%}%>
		return <%=genFeature.getSafeName()%> != null && ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>.Unsettable)<%=genFeature.getSafeName()%>).isSet();
      <%} else {%>
        <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		return eVirtualIsSet(<%=genFeature.getUpperName()%>);
        <%} else if (genClass.isESetFlag(genFeature)) {%>
		return (<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0;
        <%} else {%>
		return <%=genFeature.getUncapName()%>_set_;
        <%}%>
      <%}%>
    <%} else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature();%>
      <%if (delegateFeature.isWrappedFeatureMapType()) {%>
        return isSet(get<%=delegateFeature.getAccessorName()%>(), getType(), <%=genFeature.getUpperName()%>);
      <%} else {%>
		return !((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)get<%=delegateFeature.getAccessorName()%>()).isEmpty(<%=genFeature.getQualifiedFeatureAccessor()%>);
      <%}%>
    <%} else {%>
<%@ include file="Class/isSetGenFeature.TODO.override.javajetinc" fail="alternative" %>
<%@ start %>
		// TODO: implement this method to return whether the '<%=genFeature.getFormattedName()%>' <%=genFeature.getFeatureKind()%> is set
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
<%@ end %><%//Class/isSetGenFeature.todo.override.javajetinc%>
    <%}%>
	}

<%}%>
<%@ end %><%//Class/isSetGenFeature.override.javajetinc%>
  <%}%>
<%@ include file="Class/genFeature.insert.javajetinc" fail="silent" %>
<%@ end %><%//Class/genFeature.override.javajetinc%>
<%}//for%>
<%for (Iterator i= (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations()).iterator(); i.hasNext();) { GenOperation genOperation = (GenOperation)i.next();%>
<%@ include file="Class/genOperation.override.javajetinc" fail="alternative" %>
<%@ start %>
<%if (isInterface) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
  <%if (genOperation.hasDocumentation()) {%>
	 * <!-- begin-model-doc -->
	 * <%=genOperation.getDocumentation(genModel.getIndentation(stringBuffer))%>
	 * <!-- end-model-doc -->
  <%}%>
  <%if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false;%>
	 * @model <%=modelInfo%>
  <%} else {%>
	 *        <%=modelInfo%>
  <%}} if (first) {%>
	 * @model
  <%}}%>
	 * @generated
	 */
<%} else {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
<%}%>
<%if (!isImplementation) {%>
	<%=genOperation.getImportedType()%> <%=genOperation.getName()%>(<%=genOperation.getParameters()%>)<%=genOperation.getThrows()%>;

<%} else {%>
	public <%=genOperation.getImportedType()%> <%=genOperation.getName()%>(<%=genOperation.getParameters()%>)<%=genOperation.getThrows()%>
	{
  <%if (genOperation.hasBody()) {%>
		<%=genOperation.getBody(genModel.getIndentation(stringBuffer))%>
  <%} else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = ((GenParameter)genOperation.getGenParameters().get(0)).getName(); String context = ((GenParameter)genOperation.getGenParameters().get(1)).getName();%>
		// TODO: implement this method
		// -> specify the condition that violates the invariant
		// -> verify the details of the diagnostic, including severity and message
		// Ensure that you remove @generated or mark it @generated NOT
		if (false)
		{
			if (<%=diagnostics%> != null)
			{
				<%=diagnostics%>.add
					(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
						(<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
						 <%=opClass.getGenPackage().getImportedValidatorClassName()%>.DIAGNOSTIC_SOURCE,
						 <%=opClass.getGenPackage().getImportedValidatorClassName()%>.<%=opClass.getOperationID(genOperation)%>,
						 <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "<%=genOperation.getName()%>", <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>.getObjectLabel(this, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
						 new Object [] { this }));
			}
			return false;
		}
		return true;
  <%} else {%>
<%@ include file="Class/implementedGenOperation.TODO.override.javajetinc" fail="alternative" %>
<%@ start %>
		// TODO: implement this method
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
<%@ end %><%//Class/implementedGenOperation.todo.override.javajetinc%>
  <%}%>
	}

<%}%>
<%@ include file="Class/genOperation.insert.javajetinc" fail="silent" %>
<%@ end %><%//Class/implementedGenOperation.override.javajetinc%>
<%}//for%>
<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ChangeContext eInverseAdd(<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%> otherEnd, int propertyIndex, ChangeContext changeContext)
	{
		switch (propertyIndex)
		{
<%for (Iterator i=genClass.getEInverseAddGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
  <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
			case <%=genFeature.getUpperName()%>:
    <%if (genFeature.isListType()) {%>
      <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%>
				return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).basicAdd(otherEnd, changeContext);
      <%} else {%>
				return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)<%=genFeature.getGetAccessor()%>()).basicAdd(otherEnd, changeContext);
      <%}%>
    <%} else if (genFeature.isContainer()) {%>
				if (eInternalContainer() != null)
					changeContext = eBasicRemoveFromContainer(changeContext);
				return eBasicSetContainer(otherEnd, <%=genFeature.getUpperName()%>, changeContext);
    <%} else {%>
      <%if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
				<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
      <%}%>
				if (<%=genFeature.getSafeName()%> != null)
      <%if (genFeature.isEffectiveContains()) {%>
					changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
      <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
					changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
      <%}%>
				return basicSet<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)otherEnd, changeContext);
    <%}%>
  <%}%>
<%}%>
		}
<%if (genModel.isMinimalReflectiveMethods()) {%>
		return super.eInverseAdd(otherEnd, propertyIndex, changeContext);
<%} else {%>
		return eDynamicInverseAdd(otherEnd, propertyIndex, changeContext);
<%}%>
	}

<%}%>
<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ChangeContext inverseRemove(<%=genModel.getImportedName("java.lang.Object")%> otherEnd, int propertyIndex, ChangeContext changeContext)
	{
		switch (propertyIndex)
		{
<%for (Iterator i=genClass.getEInverseRemoveGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
  <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
			case <%=genFeature.getUpperName()%>:
    <%if (genFeature.isListType()) {%>
      <%if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) {%>
				return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")%>)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).basicRemove(otherEnd, changeContext);
      <%} else if (genFeature.isWrappedFeatureMapType()) {%>
				return removeFrom<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>(), otherEnd, changeContext);
      <%} else {%>
				return removeFromList(<%=genFeature.getGetAccessor()%>(), otherEnd, changeContext);
      <%}%>
    <%} else if (genFeature.isContainer()) {%>
				return eBasicSetContainer(null, <%=genFeature.getUpperName()%>, changeContext);
    <%} else if (genFeature.isUnsettable()) {%>
				return basicUnset<%=genFeature.getAccessorName()%>(changeContext);
    <%} else {%>
				return basicSet<%=genFeature.getAccessorName()%>(null, changeContext);
    <%}%>
  <%}%>
<%}%>
		}
<%if (genModel.isMinimalReflectiveMethods()) {%>
		return super.inverseRemove(otherEnd, propertyIndex, changeContext);
<%} else {%>
		return eDynamicInverseRemove(otherEnd, propertyIndex, changeContext);
<%}%>
	}

<%}%>
<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ChangeContext eBasicRemoveFromContainerFeature(ChangeContext changeContext)
	{
		switch (eContainerFeatureID)
		{
<%for (Iterator i=genClass.getEBasicRemoveFromContainerGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
  <%GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
  <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
			case <%=genFeature.getUpperName()%>:
				return eInternalContainer().inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
  <%}%>
<%}%>
		}
<%if (genModel.isMinimalReflectiveMethods()) {%>
		return super.eBasicRemoveFromContainerFeature(changeContext);
<%} else {%>
		return eDynamicBasicRemoveFromContainer(changeContext);
<%}%>
	}

<%}%>
<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object get(int propertyIndex, boolean resolve)
	{
		switch (propertyIndex)
		{
<%for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
  <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
			case <%=genFeature.getUpperName()%>:
    <%if (genFeature.isPrimitiveType()) {%>
      <%if (genFeature.isBooleanType()) {%>
				return <%=genFeature.getGetAccessor()%>() ? Boolean.TRUE : Boolean.FALSE;
      <%} else {%>
				return new <%=genFeature.getObjectType()%>(<%=genFeature.getGetAccessor()%>());
      <%}%>
    <%} else if (genFeature.isResolveProxies() && !genFeature.isListType()) {%>
				if (resolve) return <%=genFeature.getGetAccessor()%>();
				return basicGet<%=genFeature.getAccessorName()%>();
    <%} else if (genFeature.isMapType()) {%>
      <%if (genFeature.isEffectiveSuppressEMFTypes()) {%>
				if (coreType) return ((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap();
				else return <%=genFeature.getGetAccessor()%>();
      <%} else {%>
				if (coreType) return <%=genFeature.getGetAccessor()%>();
				else return <%=genFeature.getGetAccessor()%>().map();
      <%}%>
    <%} else if (genFeature.isWrappedFeatureMapType()) {%>
				// XXX query introduce coreType as an argument? -- semantic = if true -- coreType - return the core EMF object if value is a non-EMF wrapper/view
				//if (coreType) 
				return <%=genFeature.getGetAccessor()%>();
    <%} else if (genFeature.isFeatureMapType()) {%>
				if (coreType) return <%=genFeature.getGetAccessor()%>();
				return ((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).getWrapper();
    <%} else {%>
				return <%=genFeature.getGetAccessor()%>();
    <%}%>
  <%}%>
<%}%>
		}
<%if (genModel.isMinimalReflectiveMethods()) {%>
		return super.get(propertyIndex, resolve);
<%} else {%>
		return eDynamicGet(propertyIndex, resolve, coreType);
<%}%>
	}

<%}%>
<%if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void set(int propertyIndex, Object newValue)
	{
		switch (propertyIndex)
		{
<%for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
  <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
			case <%=genFeature.getUpperName()%>:
    <%if (genFeature.isListType()) {%>
      <%if (genFeature.isWrappedFeatureMapType()) {%>
      	set<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>(), newValue);
      <%} else if (genFeature.isFeatureMapType()) {%>
				((<%=genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")%>.Internal)<%=genFeature.getGetAccessor()%>()).set(newValue);
      <%} else if (genFeature.isMapType()) {%>
        <%if (genFeature.isEffectiveSuppressEMFTypes()) {%>
				((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)((<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>.InternalMapView)<%=genFeature.getGetAccessor()%>()).eMap()).set(newValue);
        <%} else {%>
				((<%=genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")%>.Setting)<%=genFeature.getGetAccessor()%>()).set(newValue);
        <%}%>
      <%} else {%>
				<%=genFeature.getGetAccessor()%>().clear();
				<%=genFeature.getGetAccessor()%>().addAll((<%=genModel.getImportedName("java.util.Collection")%>)newValue);
      <%}%>
    <%} else if (genFeature.isPrimitiveType()) {%>
				set<%=genFeature.getAccessorName()%>(((<%=genFeature.getObjectType()%>)newValue).<%=genFeature.getPrimitiveValueFunction()%>());
    <%} else {%>
				set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)newValue);
    <%}%>
				return;
  <%}%>
<%}%>
		}
<%if (genModel.isMinimalReflectiveMethods()) {%>
		super.set(propertyIndex, newValue);
<%} else {%>
		eDynamicSet(propertyIndex, newValue);
<%}%>
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unset(int propertyIndex)
	{
		switch (propertyIndex)
		{
<%for (Iterator i=genClass.getESetGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
  <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
			case <%=genFeature.getUpperName()%>:
    <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%>
      <%if (genFeature.isWrappedFeatureMapType()) {%>
				unset<%=genFeature.getImportedType()%>(<%=genFeature.getGetAccessor()%>());
      <%} else {%>
				<%=genFeature.getGetAccessor()%>().clear();
      <%}%>
    <%} else if (genFeature.isUnsettable()) {%>
				unset<%=genFeature.getAccessorName()%>();
    <%} else if (genFeature.isReferenceType()) {%>
				set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType()%>)null);
    <%} else {%>
				set<%=genFeature.getAccessorName()%>(<%=genFeature.getUpperName()%>_DEFAULT_);
    <%}%>
				return;
  <%}%>
<%}%>
		}
<%if (genModel.isMinimalReflectiveMethods()) {%>
		super.unset(propertyIndex);
<%} else {%>
		eDynamicUnset(propertyIndex);
<%}%>
	}

<%}%>
<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getImplementedGenFeatures().isEmpty()) {%>
<%@ include file="Class/eIsSet.override.javajetinc" fail="alternative" %>
<%@ start %>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSet(int propertyIndex)
	{
		switch (propertyIndex)
		{
<%for (Iterator i=genClass.getAllGenFeatures().iterator(); i.hasNext();) { GenFeature genFeature = (GenFeature)i.next();%>
  <%if (!genModel.isMinimalReflectiveMethods() || genClass.getImplementedGenFeatures().contains(genFeature)) {%>
			case <%=genFeature.getUpperName()%>:
    <%if (genFeature.isListType() && !genFeature.isUnsettable()) {%>
      <%if (genFeature.isWrappedFeatureMapType()) {%>
        <%if (genFeature.isVolatile()) {%>
				return !is<%=genFeature.getImportedType()%>Empty(<%=genFeature.getGetAccessor()%>());
        <%} else {%>
				return <%=genFeature.getSafeName()%> != null && !is<%=genFeature.getImportedType()%>Empty(<%=genFeature.getGetAccessor()%>());
        <%}%>
      <%} else {%>
        <%if (genClass.isField(genFeature)) {%>
				return <%=genFeature.getSafeName()%> != null && !<%=genFeature.getSafeName()%>.isEmpty();
        <%} else {%>
          <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
				<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>);
				return <%=genFeature.getSafeName()%> != null && !<%=genFeature.getSafeName()%>.isEmpty();
          <%} else {%>
				return !<%=genFeature.getGetAccessor()%>().isEmpty();
          <%}%>
        <%}%>
      <%}%>
    <%} else if (genFeature.isUnsettable()) {%>
				return isSet<%=genFeature.getAccessorName()%>();
    <%} else if (genFeature.isResolveProxies()) {%>
      <%if (genClass.isField(genFeature)) {%>
				return <%=genFeature.getSafeName()%> != null;
      <%} else {%>
        <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
				return eVirtualGet(<%=genFeature.getUpperName()%>) != null;
        <%} else {%>
				return basicGet<%=genFeature.getAccessorName()%>() != null;
        <%}%>
      <%}%>
    <%} else if (genFeature.isReferenceType()) {%>
      <%if (genClass.isField(genFeature)) {%>
				return <%=genFeature.getSafeName()%> != null;
      <%} else {%>
        <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
				return eVirtualGet(<%=genFeature.getUpperName()%>) != null;
        <%} else {%>
				return <%=genFeature.getGetAccessor()%>() != null;
        <%}%>
      <%}%>
    <%} else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) {%>
      <%if (genClass.isField(genFeature)) {%>
        <%if (genClass.isFlag(genFeature)) {%>
				return ((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0) != <%=genFeature.getUpperName()%>_DEFAULT_;
        <%} else {%>
				return <%=genFeature.getSafeName()%> != <%=genFeature.getUpperName()%>_DEFAULT_;
        <%}%>
      <%} else {%>
        <%if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
				return eVirtualGet(<%=genFeature.getUpperName()%>, <%=genFeature.getUpperName()%>_DEFAULT_) != <%=genFeature.getUpperName()%>_DEFAULT_;
        <%} else {%>
				return <%=genFeature.getGetAccessor()%>() != <%=genFeature.getUpperName()%>_DEFAULT_;
        <%}%>
      <%}%>
    <%} else {//datatype%>
      <%if (genClass.isField(genFeature)) {%>
				return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getSafeName()%> != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getSafeName()%>);
      <%} else {%>
        <%if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) {%>
				<%=genFeature.getImportedType()%> <%=genFeature.getSafeName()%> = (<%=genFeature.getImportedType()%>)eVirtualGet(<%=genFeature.getUpperName()%>, <%=genFeature.getUpperName()%>_DEFAULT_);
				return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getSafeName()%> != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getSafeName()%>);
        <%} else {%>
				return <%=genFeature.getUpperName()%>_DEFAULT_ == null ? <%=genFeature.getGetAccessor()%>() != null : !<%=genFeature.getUpperName()%>_DEFAULT_.equals(<%=genFeature.getGetAccessor()%>());
        <%}%>
      <%}%>
    <%}%>
  <%}%>
<%}%>
		}
<%if (genModel.isMinimalReflectiveMethods()) {%>
		return super.isSet(propertyIndex);
<%} else {%>
		return eDynamicIsSet(propertyIndex);
<%}%>
	}

<%@ end %><%//Class/eIsSet.override.javajetinc%>
<%}%>
<%if (isImplementation && !genClass.getMixinGenFeatures().isEmpty()) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass)
	{
  <%for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); %>
		if (baseClass == <%=mixinGenClass.getImportedInterfaceName()%>.class)
		{
			switch (derivedFeatureID)
			{
    <%for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); %>
				case <%=genFeature.getUpperName()%>: return <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>;
    <%}%>
				default: return -1;
			}
		}
  <%}%>
		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass)
	{
  <%for (Iterator m=genClass.getMixinGenClasses().iterator(); m.hasNext();) { GenClass mixinGenClass = (GenClass)m.next(); %>
		if (baseClass == <%=mixinGenClass.getImportedInterfaceName()%>.class)
		{
			switch (baseFeatureID)
			{
    <%for (Iterator f=mixinGenClass.getGenFeatures().iterator(); f.hasNext();) { GenFeature genFeature = (GenFeature)f.next(); %>
				case <%=mixinGenClass.getQualifiedFeatureID(genFeature)%>: return <%=genFeature.getUpperName()%>;
    <%}%>
				default: return -1;
			}
		}
  <%}%>
		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
	}

<%}%>
<%if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField();%>
  <%if (eVirtualValuesField != null) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected Object[] eVirtualValues()
	{
		return <%=eVirtualValuesField%>;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void setVirtualValues(Object[] newValues)
	{
		<%=eVirtualValuesField%> = newValues;
	}

  <%}%>
  <%{ List eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList());%>
    <%if (!eVirtualIndexBitFields.isEmpty()) { List allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList());%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected int eVirtualIndexBits(int offset)
	{
		switch (offset)
		{
      <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%>
			case <%=i%> :
				return <%=allEVirtualIndexBitFields.get(i)%>;
      <%}%>
			default :
				throw new IndexOutOfBoundsException();
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void setVirtualIndexBits(int offset, int newIndexBits)
	{
		switch (offset)
		{
      <%for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) {%>
			case <%=i%> :
				<%=allEVirtualIndexBitFields.get(i)%> = newIndexBits;
				break;
      <%}%>
			default :
				throw new IndexOutOfBoundsException();
		}
	}

    <%}%>
  <%}%>
<%}%>
<%if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) {%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String toString()
	{
		if (isProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
  <%{ boolean first = true;%>
    <%for (Iterator i=genClass.getToStringGenFeatures().iterator(); i.hasNext(); ) { GenFeature genFeature = (GenFeature)i.next();%>
      <%if (first) { first = false;%>
		result.append(" (<%=genFeature.getName()%>: ");<%=genModel.getNonNLS()%>
      <%} else {%>
		result.append(", <%=genFeature.getName()%>: ");<%=genModel.getNonNLS()%>
      <%}%>
      <%if (genFeature.isUnsettable() && !genFeature.isListType()) {%>
        <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		if (eVirtualIsSet(<%=genFeature.getUpperName()%>)) result.append(eVirtualGet(<%=genFeature.getUpperName()%>)); else result.append("<unset>");<%=genModel.getNonNLS()%>
        <%} else {%>
          <%if (genClass.isFlag(genFeature)) {%>
		if (<%if (genClass.isESetFlag(genFeature)) {%>(<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0<%} else {%><%=genFeature.getUncapName()%>_set_<%}%>) result.append((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0); else result.append("<unset>");<%=genModel.getNonNLS()%>
          <%} else {%>
		if (<%if (genClass.isESetFlag(genFeature)) {%>(<%=genClass.getESetFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_ESETFLAG) != 0<%} else {%><%=genFeature.getUncapName()%>_set_<%}%>) result.append(<%=genFeature.getSafeName()%>); else result.append("<unset>");<%=genModel.getNonNLS()%>
          <%}%>
        <%}%>
      <%} else {%>
        <%if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) {%>
		result.append(eVirtualGet(<%=genFeature.getUpperName()%><%if (!genFeature.isListType() && !genFeature.isReferenceType()){%>, <%=genFeature.getUpperName()%>_DEFAULT_<%}%>));
        <%} else {%>
          <%if (genClass.isFlag(genFeature)) {%>
		result.append((<%=genClass.getFlagsField(genFeature)%> & <%=genFeature.getUpperName()%>_EFLAG) != 0);
          <%} else {%>
		result.append(<%=genFeature.getSafeName()%>);
          <%}%>
        <%}%>
      <%}%>
    <%}%>
  <%}%>
		result.append(')');
		return result.toString();
	}

<%}%>
<%if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature();%>
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected int hash = -1;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
 	 * @generated
 	 */
	public int getHash()
	{
		if (hash == -1)
		{
			Object theKey = getKey();
			hash = (theKey == null ? 0 : theKey.hashCode());
		}
		return hash;
	}

	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
	public void setHash(int hash)
	{
		this.hash = hash;
	}

	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
	public Object getKey()
	{
  	<%if (keyFeature.isPrimitiveType()) {%>
		return new <%=keyFeature.getObjectType()%>(getTypedKey());
 	<%} else {%>
		return getTypedKey();
  	<%}%>
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setKey(Object key)
	{
  <%if (keyFeature.isListType()) {%>
		getTypedKey().addAll((<%=genModel.getImportedName("java.util.Collection")%>)key);
  <%} else if (keyFeature.isPrimitiveType()) {%>
		setTypedKey(((<%=keyFeature.getObjectType()%>)key).<%=keyFeature.getPrimitiveValueFunction()%>());
  <%} else {%>
		setTypedKey((<%=keyFeature.getImportedType()%>)key);
  <%}%>
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object getValue()
	{
 	<%if (valueFeature.isPrimitiveType()) {%>
		return new <%=valueFeature.getObjectType()%>(getTypedValue());
 	<%} else {%>
		return getTypedValue();
 	<%}%>
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object setValue(Object value)
	{
		Object oldValue = getValue();
  	<%if (valueFeature.isListType()) {%>
		getTypedValue().clear();
		getTypedValue().addAll((<%=genModel.getImportedName("java.util.Collection")%>)value);
  	<%} else if (valueFeature.isPrimitiveType()) {%>
		setTypedValue(((<%=valueFeature.getObjectType()%>)value).<%=valueFeature.getPrimitiveValueFunction()%>());
  	<%} else {%>
		setTypedValue((<%=valueFeature.getImportedType()%>)value);
  	<%}%>
		return oldValue;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public <%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%> getEMap()
	{
		<%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%> container = eContainer();
		return container == null ? null : (<%=genModel.getImportedName("org.eclipse.emf.common.util.EMap")%>)container.get(eContainmentFeature());
	}
<%}%>
<%@ include file="Class/insert.javajetinc" fail="silent" %>
} //<%=isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName()%>
<%// TODO fix the space above%>
<%genModel.emitSortedImports();%>