| author | Don Clare | 2012-08-22 13:58:09 (EDT) |
|---|---|---|
| committer | Brian Payton | 2012-08-22 13:58:09 (EDT) |
| commit | 15aafeb03fd4e0be322a898abb8cc5f92a9862aa (patch) (side-by-side diff) | |
| tree | 1ba0136a2a3234decb144eadd5ec6ad05336abd7 | |
| parent | ae8564b15db188dcb758c868d3ea318977cb1069 (diff) | |
| download | org.eclipse.datatools.modelbase-15aafeb03fd4e0be322a898abb8cc5f92a9862aa.zip org.eclipse.datatools.modelbase-15aafeb03fd4e0be322a898abb8cc5f92a9862aa.tar.gz org.eclipse.datatools.modelbase-15aafeb03fd4e0be322a898abb8cc5f92a9862aa.tar.bz2 | |
[387430] Applied patches to o.e.d.modelbase.sql and modelbase.sql.editv201208221345
22 files changed, 1452 insertions, 282 deletions
diff --git a/plugins/org.eclipse.datatools.modelbase.sql.edit/.classpath b/plugins/org.eclipse.datatools.modelbase.sql.edit/.classpath index 64c5e31..304e861 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql.edit/.classpath +++ b/plugins/org.eclipse.datatools.modelbase.sql.edit/.classpath @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> + <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/plugins/org.eclipse.datatools.modelbase.sql.edit/icons/full/ctool16/CreateIndexMember_expression_IndexExpression.gif b/plugins/org.eclipse.datatools.modelbase.sql.edit/icons/full/ctool16/CreateIndexMember_expression_IndexExpression.gif Binary files differnew file mode 100644 index 0000000..e180c4c --- a/dev/null +++ b/plugins/org.eclipse.datatools.modelbase.sql.edit/icons/full/ctool16/CreateIndexMember_expression_IndexExpression.gif diff --git a/plugins/org.eclipse.datatools.modelbase.sql.edit/icons/full/obj16/IndexExpression.gif b/plugins/org.eclipse.datatools.modelbase.sql.edit/icons/full/obj16/IndexExpression.gif Binary files differnew file mode 100644 index 0000000..30f0c48 --- a/dev/null +++ b/plugins/org.eclipse.datatools.modelbase.sql.edit/icons/full/obj16/IndexExpression.gif diff --git a/plugins/org.eclipse.datatools.modelbase.sql.edit/plugin.properties b/plugins/org.eclipse.datatools.modelbase.sql.edit/plugin.properties index 88fdc52..4bc4967 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql.edit/plugin.properties +++ b/plugins/org.eclipse.datatools.modelbase.sql.edit/plugin.properties @@ -448,3 +448,7 @@ _UI_CollectionDataType_elementType_feature = Element Type _UI_CharacterSet_CharacterStringDataType_feature = Character String Data Type _UI_ElementType_CollectionDataType_feature = Collection Data Type _UI_IncrementType_RANDOM_literal = RANDOM +_UI_IndexExpression_type = Index Expression +_UI_UniqueConstraint_clustered_feature = Clustered +_UI_IndexMember_expression_feature = Expression +_UI_IndexExpression_sql_feature = Sql diff --git a/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/IndexExpressionItemProvider.java b/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/IndexExpressionItemProvider.java new file mode 100644 index 0000000..abed097 --- a/dev/null +++ b/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/IndexExpressionItemProvider.java @@ -0,0 +1,156 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.datatools.modelbase.sql.constraints.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.datatools.modelbase.sql.constraints.IndexExpression;
+import org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage;
+
+import org.eclipse.datatools.modelbase.sql.schema.provider.SQLObjectItemProvider;
+import org.eclipse.datatools.modelbase.sql.schema.provider.SqlmodelEditPlugin;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.datatools.modelbase.sql.constraints.IndexExpression} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class IndexExpressionItemProvider
+ extends SQLObjectItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IndexExpressionItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addSqlPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Sql feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSqlPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_IndexExpression_sql_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_IndexExpression_sql_feature", "_UI_IndexExpression_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SQLConstraintsPackage.Literals.INDEX_EXPRESSION__SQL,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns IndexExpression.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/IndexExpression")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ String label = ((IndexExpression)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_IndexExpression_type") : //$NON-NLS-1$
+ getString("_UI_IndexExpression_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(IndexExpression.class)) {
+ case SQLConstraintsPackage.INDEX_EXPRESSION__SQL:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return SqlmodelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/IndexMemberItemProvider.java b/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/IndexMemberItemProvider.java index 8b6c032..4894600 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/IndexMemberItemProvider.java +++ b/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/IndexMemberItemProvider.java @@ -11,12 +11,14 @@ import java.util.Collection; import java.util.List; import org.eclipse.datatools.modelbase.sql.constraints.IndexMember; +import org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsFactory; import org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage; import org.eclipse.datatools.modelbase.sql.schema.provider.SQLObjectItemProvider; import org.eclipse.datatools.modelbase.sql.schema.provider.SqlmodelEditPlugin; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; @@ -112,6 +114,34 @@ public class IndexMemberItemProvider } /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(SQLConstraintsPackage.Literals.INDEX_MEMBER__EXPRESSION); + } + return childrenFeatures; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** * This returns IndexMember.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -148,6 +178,9 @@ public class IndexMemberItemProvider case SQLConstraintsPackage.INDEX_MEMBER__INCREMENT_TYPE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; + case SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; } super.notifyChanged(notification); } @@ -161,6 +194,11 @@ public class IndexMemberItemProvider */ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (SQLConstraintsPackage.Literals.INDEX_MEMBER__EXPRESSION, + SQLConstraintsFactory.eINSTANCE.createIndexExpression())); } /** diff --git a/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/SQLConstraintsItemProviderAdapterFactory.java b/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/SQLConstraintsItemProviderAdapterFactory.java index ecabdb7..18d495c 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/SQLConstraintsItemProviderAdapterFactory.java +++ b/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/SQLConstraintsItemProviderAdapterFactory.java @@ -227,6 +227,28 @@ public class SQLConstraintsItemProviderAdapterFactory extends SQLConstraintsAdap } /** + * This keeps track of the one adapter used for all {@link org.eclipse.datatools.modelbase.sql.constraints.IndexExpression} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IndexExpressionItemProvider indexExpressionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.datatools.modelbase.sql.constraints.IndexExpression}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Adapter createIndexExpressionAdapter() { + if (indexExpressionItemProvider == null) { + indexExpressionItemProvider = new IndexExpressionItemProvider(this); + } + + return indexExpressionItemProvider; + } + + /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/UniqueConstraintItemProvider.java b/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/UniqueConstraintItemProvider.java index f10e926..e5eb24f 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/UniqueConstraintItemProvider.java +++ b/plugins/org.eclipse.datatools.modelbase.sql.edit/src/org/eclipse/datatools/modelbase/sql/constraints/provider/UniqueConstraintItemProvider.java @@ -23,6 +23,7 @@ import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; /** @@ -59,12 +60,35 @@ public class UniqueConstraintItemProvider if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); + addClusteredPropertyDescriptor(object); addForeignKeyPropertyDescriptor(object); } return itemPropertyDescriptors; } /** + * This adds a property descriptor for the Clustered feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addClusteredPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_UniqueConstraint_clustered_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_UniqueConstraint_clustered_feature", "_UI_UniqueConstraint_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + SQLConstraintsPackage.Literals.UNIQUE_CONSTRAINT__CLUSTERED, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** * This adds a property descriptor for the Foreign Key feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -118,6 +142,12 @@ public class UniqueConstraintItemProvider */ public void notifyChanged(Notification notification) { updateChildren(notification); + + switch (notification.getFeatureID(UniqueConstraint.class)) { + case SQLConstraintsPackage.UNIQUE_CONSTRAINT__CLUSTERED: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } super.notifyChanged(notification); } diff --git a/plugins/org.eclipse.datatools.modelbase.sql/model/SQLModel-Constraints.cat b/plugins/org.eclipse.datatools.modelbase.sql/model/SQLModel-Constraints.cat index eded873..04e1973 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/model/SQLModel-Constraints.cat +++ b/plugins/org.eclipse.datatools.modelbase.sql/model/SQLModel-Constraints.cat @@ -229,7 +229,10 @@ exportControl "Public")))
(object Class "IndexMember"
quid "3FA807740185"
- documentation "IndexMember is an EObject. It does not have a name or associated SQL descriptor so it is not an SQLObject. This is the way we have chosen to model Index columns because EMF does not support association classes."
+ documentation
+|IndexMember is an EObject. It does not have a name or associated SQL descriptor so it is not an SQLObject. This is the way we have chosen to model Index columns because EMF does not support association classes.
+|The "expression" reference was added to support function/expression-based indexes. The expression relationship and the column relationship should be mutually exclusive; that is, one and only one of these should be set.
+
superclasses (list inheritance_relationship_list
(object Inheritance_Relationship
quid "3FB9179A0047"
@@ -252,7 +255,20 @@ quid "3FA8083A011F"
exportControl "Public")
(object ClassAttribute "RANDOM"
- quid "4B74FD0A03CC"
+ quid "4B47822400DA"
+ exportControl "Public")))
+ (object Class "IndexExpression"
+ quid "4FC6B3E9014F"
+ documentation "IndexExpression is a SQLObject. It was added to support function/expression-based indexes."
+ superclasses (list inheritance_relationship_list
+ (object Inheritance_Relationship
+ quid "4FC6B5A3019D"
+ supplier "Logical View::SQLModel::Schema::SQLObject"
+ quidu "3E9B3EB5002B"))
+ class_attributes (list class_attribute_list
+ (object ClassAttribute "sql"
+ quid "4FC6B3F802C6"
+ type "String"
exportControl "Public")))
(object Association "$UNNAMED$0"
quid "3F26B1ED0231"
@@ -469,7 +485,7 @@ label "column"
supplier "Logical View::SQLModel::Tables::Column"
quidu "3E9B2AFF0392"
- client_cardinality (value cardinality "1")
+ client_cardinality (value cardinality "0..1")
Containment "By Reference"
is_navigable TRUE)
(object Role "$UNNAMED$21"
@@ -546,6 +562,22 @@ supplier "Logical View::SQLModel::Constraints::ForeignKey"
quidu "3EDF626C0085"
is_navigable TRUE
+ is_aggregate TRUE)))
+ (object Association "$UNNAMED$28"
+ quid "4FC6B66A0362"
+ roles (list role_list
+ (object Role "expression"
+ quid "4FC6B66C0249"
+ label "expression"
+ supplier "Logical View::SQLModel::Constraints::IndexExpression"
+ quidu "4FC6B3E9014F"
+ client_cardinality (value cardinality "0..1")
+ Containment "By Value"
+ is_navigable TRUE)
+ (object Role "$UNNAMED$29"
+ quid "4FC6B66C024B"
+ supplier "Logical View::SQLModel::Constraints::IndexMember"
+ quidu "3FA807740185"
is_aggregate TRUE))))
logical_presentations (list unit_reference_list
(object ClassDiagram "Constraints"
@@ -3001,13 +3033,13 @@ zoom 100
max_height 28350
max_width 21600
- origin_x 938
- origin_y 132
+ origin_x 0
+ origin_y 725
items (list diagram_item_list
(object ClassView "Class" "Logical View::SQLModel::Schema::SQLObject" @116
ShowCompartmentStereotypes TRUE
IncludeAttribute TRUE
- location (1470, 266)
+ location (1777, 256)
font (object Font
size 10
face "Arial"
@@ -3019,17 +3051,35 @@ default_color TRUE)
label (object ItemLabel
Parent_View @116
- location (1238, 137)
+ location (1580, 127)
fill_color 13434879
nlines 1
- max_width 464
+ max_width 394
justify 0
label "SQLObject")
icon_style "Icon"
line_color 3342489
fill_color 13828055
quidu "3E9B3EB5002B"
- width 482
+ compartment (object Compartment
+ Parent_View @116
+ location (1580, 232)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics TRUE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ icon_style "Icon"
+ fill_color 16777215
+ anchor 2
+ nlines 3
+ max_width 400
+ justify 1)
+ width 412
height 282
annotation 8
autoResize TRUE)
@@ -3037,7 +3087,7 @@ ShowCompartmentStereotypes TRUE
IncludeAttribute TRUE
IncludeOperation TRUE
- location (450, 1928)
+ location (1332, 1615)
font (object Font
size 10
face "Arial"
@@ -3049,31 +3099,49 @@ default_color TRUE)
label (object ItemLabel
Parent_View @117
- location (258, 1819)
+ location (1169, 1506)
fill_color 13434879
nlines 1
- max_width 384
+ max_width 326
justify 0
label "IncrementType")
stereotype (object ItemLabel
Parent_View @117
- location (258, 1769)
+ location (1169, 1456)
fill_color 13434879
anchor 10
nlines 1
- max_width 384
+ max_width 326
justify 0
label "<<enumeration>>")
icon_style "Icon"
line_color 3342489
fill_color 15329769
quidu "3FA8080C02B0"
- width 402
+ compartment (object Compartment
+ Parent_View @117
+ location (1169, 1567)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ icon_style "Icon"
+ fill_color 16777215
+ anchor 2
+ nlines 4
+ max_width 237
+ justify 1)
+ width 344
height 342
annotation 8
autoResize TRUE)
(object NoteView @118
- location (1094, 1269)
+ location (1401, 1259)
font (object Font
size 10
face "Arial"
@@ -3085,7 +3153,7 @@ default_color TRUE)
label (object ItemLabel
Parent_View @118
- location (696, 1210)
+ location (1003, 1200)
fill_color 13434879
nlines 2
max_width 760
@@ -3095,11 +3163,86 @@ fill_color 8454016
width 820
height 131)
- (object ClassView "Class" "Logical View::SQLModel::Tables::Column" @119
+ (object ClassView "Class" "Logical View::SQLModel::Tables::Table" @119
+ ShowCompartmentStereotypes TRUE
+ IncludeOperation TRUE
+ location (1940, 1690)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics TRUE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ label (object ItemLabel
+ Parent_View @119
+ location (1803, 1612)
+ fill_color 13434879
+ nlines 1
+ max_width 274
+ justify 0
+ label "Table")
+ icon_style "Icon"
+ line_color 3342489
+ fill_color 13434879
+ quidu "3E9B1FB60047"
+ width 292
+ height 180
+ annotation 8
+ autoResize TRUE)
+ (object NoteView @120
+ location (2480, 1258)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ label (object ItemLabel
+ Parent_View @120
+ location (2070, 1199)
+ fill_color 13434879
+ nlines 2
+ max_width 784
+ justify 1
+ label "{self.includedMembers->forAll(m | self.table.columns->includes( m.column )}")
+ line_color 3342489
+ fill_color 8454016
+ width 844
+ height 131)
+ (object NoteView @121
+ location (610, 1524)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ label (object ItemLabel
+ Parent_View @121
+ location (472, 1465)
+ fill_color 13434879
+ nlines 2
+ max_width 240
+ justify 1
+ label "{xor}")
+ line_color 3342489
+ fill_color 8454016
+ width 300
+ height 131)
+ (object ClassView "Class" "Logical View::SQLModel::Tables::Column" @122
ShowCompartmentStereotypes TRUE
SuppressAttribute TRUE
IncludeAttribute TRUE
- location (496, 1454)
+ location (801, 1984)
font (object Font
size 10
face "Arial"
@@ -3110,8 +3253,8 @@ color 0
default_color TRUE)
label (object ItemLabel
- Parent_View @119
- location (359, 1376)
+ Parent_View @122
+ location (664, 1906)
fill_color 13434879
nlines 1
max_width 274
@@ -3125,11 +3268,11 @@ height 180
annotation 8
autoResize TRUE)
- (object ClassView "Class" "Logical View::SQLModel::Constraints::IndexMember" @120
+ (object ClassView "Class" "Logical View::SQLModel::Constraints::Index" @123
ShowCompartmentStereotypes TRUE
IncludeAttribute TRUE
IncludeOperation TRUE
- location (533, 935)
+ location (1777, 915)
font (object Font
size 10
face "Arial"
@@ -3140,23 +3283,53 @@ color 0
default_color TRUE)
label (object ItemLabel
- Parent_View @120
- location (168, 854)
+ Parent_View @123
+ location (1500, 759)
fill_color 13434879
nlines 1
- max_width 730
+ max_width 554
justify 0
- label "IndexMember")
+ label "Index")
icon_style "Icon"
line_color 3342489
fill_color 13434879
- quidu "3FA807740185"
- width 748
- height 186
+ quidu "3FA7FB2B02AA"
+ compartment (object Compartment
+ Parent_View @123
+ location (1500, 820)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ icon_style "Icon"
+ fill_color 16777215
+ anchor 2
+ nlines 5
+ max_width 559
+ justify 1)
+ width 572
+ height 336
annotation 8
autoResize TRUE)
- (object AssociationViewNew "$UNNAMED$20" @121
- location (519, 1196)
+ (object InheritView "" @124
+ stereotype TRUE
+ line_color 12615680
+ quidu "3FA807570399"
+ client @123
+ supplier @116
+ vertices (list Points
+ (1804, 747)
+ (1804, 396))
+ line_style 3
+ origin_attachment (1804, 747)
+ terminal_attachment (1804, 396))
+ (object AssociationViewNew "$UNNAMED$22" @125
+ location (1879, 1340)
font (object Font
size 10
face "Arial"
@@ -3168,11 +3341,11 @@ default_color TRUE)
stereotype TRUE
line_color 3342489
- quidu "3FA809C0035A"
+ quidu "3FCB85E903AA"
roleview_list (list RoleViews
- (object RoleView "column" @122
- Parent_View @121
- location (4, 140)
+ (object RoleView "table" @126
+ Parent_View @125
+ location (409, 415)
font (object Font
size 10
face "Arial"
@@ -3182,9 +3355,9 @@ strike FALSE
color 0
default_color TRUE)
- label (object SegLabel @123
- Parent_View @122
- location (404, 1329)
+ label (object SegLabel @127
+ Parent_View @126
+ location (1773, 1559)
font (object Font
size 10
face "Arial"
@@ -3197,26 +3370,26 @@ anchor 1
anchor_loc 1
nlines 1
- max_width 172
+ max_width 112
justify 0
- label "+column"
- pctDist 0.800000
- height 116
+ label "+table"
+ pctDist 0.849785
+ height 107
orientation 1)
stereotype TRUE
line_color 3342489
- quidu "3FA809C103AC"
- client @121
+ quidu "3FCB85ED00A3"
+ client @125
supplier @119
vertices (list Points
- (519, 1196)
- (519, 1364))
+ (1879, 1340)
+ (1879, 1599))
line_style 3
- origin_attachment (519, 1196)
- terminal_attachment (519, 1364)
- label (object SegLabel @124
- Parent_View @122
- location (573, 1347)
+ origin_attachment (1879, 1340)
+ terminal_attachment (1879, 1599)
+ label (object SegLabel @128
+ Parent_View @126
+ location (1933, 1573)
font (object Font
size 10
face "Arial"
@@ -3235,54 +3408,142 @@ pctDist 0.900000
height 54
orientation 0))
- (object RoleView "$UNNAMED$21" @125
- Parent_View @121
- location (4, 140)
+ (object RoleView "index" @129
+ Parent_View @125
+ location (409, 415)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ label (object SegLabel @130
+ Parent_View @129
+ location (1787, 1133)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ anchor 1
+ anchor_loc 1
+ nlines 1
+ max_width 136
+ justify 0
+ label "+index"
+ pctDist 0.802575
+ height 93
+ orientation 0)
stereotype TRUE
line_color 3342489
- quidu "3FA809C103B6"
- client @121
- supplier @120
+ quidu "3FCB85ED00AD"
+ client @125
+ supplier @123
vertices (list Points
- (519, 1196)
- (519, 1028))
+ (1879, 1340)
+ (1879, 1082))
line_style 3
- origin_attachment (519, 1196)
- terminal_attachment (519, 1028))))
- (object ClassView "Class" "Logical View::SQLModel::Tables::Table" @126
+ origin_attachment (1879, 1340)
+ terminal_attachment (1879, 1082)
+ label (object SegLabel @131
+ Parent_View @129
+ location (1933, 1108)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ anchor 2
+ anchor_loc 1
+ nlines 1
+ max_width 15
+ justify 0
+ label "0..n"
+ pctDist 0.900000
+ height 54
+ orientation 1))))
+ (object AttachView "" @132
+ stereotype TRUE
+ line_color 3342489
+ client @118
+ supplier @123
+ vertices (list Points
+ (1471, 1193)
+ (1591, 1083))
+ line_style 0)
+ (object AttachView "" @133
+ stereotype TRUE
+ line_color 3342489
+ client @120
+ supplier @123
+ vertices (list Points
+ (2347, 1192)
+ (2063, 1053))
+ line_style 0)
+ (object ClassView "Class" "Logical View::SQLModel::Constraints::IndexExpression" @134
ShowCompartmentStereotypes TRUE
+ IncludeAttribute TRUE
IncludeOperation TRUE
- location (1633, 1700)
+ location (243, 1291)
font (object Font
size 10
face "Arial"
bold FALSE
- italics TRUE
+ italics FALSE
underline FALSE
strike FALSE
color 0
default_color TRUE)
label (object ItemLabel
- Parent_View @126
- location (1496, 1622)
+ Parent_View @134
+ location (70, 1210)
fill_color 13434879
nlines 1
- max_width 274
+ max_width 346
justify 0
- label "Table")
+ label "IndexExpression")
icon_style "Icon"
line_color 3342489
fill_color 13434879
- quidu "3E9B1FB60047"
- width 292
- height 180
+ quidu "4FC6B3E9014F"
+ compartment (object Compartment
+ Parent_View @134
+ location (70, 1271)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ icon_style "Icon"
+ fill_color 13434879
+ anchor 2
+ nlines 2
+ max_width 256
+ justify 1)
+ width 364
+ height 186
annotation 8
autoResize TRUE)
- (object ClassView "Class" "Logical View::SQLModel::Constraints::Index" @127
+ (object ClassView "Class" "Logical View::SQLModel::Constraints::IndexMember" @135
ShowCompartmentStereotypes TRUE
IncludeAttribute TRUE
IncludeOperation TRUE
- location (1470, 925)
+ location (840, 925)
font (object Font
size 10
face "Arial"
@@ -3293,35 +3554,144 @@ color 0
default_color TRUE)
label (object ItemLabel
- Parent_View @127
- location (1145, 769)
+ Parent_View @135
+ location (529, 844)
fill_color 13434879
nlines 1
- max_width 650
+ max_width 622
justify 0
- label "Index")
+ label "IndexMember")
icon_style "Icon"
line_color 3342489
fill_color 13434879
- quidu "3FA7FB2B02AA"
- width 668
- height 336
+ quidu "3FA807740185"
+ compartment (object Compartment
+ Parent_View @135
+ location (529, 905)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ icon_style "Icon"
+ fill_color 16777215
+ anchor 2
+ nlines 2
+ max_width 628
+ justify 1)
+ width 640
+ height 186
annotation 8
autoResize TRUE)
- (object InheritView "" @128
+ (object AssociationViewNew "$UNNAMED$20" @136
+ location (866, 1455)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
stereotype TRUE
- line_color 12615680
- quidu "3FA807570399"
- client @127
- supplier @116
+ line_color 3342489
+ quidu "3FA809C0035A"
+ roleview_list (list RoleViews
+ (object RoleView "column" @137
+ Parent_View @136
+ location (351, 399)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ label (object SegLabel @138
+ Parent_View @137
+ location (750, 1846)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ anchor 1
+ anchor_loc 1
+ nlines 1
+ max_width 172
+ justify 0
+ label "+column"
+ pctDist 0.890661
+ height 116
+ orientation 1)
+ stereotype TRUE
+ line_color 3342489
+ quidu "3FA809C103AC"
+ client @136
+ supplier @122
+ vertices (list Points
+ (866, 1455)
+ (866, 1894))
+ line_style 3
+ origin_attachment (866, 1455)
+ terminal_attachment (866, 1894)
+ label (object SegLabel @139
+ Parent_View @137
+ location (930, 1840)
+ font (object Font
+ size 10
+ face "Arial"
+ bold FALSE
+ italics FALSE
+ underline FALSE
+ strike FALSE
+ color 0
+ default_color TRUE)
+ anchor 2
+ anchor_loc 1
+ nlines 1
+ max_width 15
+ justify 0
+ label "0..1"
+ pctDist 0.876993
+ height 64
+ orientation 0))
+ (object RoleView "$UNNAMED$21" @140
+ Parent_View @136
+ location (351, 399)
+ stereotype TRUE
+ line_color 3342489
+ quidu "3FA809C103B6"
+ client @136
+ supplier @135
+ vertices (list Points
+ (866, 1455)
+ (866, 1017))
+ line_style 3
+ origin_attachment (866, 1455)
+ terminal_attachment (866, 1017))))
+ (object AttachView "" @141
+ stereotype TRUE
+ line_color 3342489
+ client @121
+ supplier @136
vertices (list Points
- (1497, 757)
- (1497, 406))
- line_style 3
- origin_attachment (1497, 757)
- terminal_attachment (1497, 406))
- (object AssociationViewNew "$UNNAMED$18" @129
- location (1021, 935)
+ (760, 1482)
+ (866, 1455))
+ line_style 0)
+ (object AssociationViewNew "$UNNAMED$18" @142
+ location (1325, 925)
font (object Font
size 10
face "Arial"
@@ -3334,9 +3704,9 @@ stereotype TRUE
quidu "3FA8096B0219"
roleview_list (list RoleViews
- (object RoleView "members" @130
- Parent_View @129
- location (-605, -87)
+ (object RoleView "members" @143
+ Parent_View @142
+ location (-301, -97)
font (object Font
size 10
face "Arial"
@@ -3346,9 +3716,9 @@ strike FALSE
color 0
default_color TRUE)
- label (object SegLabel @131
- Parent_View @130
- location (971, 888)
+ label (object SegLabel @144
+ Parent_View @143
+ location (1252, 878)
font (object Font
size 10
face "Arial"
@@ -3370,17 +3740,17 @@ stereotype TRUE
line_color 3342489
quidu "3FA8096C021A"
- client @129
- supplier @120
+ client @142
+ supplier @135
vertices (list Points
- (1021, 935)
- (907, 935))
+ (1325, 925)
+ (1160, 925))
line_style 3
- origin_attachment (1021, 935)
- terminal_attachment (907, 935)
- label (object SegLabel @132
- Parent_View @130
- location (941, 992)
+ origin_attachment (1325, 925)
+ terminal_attachment (1160, 925)
+ label (object SegLabel @145
+ Parent_View @143
+ location (1209, 982)
font (object Font
size 10
face "Arial"
@@ -3399,9 +3769,9 @@ pctDist 0.711628
height 57
orientation 0)
- label (object SegLabel @133
- Parent_View @130
- location (964, 1045)
+ label (object SegLabel @146
+ Parent_View @143
+ location (1243, 1035)
font (object Font
size 10
face "Arial"
@@ -3420,9 +3790,9 @@ pctDist 0.497674
height 110
orientation 0))
- (object RoleView "$UNNAMED$19" @134
- Parent_View @129
- location (-605, -87)
+ (object RoleView "$UNNAMED$19" @147
+ Parent_View @142
+ location (-301, -97)
font (object Font
size 10
face "Arial"
@@ -3435,17 +3805,17 @@ stereotype TRUE
line_color 3342489
quidu "3FA8096C021C"
- client @129
- supplier @127
+ client @142
+ supplier @123
vertices (list Points
- (1021, 935)
- (1136, 935))
+ (1325, 925)
+ (1491, 925))
line_style 3
- origin_attachment (1021, 935)
- terminal_attachment (1136, 935)
- label (object SegLabel @135
- Parent_View @134
- location (1124, 989)
+ origin_attachment (1325, 925)
+ terminal_attachment (1491, 925)
+ label (object SegLabel @148
+ Parent_View @147
+ location (1473, 979)
font (object Font
size 10
face "Arial"
@@ -3464,8 +3834,8 @@ pctDist 0.900000
height 54
orientation 1))))
- (object AssociationViewNew "$UNNAMED$25" @136
- location (990, 575)
+ (object AssociationViewNew "$UNNAMED$25" @149
+ location (1297, 565)
font (object Font
size 10
face "Arial"
@@ -3478,9 +3848,9 @@ stereotype TRUE
quidu "4023025902C9"
roleview_list (list RoleViews
- (object RoleView "includedMembers" @137
- Parent_View @136
- location (-480, -350)
+ (object RoleView "includedMembers" @150
+ Parent_View @149
+ location (-173, -360)
font (object Font
size 10
face "Arial"
@@ -3490,9 +3860,9 @@ strike FALSE
color 0
default_color TRUE)
- label (object SegLabel @138
- Parent_View @137
- location (507, 765)
+ label (object SegLabel @151
+ Parent_View @150
+ location (813, 755)
font (object Font
size 10
face "Arial"
@@ -3514,18 +3884,18 @@ stereotype TRUE
line_color 3342489
quidu "4023025E0186"
- client @136
- supplier @120
+ client @149
+ supplier @135
vertices (list Points
- (990, 575)
- (700, 575)
- (700, 842))
+ (1297, 565)
+ (1006, 565)
+ (1006, 832))
line_style 3
- origin_attachment (990, 575)
- terminal_attachment (700, 842)
- label (object SegLabel @139
- Parent_View @137
- location (772, 752)
+ origin_attachment (1297, 565)
+ terminal_attachment (1006, 832)
+ label (object SegLabel @152
+ Parent_View @150
+ location (1078, 742)
font (object Font
size 10
face "Arial"
@@ -3544,9 +3914,9 @@ pctDist 0.838649
height 72
orientation 0)
- label (object SegLabel @140
- Parent_View @137
- location (811, 803)
+ label (object SegLabel @153
+ Parent_View @150
+ location (1117, 793)
font (object Font
size 10
face "Arial"
@@ -3565,9 +3935,9 @@ pctDist 0.932458
height 111
orientation 0))
- (object RoleView "$UNNAMED$26" @141
- Parent_View @136
- location (-480, -350)
+ (object RoleView "$UNNAMED$26" @154
+ Parent_View @149
+ location (-173, -360)
font (object Font
size 10
face "Arial"
@@ -3580,18 +3950,18 @@ stereotype TRUE
line_color 3342489
quidu "4023025E0190"
- client @136
- supplier @127
+ client @149
+ supplier @123
vertices (list Points
- (990, 575)
- (1366, 575)
- (1366, 757))
+ (1297, 565)
+ (1674, 565)
+ (1674, 747))
line_style 3
- origin_attachment (990, 575)
- terminal_attachment (1366, 757)
- label (object SegLabel @142
- Parent_View @141
- location (1420, 701)
+ origin_attachment (1297, 565)
+ terminal_attachment (1674, 747)
+ label (object SegLabel @155
+ Parent_View @154
+ location (1728, 691)
font (object Font
size 10
face "Arial"
@@ -3610,8 +3980,8 @@ pctDist 0.900000
height 54
orientation 0))))
- (object AssociationViewNew "$UNNAMED$22" @143
- location (1572, 1351)
+ (object AssociationViewNew "$UNNAMED$28" @156
+ location (694, 1291)
font (object Font
size 10
face "Arial"
@@ -3623,11 +3993,11 @@ default_color TRUE)
stereotype TRUE
line_color 3342489
- quidu "3FCB85E903AA"
+ quidu "4FC6B66A0362"
roleview_list (list RoleViews
- (object RoleView "table" @144
- Parent_View @143
- location (102, 426)
+ (object RoleView "expression" @157
+ Parent_View @156
+ location (-146, 366)
font (object Font
size 10
face "Arial"
@@ -3637,9 +4007,9 @@ strike FALSE
color 0
default_color TRUE)
- label (object SegLabel @145
- Parent_View @144
- location (1466, 1570)
+ label (object SegLabel @158
+ Parent_View @157
+ location (568, 1228)
font (object Font
size 10
face "Arial"
@@ -3652,26 +4022,26 @@ anchor 1
anchor_loc 1
nlines 1
- max_width 112
+ max_width 234
justify 0
- label "+table"
- pctDist 0.849785
- height 107
+ label "+expression"
+ pctDist 0.468880
+ height 64
orientation 1)
stereotype TRUE
line_color 3342489
- quidu "3FCB85ED00A3"
- client @143
- supplier @126
+ quidu "4FC6B66C0249"
+ client @156
+ supplier @134
vertices (list Points
- (1572, 1351)
- (1572, 1610))
+ (694, 1291)
+ (425, 1291))
line_style 3
- origin_attachment (1572, 1351)
- terminal_attachment (1572, 1610)
- label (object SegLabel @146
- Parent_View @144
- location (1626, 1584)
+ origin_attachment (694, 1291)
+ terminal_attachment (425, 1291)
+ label (object SegLabel @159
+ Parent_View @157
+ location (494, 1352)
font (object Font
size 10
face "Arial"
@@ -3686,13 +4056,13 @@ nlines 1
max_width 15
justify 0
- label "1"
- pctDist 0.900000
- height 54
+ label "0..1"
+ pctDist 0.742739
+ height 61
orientation 0))
- (object RoleView "index" @147
- Parent_View @143
- location (102, 426)
+ (object RoleView "$UNNAMED$29" @160
+ Parent_View @156
+ location (-146, 366)
font (object Font
size 10
face "Arial"
@@ -3702,97 +4072,38 @@ strike FALSE
color 0
default_color TRUE)
- label (object SegLabel @148
- Parent_View @147
- location (1480, 1144)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 1
- anchor_loc 1
- nlines 1
- max_width 136
- justify 0
- label "+index"
- pctDist 0.802575
- height 93
- orientation 0)
stereotype TRUE
line_color 3342489
- quidu "3FCB85ED00AD"
- client @143
- supplier @127
+ quidu "4FC6B66C024B"
+ client @156
+ supplier @135
vertices (list Points
- (1572, 1351)
- (1572, 1092))
+ (694, 1291)
+ (753, 1291)
+ (753, 1018))
line_style 3
- origin_attachment (1572, 1351)
- terminal_attachment (1572, 1092)
- label (object SegLabel @149
- Parent_View @147
- location (1626, 1118)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- anchor 2
- anchor_loc 1
- nlines 1
- max_width 15
- justify 0
- label "0..n"
- pctDist 0.900000
- height 54
- orientation 1))))
- (object AttachView "" @150
+ origin_attachment (694, 1291)
+ terminal_attachment (753, 1018))))
+ (object AttachView "" @161
stereotype TRUE
line_color 3342489
- client @118
- supplier @127
+ client @121
+ supplier @156
vertices (list Points
- (1164, 1203)
- (1284, 1093))
+ (632, 1458)
+ (694, 1291))
line_style 0)
- (object NoteView @151
- location (2173, 1244)
- font (object Font
- size 10
- face "Arial"
- bold FALSE
- italics FALSE
- underline FALSE
- strike FALSE
- color 0
- default_color TRUE)
- label (object ItemLabel
- Parent_View @151
- location (1763, 1185)
- fill_color 13434879
- nlines 2
- max_width 784
- justify 1
- label "{self.includedMembers->forAll(m | self.table.columns->includes( m.column )}")
- line_color 3342489
- fill_color 8454016
- width 844
- height 131)
- (object AttachView "" @152
+ (object InheritView "" @162
stereotype TRUE
- line_color 3342489
- client @151
- supplier @127
+ line_color 16744448
+ quidu "4FC6B5A3019D"
+ client @134
+ supplier @116
vertices (list Points
- (2029, 1178)
- (1804, 1076))
- line_style 0)))))
+ (244, 1198)
+ (244, 494)
+ (1704, 494)
+ (1704, 397))
+ line_style 3
+ origin_attachment (244, 1198)
+ terminal_attachment (1704, 397))))))
diff --git a/plugins/org.eclipse.datatools.modelbase.sql/model/sqlmodel.ecore b/plugins/org.eclipse.datatools.modelbase.sql/model/sqlmodel.ecore index 3414d19..85ad325 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/model/sqlmodel.ecore +++ b/plugins/org.eclipse.datatools.modelbase.sql/model/sqlmodel.ecore @@ -315,17 +315,24 @@ </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="IndexMember" eSuperTypes="#//schema/SQLObject"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="IndexMember is an EObject. It does not have a name or associated SQL descriptor so it is not an SQLObject. This is the way we have chosen to model Index columns because EMF does not support association classes."/> + <details key="documentation" value="IndexMember is an EObject. It does not have a name or associated SQL descriptor so it is not an SQLObject. This is the way we have chosen to model Index columns because EMF does not support association classes.
The "expression" reference was added to support function/expression-based indexes. The expression relationship and the column relationship should be mutually exclusive; that is, one and only one of these should be set."/> </eAnnotations> <eStructuralFeatures xsi:type="ecore:EAttribute" name="incrementType" eType="#//constraints/IncrementType"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="column" lowerBound="1" - eType="#//tables/Column"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="column" eType="#//tables/Column"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="#//constraints/IndexExpression" + containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EEnum" name="IncrementType"> <eLiterals name="ASC"/> <eLiterals name="DESC" value="1"/> <eLiterals name="RANDOM" value="2"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="IndexExpression" eSuperTypes="#//schema/SQLObject"> + <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> + <details key="documentation" value="IndexExpression is a SQLObject. It was added to support function/expression-based indexes."/> + </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="sql" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> </eSubpackages> <eSubpackages name="datatypes" nsURI="http:///org/eclipse/datatools/modelbase/sql/datatypes.ecore" nsPrefix="SQLDataTypes"> diff --git a/plugins/org.eclipse.datatools.modelbase.sql/model/sqlmodel.genmodel b/plugins/org.eclipse.datatools.modelbase.sql/model/sqlmodel.genmodel index a38454c..da33260 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/model/sqlmodel.genmodel +++ b/plugins/org.eclipse.datatools.modelbase.sql/model/sqlmodel.genmodel @@ -191,6 +191,10 @@ <genClasses ecoreClass="sqlmodel.ecore#//constraints/IndexMember"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sqlmodel.ecore#//constraints/IndexMember/incrementType"/> <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference sqlmodel.ecore#//constraints/IndexMember/column"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference sqlmodel.ecore#//constraints/IndexMember/expression"/> + </genClasses> + <genClasses ecoreClass="sqlmodel.ecore#//constraints/IndexExpression"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sqlmodel.ecore#//constraints/IndexExpression/sql"/> </genClasses> </nestedGenPackages> <nestedGenPackages prefix="SQLDataTypes" basePackage="org.eclipse.datatools.modelbase.sql" diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/IndexExpression.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/IndexExpression.java new file mode 100644 index 0000000..dc5c790 --- a/dev/null +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/IndexExpression.java @@ -0,0 +1,58 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.datatools.modelbase.sql.constraints;
+
+import org.eclipse.datatools.modelbase.sql.schema.SQLObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Index Expression</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * IndexExpression is a SQLObject. It was added to support function/expression-based indexes.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.datatools.modelbase.sql.constraints.IndexExpression#getSql <em>Sql</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage#getIndexExpression()
+ * @model
+ * @generated
+ */
+public interface IndexExpression extends SQLObject {
+ /**
+ * Returns the value of the '<em><b>Sql</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sql</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sql</em>' attribute.
+ * @see #setSql(String)
+ * @see org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage#getIndexExpression_Sql()
+ * @model
+ * @generated
+ */
+ String getSql();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.datatools.modelbase.sql.constraints.IndexExpression#getSql <em>Sql</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Sql</em>' attribute.
+ * @see #getSql()
+ * @generated
+ */
+ void setSql(String value);
+
+} // IndexExpression
diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/IndexMember.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/IndexMember.java index 3de470b..72870bd 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/IndexMember.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/IndexMember.java @@ -20,6 +20,7 @@ import org.eclipse.datatools.modelbase.sql.tables.Column; * * <!-- begin-model-doc --> * IndexMember is an EObject. It does not have a name or associated SQL descriptor so it is not an SQLObject. This is the way we have chosen to model Index columns because EMF does not support association classes. + * The "expression" reference was added to support function/expression-based indexes. The expression relationship and the column relationship should be mutually exclusive; that is, one and only one of these should be set. * <!-- end-model-doc --> * * <p> @@ -27,6 +28,7 @@ import org.eclipse.datatools.modelbase.sql.tables.Column; * <ul> * <li>{@link org.eclipse.datatools.modelbase.sql.constraints.IndexMember#getIncrementType <em>Increment Type</em>}</li> * <li>{@link org.eclipse.datatools.modelbase.sql.constraints.IndexMember#getColumn <em>Column</em>}</li> + * <li>{@link org.eclipse.datatools.modelbase.sql.constraints.IndexMember#getExpression <em>Expression</em>}</li> * </ul> * </p> * @@ -75,7 +77,7 @@ public interface IndexMember extends SQLObject{ * @return the value of the '<em>Column</em>' reference. * @see #setColumn(Column) * @see org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage#getIndexMember_Column() - * @model required="true" + * @model * @generated */ Column getColumn(); @@ -90,4 +92,30 @@ public interface IndexMember extends SQLObject{ */ void setColumn(Column value); + /** + * Returns the value of the '<em><b>Expression</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Expression</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Expression</em>' containment reference. + * @see #setExpression(IndexExpression) + * @see org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage#getIndexMember_Expression() + * @model containment="true" + * @generated + */ + IndexExpression getExpression(); + + /** + * Sets the value of the '{@link org.eclipse.datatools.modelbase.sql.constraints.IndexMember#getExpression <em>Expression</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Expression</em>' containment reference. + * @see #getExpression() + * @generated + */ + void setExpression(IndexExpression value); + } // IndexMember diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/SQLConstraintsFactory.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/SQLConstraintsFactory.java index e5d8c7a..c098094 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/SQLConstraintsFactory.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/SQLConstraintsFactory.java @@ -93,6 +93,15 @@ public interface SQLConstraintsFactory extends EFactory { IndexMember createIndexMember(); /** + * Returns a new object of class '<em>Index Expression</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Index Expression</em>'. + * @generated + */ + IndexExpression createIndexExpression(); + + /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/SQLConstraintsPackage.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/SQLConstraintsPackage.java index ca3c933..0af429f 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/SQLConstraintsPackage.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/SQLConstraintsPackage.java @@ -1507,13 +1507,122 @@ public interface SQLConstraintsPackage extends EPackage { int INDEX_MEMBER__COLUMN = SQLSchemaPackage.SQL_OBJECT_FEATURE_COUNT + 1; /** + * The feature id for the '<em><b>Expression</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_MEMBER__EXPRESSION = SQLSchemaPackage.SQL_OBJECT_FEATURE_COUNT + 2; + + /** * The number of structural features of the '<em>Index Member</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int INDEX_MEMBER_FEATURE_COUNT = SQLSchemaPackage.SQL_OBJECT_FEATURE_COUNT + 2; + int INDEX_MEMBER_FEATURE_COUNT = SQLSchemaPackage.SQL_OBJECT_FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link org.eclipse.datatools.modelbase.sql.constraints.impl.IndexExpressionImpl <em>Index Expression</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.datatools.modelbase.sql.constraints.impl.IndexExpressionImpl + * @see org.eclipse.datatools.modelbase.sql.constraints.impl.SQLConstraintsPackageImpl#getIndexExpression() + * @generated + */ + int INDEX_EXPRESSION = 10; + + /** + * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__EANNOTATIONS = SQLSchemaPackage.SQL_OBJECT__EANNOTATIONS; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__NAME = SQLSchemaPackage.SQL_OBJECT__NAME; + + /** + * The feature id for the '<em><b>Dependencies</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__DEPENDENCIES = SQLSchemaPackage.SQL_OBJECT__DEPENDENCIES; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__DESCRIPTION = SQLSchemaPackage.SQL_OBJECT__DESCRIPTION; + + /** + * The feature id for the '<em><b>Label</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__LABEL = SQLSchemaPackage.SQL_OBJECT__LABEL; + + /** + * The feature id for the '<em><b>Comments</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__COMMENTS = SQLSchemaPackage.SQL_OBJECT__COMMENTS; + + /** + * The feature id for the '<em><b>Extensions</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__EXTENSIONS = SQLSchemaPackage.SQL_OBJECT__EXTENSIONS; + + /** + * The feature id for the '<em><b>Privileges</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__PRIVILEGES = SQLSchemaPackage.SQL_OBJECT__PRIVILEGES; + + /** + * The feature id for the '<em><b>Sql</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION__SQL = SQLSchemaPackage.SQL_OBJECT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Index Expression</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INDEX_EXPRESSION_FEATURE_COUNT = SQLSchemaPackage.SQL_OBJECT_FEATURE_COUNT + 1; /** * The meta object id for the '{@link org.eclipse.datatools.modelbase.sql.constraints.MatchType <em>Match Type</em>}' enum. @@ -1523,7 +1632,7 @@ public interface SQLConstraintsPackage extends EPackage { * @see org.eclipse.datatools.modelbase.sql.constraints.impl.SQLConstraintsPackageImpl#getMatchType() * @generated */ - int MATCH_TYPE = 10; + int MATCH_TYPE = 11; /** * The meta object id for the '{@link org.eclipse.datatools.modelbase.sql.constraints.IncrementType <em>Increment Type</em>}' enum. @@ -1533,7 +1642,7 @@ public interface SQLConstraintsPackage extends EPackage { * @see org.eclipse.datatools.modelbase.sql.constraints.impl.SQLConstraintsPackageImpl#getIncrementType() * @generated */ - int INCREMENT_TYPE = 11; + int INCREMENT_TYPE = 12; /** @@ -1956,6 +2065,38 @@ public interface SQLConstraintsPackage extends EPackage { EReference getIndexMember_Column(); /** + * Returns the meta object for the containment reference '{@link org.eclipse.datatools.modelbase.sql.constraints.IndexMember#getExpression <em>Expression</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Expression</em>'. + * @see org.eclipse.datatools.modelbase.sql.constraints.IndexMember#getExpression() + * @see #getIndexMember() + * @generated + */ + EReference getIndexMember_Expression(); + + /** + * Returns the meta object for class '{@link org.eclipse.datatools.modelbase.sql.constraints.IndexExpression <em>Index Expression</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Index Expression</em>'. + * @see org.eclipse.datatools.modelbase.sql.constraints.IndexExpression + * @generated + */ + EClass getIndexExpression(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.datatools.modelbase.sql.constraints.IndexExpression#getSql <em>Sql</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Sql</em>'. + * @see org.eclipse.datatools.modelbase.sql.constraints.IndexExpression#getSql() + * @see #getIndexExpression() + * @generated + */ + EAttribute getIndexExpression_Sql(); + + /** * Returns the meta object for enum '{@link org.eclipse.datatools.modelbase.sql.constraints.MatchType <em>Match Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2330,6 +2471,32 @@ public interface SQLConstraintsPackage extends EPackage { EReference INDEX_MEMBER__COLUMN = eINSTANCE.getIndexMember_Column(); /** + * The meta object literal for the '<em><b>Expression</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference INDEX_MEMBER__EXPRESSION = eINSTANCE.getIndexMember_Expression(); + + /** + * The meta object literal for the '{@link org.eclipse.datatools.modelbase.sql.constraints.impl.IndexExpressionImpl <em>Index Expression</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.datatools.modelbase.sql.constraints.impl.IndexExpressionImpl + * @see org.eclipse.datatools.modelbase.sql.constraints.impl.SQLConstraintsPackageImpl#getIndexExpression() + * @generated + */ + EClass INDEX_EXPRESSION = eINSTANCE.getIndexExpression(); + + /** + * The meta object literal for the '<em><b>Sql</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute INDEX_EXPRESSION__SQL = eINSTANCE.getIndexExpression_Sql(); + + /** * The meta object literal for the '{@link org.eclipse.datatools.modelbase.sql.constraints.MatchType <em>Match Type</em>}' enum. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/IndexExpressionImpl.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/IndexExpressionImpl.java new file mode 100644 index 0000000..2701036 --- a/dev/null +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/IndexExpressionImpl.java @@ -0,0 +1,162 @@ +/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.datatools.modelbase.sql.constraints.impl;
+
+import org.eclipse.datatools.modelbase.sql.constraints.IndexExpression;
+import org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage;
+
+import org.eclipse.datatools.modelbase.sql.schema.impl.SQLObjectImpl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Index Expression</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.datatools.modelbase.sql.constraints.impl.IndexExpressionImpl#getSql <em>Sql</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IndexExpressionImpl extends SQLObjectImpl implements IndexExpression {
+ /**
+ * The default value of the '{@link #getSql() <em>Sql</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSql()
+ * @generated
+ * @ordered
+ */
+ protected static final String SQL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSql() <em>Sql</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSql()
+ * @generated
+ * @ordered
+ */
+ protected String sql = SQL_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IndexExpressionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return SQLConstraintsPackage.Literals.INDEX_EXPRESSION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSql() {
+ return sql;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSql(String newSql) {
+ String oldSql = sql;
+ sql = newSql;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, SQLConstraintsPackage.INDEX_EXPRESSION__SQL, oldSql, sql));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case SQLConstraintsPackage.INDEX_EXPRESSION__SQL:
+ return getSql();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case SQLConstraintsPackage.INDEX_EXPRESSION__SQL:
+ setSql((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SQLConstraintsPackage.INDEX_EXPRESSION__SQL:
+ setSql(SQL_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SQLConstraintsPackage.INDEX_EXPRESSION__SQL:
+ return SQL_EDEFAULT == null ? sql != null : !SQL_EDEFAULT.equals(sql);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (sql: "); //$NON-NLS-1$
+ result.append(sql);
+ result.append(')');
+ return result.toString();
+ }
+
+} //IndexExpressionImpl
diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/IndexMemberImpl.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/IndexMemberImpl.java index 0f20071..1448a98 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/IndexMemberImpl.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/IndexMemberImpl.java @@ -13,6 +13,7 @@ package org.eclipse.datatools.modelbase.sql.constraints.impl; import java.util.Collection; import org.eclipse.datatools.modelbase.sql.constraints.IncrementType; +import org.eclipse.datatools.modelbase.sql.constraints.IndexExpression; import org.eclipse.datatools.modelbase.sql.constraints.IndexMember; import org.eclipse.datatools.modelbase.sql.constraints.SQLConstraintsPackage; import org.eclipse.datatools.modelbase.sql.schema.impl.SQLObjectImpl; @@ -34,6 +35,7 @@ import org.eclipse.emf.ecore.util.InternalEList; * <ul> * <li>{@link org.eclipse.datatools.modelbase.sql.constraints.impl.IndexMemberImpl#getIncrementType <em>Increment Type</em>}</li> * <li>{@link org.eclipse.datatools.modelbase.sql.constraints.impl.IndexMemberImpl#getColumn <em>Column</em>}</li> + * <li>{@link org.eclipse.datatools.modelbase.sql.constraints.impl.IndexMemberImpl#getExpression <em>Expression</em>}</li> * </ul> * </p> * @@ -71,6 +73,16 @@ public class IndexMemberImpl extends SQLObjectImpl implements IndexMember { protected Column column; /** + * The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getExpression() + * @generated + * @ordered + */ + protected IndexExpression expression; + + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated @@ -152,6 +164,62 @@ public class IndexMemberImpl extends SQLObjectImpl implements IndexMember { * <!-- end-user-doc --> * @generated */ + public IndexExpression getExpression() { + return expression; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetExpression(IndexExpression newExpression, NotificationChain msgs) { + IndexExpression oldExpression = expression; + expression = newExpression; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION, oldExpression, newExpression); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setExpression(IndexExpression newExpression) { + if (newExpression != expression) { + NotificationChain msgs = null; + if (expression != null) + msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION, null, msgs); + if (newExpression != null) + msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION, null, msgs); + msgs = basicSetExpression(newExpression, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION, newExpression, newExpression)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION: + return basicSetExpression(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SQLConstraintsPackage.INDEX_MEMBER__INCREMENT_TYPE: @@ -159,6 +227,8 @@ public class IndexMemberImpl extends SQLObjectImpl implements IndexMember { case SQLConstraintsPackage.INDEX_MEMBER__COLUMN: if (resolve) return getColumn(); return basicGetColumn(); + case SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION: + return getExpression(); } return super.eGet(featureID, resolve, coreType); } @@ -176,6 +246,9 @@ public class IndexMemberImpl extends SQLObjectImpl implements IndexMember { case SQLConstraintsPackage.INDEX_MEMBER__COLUMN: setColumn((Column)newValue); return; + case SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION: + setExpression((IndexExpression)newValue); + return; } super.eSet(featureID, newValue); } @@ -193,6 +266,9 @@ public class IndexMemberImpl extends SQLObjectImpl implements IndexMember { case SQLConstraintsPackage.INDEX_MEMBER__COLUMN: setColumn((Column)null); return; + case SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION: + setExpression((IndexExpression)null); + return; } super.eUnset(featureID); } @@ -208,6 +284,8 @@ public class IndexMemberImpl extends SQLObjectImpl implements IndexMember { return incrementType != INCREMENT_TYPE_EDEFAULT; case SQLConstraintsPackage.INDEX_MEMBER__COLUMN: return column != null; + case SQLConstraintsPackage.INDEX_MEMBER__EXPRESSION: + return expression != null; } return super.eIsSet(featureID); } diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/SQLConstraintsFactoryImpl.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/SQLConstraintsFactoryImpl.java index 6385b51..17ac55b 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/SQLConstraintsFactoryImpl.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/SQLConstraintsFactoryImpl.java @@ -70,6 +70,7 @@ public class SQLConstraintsFactoryImpl extends EFactoryImpl implements SQLConstr case SQLConstraintsPackage.PRIMARY_KEY: return createPrimaryKey(); case SQLConstraintsPackage.INDEX: return createIndex(); case SQLConstraintsPackage.INDEX_MEMBER: return createIndexMember(); + case SQLConstraintsPackage.INDEX_EXPRESSION: return createIndexExpression(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } @@ -182,6 +183,16 @@ public class SQLConstraintsFactoryImpl extends EFactoryImpl implements SQLConstr * <!-- end-user-doc --> * @generated */ + public IndexExpression createIndexExpression() { + IndexExpressionImpl indexExpression = new IndexExpressionImpl(); + return indexExpression; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public MatchType createMatchTypeFromString(EDataType eDataType, String initialValue) { MatchType result = MatchType.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/SQLConstraintsPackageImpl.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/SQLConstraintsPackageImpl.java index 680bfa7..083492d 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/SQLConstraintsPackageImpl.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/SQLConstraintsPackageImpl.java @@ -18,6 +18,7 @@ import org.eclipse.datatools.modelbase.sql.constraints.Constraint; import org.eclipse.datatools.modelbase.sql.constraints.ForeignKey; import org.eclipse.datatools.modelbase.sql.constraints.IncrementType; import org.eclipse.datatools.modelbase.sql.constraints.Index; +import org.eclipse.datatools.modelbase.sql.constraints.IndexExpression; import org.eclipse.datatools.modelbase.sql.constraints.IndexMember; import org.eclipse.datatools.modelbase.sql.constraints.MatchType; import org.eclipse.datatools.modelbase.sql.constraints.PrimaryKey; @@ -130,6 +131,13 @@ public class SQLConstraintsPackageImpl extends EPackageImpl implements SQLConstr * <!-- end-user-doc --> * @generated */ + private EClass indexExpressionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EEnum matchTypeEEnum = null; /** @@ -582,6 +590,33 @@ public class SQLConstraintsPackageImpl extends EPackageImpl implements SQLConstr * <!-- end-user-doc --> * @generated */ + public EReference getIndexMember_Expression() { + return (EReference)indexMemberEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getIndexExpression() { + return indexExpressionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getIndexExpression_Sql() { + return (EAttribute)indexExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EEnum getMatchType() { return matchTypeEEnum; } @@ -671,6 +706,10 @@ public class SQLConstraintsPackageImpl extends EPackageImpl implements SQLConstr indexMemberEClass = createEClass(INDEX_MEMBER); createEAttribute(indexMemberEClass, INDEX_MEMBER__INCREMENT_TYPE); createEReference(indexMemberEClass, INDEX_MEMBER__COLUMN); + createEReference(indexMemberEClass, INDEX_MEMBER__EXPRESSION); + + indexExpressionEClass = createEClass(INDEX_EXPRESSION); + createEAttribute(indexExpressionEClass, INDEX_EXPRESSION__SQL); // Create enums matchTypeEEnum = createEEnum(MATCH_TYPE); @@ -716,6 +755,7 @@ public class SQLConstraintsPackageImpl extends EPackageImpl implements SQLConstr primaryKeyEClass.getESuperTypes().add(this.getUniqueConstraint()); indexEClass.getESuperTypes().add(theSQLSchemaPackage.getSQLObject()); indexMemberEClass.getESuperTypes().add(theSQLSchemaPackage.getSQLObject()); + indexExpressionEClass.getESuperTypes().add(theSQLSchemaPackage.getSQLObject()); // Initialize classes and features; add operations and parameters initEClass(assertionEClass, Assertion.class, "Assertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ @@ -765,7 +805,11 @@ public class SQLConstraintsPackageImpl extends EPackageImpl implements SQLConstr initEClass(indexMemberEClass, IndexMember.class, "IndexMember", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ initEAttribute(getIndexMember_IncrementType(), this.getIncrementType(), "incrementType", null, 0, 1, IndexMember.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference(getIndexMember_Column(), theSQLTablesPackage.getColumn(), null, "column", null, 1, 1, IndexMember.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getIndexMember_Column(), theSQLTablesPackage.getColumn(), null, "column", null, 0, 1, IndexMember.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference(getIndexMember_Expression(), this.getIndexExpression(), null, "expression", null, 0, 1, IndexMember.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass(indexExpressionEClass, IndexExpression.class, "IndexExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getIndexExpression_Sql(), ecorePackage.getEString(), "sql", null, 0, 1, IndexExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ // Initialize enums and add enum literals initEEnum(matchTypeEEnum, MatchType.class, "MatchType"); //$NON-NLS-1$ diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/TableConstraintImpl.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/TableConstraintImpl.java index 6e6e1e9..8b09731 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/TableConstraintImpl.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/impl/TableConstraintImpl.java @@ -63,7 +63,7 @@ public abstract class TableConstraintImpl extends ConstraintImpl implements Tabl * @generated */ public BaseTable getBaseTable() { - if (eContainerFeatureID != SQLConstraintsPackage.TABLE_CONSTRAINT__BASE_TABLE) return null; + if (eContainerFeatureID() != SQLConstraintsPackage.TABLE_CONSTRAINT__BASE_TABLE) return null; return (BaseTable)eContainer(); } @@ -83,7 +83,7 @@ public abstract class TableConstraintImpl extends ConstraintImpl implements Tabl * @generated */ public void setBaseTable(BaseTable newBaseTable) { - if (newBaseTable != eInternalContainer() || (eContainerFeatureID != SQLConstraintsPackage.TABLE_CONSTRAINT__BASE_TABLE && newBaseTable != null)) { + if (newBaseTable != eInternalContainer() || (eContainerFeatureID() != SQLConstraintsPackage.TABLE_CONSTRAINT__BASE_TABLE && newBaseTable != null)) { if (EcoreUtil.isAncestor(this, newBaseTable)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$ NotificationChain msgs = null; @@ -132,7 +132,7 @@ public abstract class TableConstraintImpl extends ConstraintImpl implements Tabl * @generated */ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID) { + switch (eContainerFeatureID()) { case SQLConstraintsPackage.TABLE_CONSTRAINT__BASE_TABLE: return eInternalContainer().eInverseRemove(this, SQLTablesPackage.BASE_TABLE__CONSTRAINTS, BaseTable.class, msgs); } diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/util/SQLConstraintsAdapterFactory.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/util/SQLConstraintsAdapterFactory.java index 723d86b..f83b3aa 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/util/SQLConstraintsAdapterFactory.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/util/SQLConstraintsAdapterFactory.java @@ -105,6 +105,9 @@ public class SQLConstraintsAdapterFactory extends AdapterFactoryImpl { public Object caseIndexMember(IndexMember object) { return createIndexMemberAdapter(); } + public Object caseIndexExpression(IndexExpression object) { + return createIndexExpressionAdapter(); + } public Object caseEModelElement(EModelElement object) { return createEModelElementAdapter(); } @@ -273,6 +276,20 @@ public class SQLConstraintsAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.datatools.modelbase.sql.constraints.IndexExpression <em>Index Expression</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.datatools.modelbase.sql.constraints.IndexExpression + * @generated + */ + public Adapter createIndexExpressionAdapter() { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EModelElement <em>EModel Element</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; diff --git a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/util/SQLConstraintsSwitch.java b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/util/SQLConstraintsSwitch.java index c164ce0..a48a748 100644 --- a/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/util/SQLConstraintsSwitch.java +++ b/plugins/org.eclipse.datatools.modelbase.sql/src/org/eclipse/datatools/modelbase/sql/constraints/util/SQLConstraintsSwitch.java @@ -200,6 +200,15 @@ public class SQLConstraintsSwitch { if (result == null) result = defaultCase(theEObject); return result; } + case SQLConstraintsPackage.INDEX_EXPRESSION: { + IndexExpression indexExpression = (IndexExpression)theEObject; + Object result = caseIndexExpression(indexExpression); + if (result == null) result = caseSQLObject(indexExpression); + if (result == null) result = caseENamedElement(indexExpression); + if (result == null) result = caseEModelElement(indexExpression); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -355,6 +364,21 @@ public class SQLConstraintsSwitch { } /** + * Returns the result of interpreting the object as an instance of '<em>Index Expression</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Index Expression</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public Object caseIndexExpression(IndexExpression object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>EModel Element</em>'. * <!-- begin-user-doc --> * This implementation returns null; |

