--- /dev/null
+#!/usr/bin/perl -w
+# vim:filetype=perl
+
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl test.pl'
+
+use strict;
+use FindBin qw/$Bin/;
+use Data::Dumper;
+
+# run with -d for debug
+my %opt;
+BEGIN { map { $opt{$_}=1 if s/^-// } @ARGV; }
+use constant DEBUG => (exists $opt{d} ? 1 : 0);
+
+use Test::More;
+use Test::Exception;
+use SQL::Translator;
+use SQL::Translator::Schema::Constants;
+
+# Usefull test subs for the schema objs
+#=============================================================================
+
+sub test_field {
+ my ($f1,$test) = @_;
+
+ is( $f1->name, $test->{name}, " Field name '$test->{name}'" );
+
+ is( $f1->data_type, $test->{data_type}, " Type is '$test->{data_type}'" )
+ if exists $test->{data_type};
+
+ is( $f1->size, $test->{size}, " Size is '$test->{size}'" )
+ if exists $test->{size};
+
+ is( $f1->default_value, $test->{default_value},
+ " Default value is ".(defined($test->{default_value}) ? "'$test->{default_value}'" : "UNDEF" ) )
+ if exists $test->{default_value};
+
+ is( $f1->is_nullable, $test->{is_nullable},
+ " ".($test->{is_nullable} ? 'can' : 'cannot').' be null' )
+ if exists $test->{is_nullable};
+
+ is( $f1->is_unique, $test->{is_unique},
+ " ".($test->{is_unique} ? 'can' : 'cannot').' be unique' )
+ if exists $test->{is_unique};
+
+ is( $f1->is_primary_key, $test->{is_primary_key},
+ " is ".($test->{is_primary_key} ? '' : 'not').' a primary_key' )
+ if exists $test->{is_primary_key};
+
+ is( $f1->is_foreign_key, $test->{is_foreign_key},
+ " is ".($test->{is_foreign_key} ? '' : 'not').' a foreign_key' )
+ if exists $test->{is_foreign_key};
+
+ is( $f1->is_auto_increment, $test->{is_auto_increment},
+ " is ".($test->{is_auto_increment} ? '' : 'not').' an auto_increment' )
+ if exists $test->{is_auto_increment};
+}
+
+sub constraint_ok {
+ my ($con,$test) = @_;
+ #$test->{name} ||= "<anon>";
+
+ if ( exists $test->{name} ) {
+ is( $con->name, $test->{name}, " Constraint '$test->{name}'" );
+ }
+ else {
+ ok( $con, " Constraint" );
+ }
+
+ is( $con->type, $test->{type}, " type is '$test->{type}'" )
+ if exists $test->{type};
+
+ is( $con->table->name, $test->{table}, " table is '$test->{table}'" )
+ if exists $test->{table};
+
+ is( join(",",$con->fields), $test->{fields},
+ " fields is '$test->{fields}'" )
+ if exists $test->{fields};
+
+ is( $con->reference_table, $test->{reference_table},
+ " reference_table is '$test->{reference_table}'" )
+ if exists $test->{reference_table};
+
+ is( join(",",$con->reference_fields), $test->{reference_fields},
+ " reference_fields is '$test->{reference_fields}'" )
+ if exists $test->{reference_fields};
+
+ is( $con->match_type, $test->{match_type},
+ " match_type is '$test->{match_type}'" )
+ if exists $test->{match_type};
+
+ is( $con->on_delete_do, $test->{on_delete_do},
+ " on_delete_do is '$test->{on_delete_do}'" )
+ if exists $test->{on_delete_do};
+
+ is( $con->on_update_do, $test->{on_update_do},
+ " on_update_do is '$test->{on_update_do}'" )
+ if exists $test->{on_update_do};
+}
+
+sub test_table {
+ my $tbl = shift;
+ my %arg = @_;
+ $arg{constraints} ||= [];
+ my $name = $arg{name} || die "Need a table name to test.";
+
+ my @fldnames = map { $_->{name} } @{$arg{fields}};
+ is_deeply( [ map {$_->name} $tbl->get_fields ],
+ [ map {$_->{name}} @{$arg{fields}} ],
+ "Table $name\'s fields" );
+ foreach ( @{$arg{fields}} ) {
+ my $name = $_->{name} || die "Need a field name to test.";
+ test_field( $tbl->get_field($name), $_ );
+ }
+
+ if ( my @tcons = @{$arg{constraints}} ) {
+ my @cons = $tbl->get_constraints;
+ is(scalar(@cons), scalar(@tcons),
+ "Table $name has ".scalar(@tcons)." Constraints");
+ foreach ( @cons ) {
+ my $ans = { table => $tbl->name, %{shift @tcons}};
+ constraint_ok( $_, $ans );
+ }
+ }
+}
+
+# Testing 1,2,3,..
+#=============================================================================
+
+plan tests => 92;
+
+my $testschema = "$Bin/data/xmi/OrderDB.rationalprofile.poseidon2.xmi";
+die "Can't find test schema $testschema" unless -e $testschema;
+
+my $obj;
+$obj = SQL::Translator->new(
+ filename => $testschema,
+ from => 'XML-XMI-Rational',
+ to => 'MySQL',
+ debug => DEBUG,
+ show_warnings => 1,
+ add_drop_table => 0,
+);
+my $sql = $obj->translate;
+print $sql if DEBUG;
+
+#
+# Test the schema
+#
+my $scma = $obj->schema;
+is( $scma->is_valid, 1, 'Schema is valid' );
+my @tblnames = map {$_->name} $scma->get_tables;
+is(scalar(@{$scma->get_tables}), scalar(@tblnames), "Right number of tables");
+is_deeply( \@tblnames, [qw/Order OrderLine Customer/]
+ ,"tables");
+
+test_table( $scma->get_table("Customer"),
+ name => "Customer",
+ fields => [
+ {
+ name => "customerID",
+ data_type => "INT",
+ size => 10,
+ default_value => undef,
+ is_nullable => 0,
+ is_primary_key => 1,
+ },
+ {
+ name => "name",
+ data_type => "VARCHAR",
+ size => 255,
+ default_value => undef,
+ is_nullable => 0,
+ is_primary_key => 0,
+ },
+ {
+ name => "email",
+ data_type => "VARCHAR",
+ size => 255,
+ default_value => undef,
+ is_nullable => 1,
+ is_primary_key => 0,
+ },
+ ],
+ constraints => [
+ {
+ type => "PRIMARY KEY",
+ fields => "customerID",
+ },
+ {
+ name => "UniqueEmail",
+ type => "UNIQUE",
+ fields => "email",
+ },
+ ],
+);
+
+test_table( $scma->get_table("Order"),
+ name => "Order",
+ fields => [
+ {
+ name => "orderID",
+ data_type => "INT",
+ size => 10,
+ default_value => undef,
+ is_nullable => 0,
+ is_primary_key => 1,
+ },
+ {
+ name => "customerID",
+ data_type => "INT",
+ size => 10,
+ default_value => undef,
+ is_nullable => 0,
+ is_primary_key => 0,
+ is_foreign_key => 1,
+ },
+ {
+ name => "orderDate",
+ data_type => "DATE",
+ default_value => undef,
+ is_nullable => 0,
+ is_primary_key => 0,
+ },
+ ],
+ constraints => [
+ {
+ type => "PRIMARY KEY",
+ fields => "orderID",
+ },
+ {
+ type => "FOREIGN KEY",
+ fields => "customerID",
+ reference_table => "Customer",
+ reference_fields => "customerID",
+ },
+ ],
+ # TODO
+ #indexes => [
+ # {
+ # name => "idxOrderDate",
+ # type => "INDEX",
+ # fields => "orderDate",
+ # },
+ #],
+);
+
+
+test_table( $scma->get_table("OrderLine"),
+ name => "OrderLine",
+ fields => [
+ {
+ name => "lineNumber",
+ data_type => "INT",
+ size => 10,
+ default_value => 1,
+ is_nullable => 0,
+ is_primary_key => 1,
+ },
+ {
+ name => "orderID",
+ data_type => "INT",
+ size => 10,
+ default_value => undef,
+ is_nullable => 0,
+ is_primary_key => 0,
+ is_foreign_key => 1,
+ },
+ {
+ name => "quantity",
+ data_type => "INT",
+ size => 2,
+ default_value => 1,
+ is_nullable => 0,
+ is_primary_key => 0,
+ },
+ ],
+ constraints => [
+ {
+ type => "PRIMARY KEY",
+ fields => "lineNumber,orderID",
+ },
+ {
+ type => "FOREIGN KEY",
+ fields => "orderID",
+ reference_table => "Order",
+ reference_fields => "orderID",
+ },
+ ],
+);
<?xml version = '1.0' encoding = 'UTF-8' ?>\r
-<XMI xmi.version = '1.2' xmlns:UML = 'org.omg.xmi.namespace.UML' timestamp = 'Fri Sep 19 21:17:55 BST 2003'>\r
+<XMI xmi.version = '1.2' xmlns:UML = 'org.omg.xmi.namespace.UML' timestamp = 'Thu Oct 02 05:23:24 BST 2003'>\r
<XMI.header>\r
<XMI.documentation>\r
<XMI.exporter>Netbeans XMI Writer</XMI.exporter>\r
<UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7ff2'/>\r
</UML:StructuralFeature.type>\r
</UML:Attribute>\r
- <UML:Attribute xmi.id = '5539d8:f7b62bc3a2:-7ecb' name = 'productID' visibility = 'public'\r
- isSpecification = 'false' ownerScope = 'instance'>\r
- <UML:ModelElement.stereotype>\r
- <UML:Stereotype xmi.idref = '5539d8:f7b62bc3a2:-7e75'/>\r
- </UML:ModelElement.stereotype>\r
- <UML:ModelElement.taggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fde' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>INT</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff4'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fdd' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>10</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ffa'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fdc' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff2'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- </UML:ModelElement.taggedValue>\r
- <UML:StructuralFeature.type>\r
- <UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7ff2'/>\r
- </UML:StructuralFeature.type>\r
- </UML:Attribute>\r
<UML:Attribute xmi.id = '5539d8:f7b62bc3a2:-7f0f' name = 'quantity' visibility = 'public'\r
isSpecification = 'false' ownerScope = 'instance'>\r
<UML:Attribute.initialValue>\r
<UML:Operation xmi.idref = '5539d8:f7b62bc3a2:-7e7f'/>\r
</UML:Method.specification>\r
</UML:Method>\r
- <UML:Operation xmi.id = '5539d8:f7b62bc3a2:-7e7a' name = 'fkProduct' visibility = 'public'\r
- isSpecification = 'false' ownerScope = 'instance' isQuery = 'false' concurrency = 'sequential'\r
- isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>\r
- <UML:ModelElement.stereotype>\r
- <UML:Stereotype xmi.idref = '5539d8:f7b62bc3a2:-7e75'/>\r
- </UML:ModelElement.stereotype>\r
- <UML:BehavioralFeature.parameter>\r
- <UML:Parameter xmi.id = '5539d8:f7b62bc3a2:-7e79' name = 'productID' isSpecification = 'false'\r
- kind = 'inout'>\r
- <UML:Parameter.type>\r
- <UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7ff2'/>\r
- </UML:Parameter.type>\r
- </UML:Parameter>\r
- <UML:Parameter xmi.id = '5539d8:f7b62bc3a2:-7e78' name = 'return' isSpecification = 'false'\r
- kind = 'return'>\r
- <UML:Parameter.type>\r
- <UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7fd2'/>\r
- </UML:Parameter.type>\r
- </UML:Parameter>\r
- </UML:BehavioralFeature.parameter>\r
- </UML:Operation>\r
- <UML:Method xmi.id = '5539d8:f7b62bc3a2:-7e77' isSpecification = 'false'\r
- isQuery = 'false'>\r
- <UML:Method.body>\r
- <UML:ProcedureExpression xmi.id = '5539d8:f7b62bc3a2:-7e76' language = 'java'\r
- body = ''/>\r
- </UML:Method.body>\r
- <UML:Method.specification>\r
- <UML:Operation xmi.idref = '5539d8:f7b62bc3a2:-7e7a'/>\r
- </UML:Method.specification>\r
- </UML:Method>\r
</UML:Classifier.feature>\r
</UML:Class>\r
-\r
- \r
- \r
<UML:Association xmi.id = '5539d8:f7b62bc3a2:-7fee' isSpecification = 'false'\r
isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>\r
- <UML:Association.connection>\r
+ <UML:Association.connection>\r
<UML:AssociationEnd xmi.id = '5539d8:f7b62bc3a2:-7fed' name = 'pkOrder'\r
visibility = 'public' isSpecification = 'false' isNavigable = 'true' ordering = 'unordered'\r
aggregation = 'composite' targetScope = 'instance' changeability = 'changeable'>\r
</UML:AssociationEnd>\r
</UML:Association.connection>\r
</UML:Association>\r
- \r
- \r
- \r
- <UML:Class xmi.id = '5539d8:f7b62bc3a2:-7fe7' name = 'Customer' visibility = 'public'\r
+ <UML:Class xmi.id = '5539d8:f7b62bc3a2:-7fe7' name = 'Customer' visibility = 'public'\r
isSpecification = 'false' isRoot = 'false' isLeaf = 'false' isAbstract = 'false'\r
isActive = 'false'>\r
<UML:ModelElement.stereotype>\r
<UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7fe4'/>\r
</UML:StructuralFeature.type>\r
</UML:Attribute>\r
- </UML:Classifier.feature>\r
- </UML:Class>\r
- <UML:Association xmi.id = '5539d8:f7b62bc3a2:-7fe3' isSpecification = 'false'\r
- isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>\r
- <UML:Association.connection>\r
- <UML:AssociationEnd xmi.id = '5539d8:f7b62bc3a2:-7fe2' name = 'pkCustomer'\r
- visibility = 'public' isSpecification = 'false' isNavigable = 'true' ordering = 'unordered'\r
- aggregation = 'none' targetScope = 'instance' changeability = 'changeable'>\r
- <UML:AssociationEnd.multiplicity>\r
- <UML:Multiplicity xmi.id = '5539d8:f7b62bc3a2:-7fe1'>\r
- <UML:Multiplicity.range>\r
- <UML:MultiplicityRange xmi.id = '5539d8:f7b62bc3a2:-7fe0' lower = '1' upper = '1'/>\r
- </UML:Multiplicity.range>\r
- </UML:Multiplicity>\r
- </UML:AssociationEnd.multiplicity>\r
- <UML:AssociationEnd.participant>\r
- <UML:Class xmi.idref = '5539d8:f7b62bc3a2:-7fe7'/>\r
- </UML:AssociationEnd.participant>\r
- </UML:AssociationEnd>\r
- <UML:AssociationEnd xmi.id = '5539d8:f7b62bc3a2:-7fdf' name = 'fkCustomer'\r
- visibility = 'public' isSpecification = 'false' isNavigable = 'true' ordering = 'unordered'\r
- aggregation = 'none' targetScope = 'instance' changeability = 'changeable'>\r
- <UML:AssociationEnd.multiplicity>\r
- <UML:Multiplicity xmi.id = '5539d8:f7b62bc3a2:-7fde'>\r
- <UML:Multiplicity.range>\r
- <UML:MultiplicityRange xmi.id = '5539d8:f7b62bc3a2:-7fdd' lower = '0' upper = '-1'/>\r
- </UML:Multiplicity.range>\r
- </UML:Multiplicity>\r
- </UML:AssociationEnd.multiplicity>\r
- <UML:AssociationEnd.participant>\r
- <UML:Class xmi.idref = '5539d8:f7b62bc3a2:-7ff4'/>\r
- </UML:AssociationEnd.participant>\r
- </UML:AssociationEnd>\r
- </UML:Association.connection>\r
- </UML:Association>\r
- <UML:Class xmi.id = '5539d8:f7b62bc3a2:-7fdc' name = 'Product' visibility = 'public'\r
- isSpecification = 'false' isRoot = 'false' isLeaf = 'false' isAbstract = 'false'\r
- isActive = 'false'>\r
- <UML:ModelElement.stereotype>\r
- <UML:Stereotype xmi.idref = '5539d8:f7b62bc3a2:-7e9e'/>\r
- </UML:ModelElement.stereotype>\r
- <UML:Classifier.feature>\r
- <UML:Attribute xmi.id = '5539d8:f7b62bc3a2:-7ec9' name = 'productID' visibility = 'public'\r
- isSpecification = 'false' ownerScope = 'instance'>\r
- <UML:ModelElement.stereotype>\r
- <UML:Stereotype xmi.idref = '5539d8:f7b62bc3a2:-7e9d'/>\r
- </UML:ModelElement.stereotype>\r
- <UML:ModelElement.taggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fd5' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>INT</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff4'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fd4' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>10</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ffa'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fd3' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff2'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- </UML:ModelElement.taggedValue>\r
- <UML:StructuralFeature.type>\r
- <UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7ff2'/>\r
- </UML:StructuralFeature.type>\r
- </UML:Attribute>\r
- <UML:Attribute xmi.id = '5539d8:f7b62bc3a2:-7efa' name = 'name' visibility = 'public'\r
- isSpecification = 'false' ownerScope = 'instance'>\r
- <UML:ModelElement.stereotype>\r
- <UML:Stereotype xmi.idref = '9a1411:f7ba136dae:-7ffb'/>\r
- </UML:ModelElement.stereotype>\r
- <UML:ModelElement.taggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fd2' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>VARCHAR</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff4'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fd1' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>255</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ffa'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fd0' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue></UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff2'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- </UML:ModelElement.taggedValue>\r
- <UML:StructuralFeature.type>\r
- <UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7fe4'/>\r
- </UML:StructuralFeature.type>\r
- </UML:Attribute>\r
- <UML:Attribute xmi.id = '5539d8:f7b62bc3a2:-7ef9' name = 'description' visibility = 'public'\r
- isSpecification = 'false' ownerScope = 'instance'>\r
- <UML:ModelElement.stereotype>\r
- <UML:Stereotype xmi.idref = '9a1411:f7ba136dae:-7ffb'/>\r
- </UML:ModelElement.stereotype>\r
- <UML:ModelElement.taggedValue>\r
- <UML:TaggedValue xmi.id = '1f5eb7f:f7bb15dc4a:-7fcf' isSpecification = 'false'>\r
- <UML:TaggedValue.dataValue>TEXT</UML:TaggedValue.dataValue>\r
- <UML:TaggedValue.type>\r
- <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff4'/>\r
- </UML:TaggedValue.type>\r
- </UML:TaggedValue>\r
- </UML:ModelElement.taggedValue>\r
- <UML:StructuralFeature.type>\r
- <UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7ef8'/>\r
- </UML:StructuralFeature.type>\r
- </UML:Attribute>\r
- <UML:Operation xmi.id = '53bbfa:f7b73843fd:-7f76' name = 'pkProduct' visibility = 'public'\r
+ <UML:Operation xmi.id = '5539d8:f7b62bc3a2:-7d47' name = 'pkCustomer' visibility = 'public'\r
isSpecification = 'false' ownerScope = 'instance' isQuery = 'false' concurrency = 'sequential'\r
isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>\r
<UML:ModelElement.stereotype>\r
<UML:Stereotype xmi.idref = '5539d8:f7b62bc3a2:-7e9d'/>\r
</UML:ModelElement.stereotype>\r
<UML:BehavioralFeature.parameter>\r
- <UML:Parameter xmi.id = '53bbfa:f7b73843fd:-7f75' name = 'productID' isSpecification = 'false'\r
+ <UML:Parameter xmi.id = '5539d8:f7b62bc3a2:-7d46' name = 'customerID' isSpecification = 'false'\r
kind = 'inout'>\r
<UML:Parameter.type>\r
<UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7ff2'/>\r
</UML:Parameter.type>\r
</UML:Parameter>\r
- <UML:Parameter xmi.id = '53bbfa:f7b73843fd:-7f74' name = 'return' isSpecification = 'false'\r
+ <UML:Parameter xmi.id = '5539d8:f7b62bc3a2:-7d45' name = 'return' isSpecification = 'false'\r
kind = 'return'>\r
<UML:Parameter.type>\r
<UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7fd2'/>\r
</UML:Parameter>\r
</UML:BehavioralFeature.parameter>\r
</UML:Operation>\r
- <UML:Method xmi.id = '53bbfa:f7b73843fd:-7f73' isSpecification = 'false'\r
+ <UML:Method xmi.id = '5539d8:f7b62bc3a2:-7d44' isSpecification = 'false'\r
isQuery = 'false'>\r
<UML:Method.body>\r
- <UML:ProcedureExpression xmi.id = '53bbfa:f7b73843fd:-7f72' language = 'java'\r
+ <UML:ProcedureExpression xmi.id = '5539d8:f7b62bc3a2:-7d43' language = 'java'\r
body = ''/>\r
</UML:Method.body>\r
<UML:Method.specification>\r
- <UML:Operation xmi.idref = '53bbfa:f7b73843fd:-7f76'/>\r
+ <UML:Operation xmi.idref = '5539d8:f7b62bc3a2:-7d47'/>\r
</UML:Method.specification>\r
</UML:Method>\r
- <UML:Operation xmi.id = '9a1411:f7ba136dae:-7f63' name = 'UniqueName' visibility = 'public'\r
- isSpecification = 'false' ownerScope = 'instance' isQuery = 'false' concurrency = 'sequential'\r
- isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>\r
+ <UML:Operation xmi.id = '1159e0c:f7fa095dac:-7ff9' name = 'UniqueEmail'\r
+ visibility = 'public' isSpecification = 'false' ownerScope = 'instance'\r
+ isQuery = 'false' concurrency = 'sequential' isRoot = 'false' isLeaf = 'false'\r
+ isAbstract = 'false'>\r
<UML:ModelElement.stereotype>\r
<UML:Stereotype xmi.idref = '5539d8:f7b62bc3a2:-7e73'/>\r
</UML:ModelElement.stereotype>\r
+ <UML:ModelElement.taggedValue>\r
+ <UML:TaggedValue xmi.id = '1159e0c:f7fa095dac:-7fb3' isSpecification = 'false'>\r
+ <UML:TaggedValue.dataValue>255</UML:TaggedValue.dataValue>\r
+ <UML:TaggedValue.type>\r
+ <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ffa'/>\r
+ </UML:TaggedValue.type>\r
+ </UML:TaggedValue>\r
+ </UML:ModelElement.taggedValue>\r
<UML:BehavioralFeature.parameter>\r
- <UML:Parameter xmi.id = '9a1411:f7ba136dae:-7f62' name = 'name' isSpecification = 'false'\r
+ <UML:Parameter xmi.id = '1159e0c:f7fa095dac:-7ff8' name = 'email' isSpecification = 'false'\r
kind = 'inout'>\r
<UML:Parameter.type>\r
<UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7fe4'/>\r
</UML:Parameter.type>\r
</UML:Parameter>\r
- <UML:Parameter xmi.id = '9a1411:f7ba136dae:-7f61' name = 'return' isSpecification = 'false'\r
+ <UML:Parameter xmi.id = '1159e0c:f7fa095dac:-7ff7' name = 'return' isSpecification = 'false'\r
kind = 'return'>\r
<UML:Parameter.type>\r
<UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7fd2'/>\r
</UML:Parameter>\r
</UML:BehavioralFeature.parameter>\r
</UML:Operation>\r
- <UML:Method xmi.id = '9a1411:f7ba136dae:-7f60' isSpecification = 'false'\r
+ <UML:Method xmi.id = '1159e0c:f7fa095dac:-7ff6' isSpecification = 'false'\r
isQuery = 'false'>\r
<UML:Method.body>\r
- <UML:ProcedureExpression xmi.id = '9a1411:f7ba136dae:-7f5f' language = 'java'\r
+ <UML:ProcedureExpression xmi.id = '1159e0c:f7fa095dac:-7ff5' language = 'java'\r
body = ''/>\r
</UML:Method.body>\r
<UML:Method.specification>\r
- <UML:Operation xmi.idref = '9a1411:f7ba136dae:-7f63'/>\r
+ <UML:Operation xmi.idref = '1159e0c:f7fa095dac:-7ff9'/>\r
</UML:Method.specification>\r
</UML:Method>\r
+ <UML:Attribute xmi.id = '1159e0c:f7fa095dac:-7ff4' name = 'email' visibility = 'public'\r
+ isSpecification = 'false' ownerScope = 'instance'>\r
+ <UML:ModelElement.stereotype>\r
+ <UML:Stereotype xmi.idref = '9a1411:f7ba136dae:-7ffb'/>\r
+ </UML:ModelElement.stereotype>\r
+ <UML:ModelElement.taggedValue>\r
+ <UML:TaggedValue xmi.id = '1159e0c:f7fa095dac:-7fb0' isSpecification = 'false'>\r
+ <UML:TaggedValue.dataValue>VARCHAR</UML:TaggedValue.dataValue>\r
+ <UML:TaggedValue.type>\r
+ <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff4'/>\r
+ </UML:TaggedValue.type>\r
+ </UML:TaggedValue>\r
+ <UML:TaggedValue xmi.id = '1159e0c:f7fa095dac:-7faf' isSpecification = 'false'>\r
+ <UML:TaggedValue.dataValue>255</UML:TaggedValue.dataValue>\r
+ <UML:TaggedValue.type>\r
+ <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ffa'/>\r
+ </UML:TaggedValue.type>\r
+ </UML:TaggedValue>\r
+ <UML:TaggedValue xmi.id = '1159e0c:f7fa095dac:-7fae' isSpecification = 'false'>\r
+ <UML:TaggedValue.dataValue>1</UML:TaggedValue.dataValue>\r
+ <UML:TaggedValue.type>\r
+ <UML:TagDefinition xmi.idref = '1f5eb7f:f7bb15dc4a:-7ff2'/>\r
+ </UML:TaggedValue.type>\r
+ </UML:TaggedValue>\r
+ </UML:ModelElement.taggedValue>\r
+ <UML:StructuralFeature.type>\r
+ <UML:DataType xmi.idref = '5539d8:f7b62bc3a2:-7fe4'/>\r
+ </UML:StructuralFeature.type>\r
+ </UML:Attribute>\r
</UML:Classifier.feature>\r
</UML:Class>\r
- <UML:Association xmi.id = '5539d8:f7b62bc3a2:-7fdb' isSpecification = 'false'\r
+ <UML:Association xmi.id = '5539d8:f7b62bc3a2:-7fe3' isSpecification = 'false'\r
isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>\r
<UML:Association.connection>\r
- <UML:AssociationEnd xmi.id = '5539d8:f7b62bc3a2:-7fda' name = 'pkProduct'\r
+ <UML:AssociationEnd xmi.id = '5539d8:f7b62bc3a2:-7fe2' name = 'pkCustomer'\r
visibility = 'public' isSpecification = 'false' isNavigable = 'true' ordering = 'unordered'\r
aggregation = 'none' targetScope = 'instance' changeability = 'changeable'>\r
<UML:AssociationEnd.multiplicity>\r
- <UML:Multiplicity xmi.id = '5539d8:f7b62bc3a2:-7fd9'>\r
+ <UML:Multiplicity xmi.id = '5539d8:f7b62bc3a2:-7fe1'>\r
<UML:Multiplicity.range>\r
- <UML:MultiplicityRange xmi.id = '5539d8:f7b62bc3a2:-7fd8' lower = '1' upper = '1'/>\r
+ <UML:MultiplicityRange xmi.id = '5539d8:f7b62bc3a2:-7fe0' lower = '1' upper = '1'/>\r
</UML:Multiplicity.range>\r
</UML:Multiplicity>\r
</UML:AssociationEnd.multiplicity>\r
<UML:AssociationEnd.participant>\r
- <UML:Class xmi.idref = '5539d8:f7b62bc3a2:-7fdc'/>\r
+ <UML:Class xmi.idref = '5539d8:f7b62bc3a2:-7fe7'/>\r
</UML:AssociationEnd.participant>\r
</UML:AssociationEnd>\r
- <UML:AssociationEnd xmi.id = '5539d8:f7b62bc3a2:-7fd7' name = 'fkProduct'\r
+ <UML:AssociationEnd xmi.id = '5539d8:f7b62bc3a2:-7fdf' name = 'fkCustomer'\r
visibility = 'public' isSpecification = 'false' isNavigable = 'true' ordering = 'unordered'\r
aggregation = 'none' targetScope = 'instance' changeability = 'changeable'>\r
<UML:AssociationEnd.multiplicity>\r
- <UML:Multiplicity xmi.id = '5539d8:f7b62bc3a2:-7ef7'>\r
+ <UML:Multiplicity xmi.id = '5539d8:f7b62bc3a2:-7fde'>\r
<UML:Multiplicity.range>\r
- <UML:MultiplicityRange xmi.id = '5539d8:f7b62bc3a2:-7ef6' lower = '0' upper = '-1'/>\r
+ <UML:MultiplicityRange xmi.id = '5539d8:f7b62bc3a2:-7fdd' lower = '0' upper = '-1'/>\r
</UML:Multiplicity.range>\r
</UML:Multiplicity>\r
</UML:AssociationEnd.multiplicity>\r
<UML:AssociationEnd.participant>\r
- <UML:Class xmi.idref = '5539d8:f7b62bc3a2:-7fef'/>\r
+ <UML:Class xmi.idref = '5539d8:f7b62bc3a2:-7ff4'/>\r
</UML:AssociationEnd.participant>\r
</UML:AssociationEnd>\r
</UML:Association.connection>\r
isSpecification = 'false' isRoot = 'false' isLeaf = 'false' isAbstract = 'false'>\r
<UML:Stereotype.baseClass>ModelElement</UML:Stereotype.baseClass>\r
</UML:Stereotype>\r
+ <UML:Class xmi.id = '1159e0c:f7fa095dac:-7ff3' name = 'email' visibility = 'public'\r
+ isSpecification = 'false' isRoot = 'false' isLeaf = 'false' isAbstract = 'false'\r
+ isActive = 'false'/>\r
</UML:Namespace.ownedElement>\r
</UML:Model>\r
<UML:TagDefinition xmi.id = '1f5eb7f:f7bb15dc4a:-7ffa' name = 'size' isSpecification = 'false'\r