001// license-header java merge-point 002// 003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify! 004// 005package org.andromda.cartridges.ejb.metafacades; 006 007import java.util.Collection; 008import org.andromda.core.common.Introspector; 009import org.andromda.core.metafacade.MetafacadeBase; 010import org.andromda.core.metafacade.MetafacadeFactory; 011import org.andromda.core.metafacade.ModelValidationMessage; 012import org.andromda.metafacades.uml.AssociationEndFacade; 013import org.andromda.metafacades.uml.AssociationFacade; 014import org.andromda.metafacades.uml.ClassifierFacade; 015import org.andromda.metafacades.uml.ConstraintFacade; 016import org.andromda.metafacades.uml.DependencyFacade; 017import org.andromda.metafacades.uml.EntityAssociationEnd; 018import org.andromda.metafacades.uml.ModelElementFacade; 019import org.andromda.metafacades.uml.ModelFacade; 020import org.andromda.metafacades.uml.PackageFacade; 021import org.andromda.metafacades.uml.StateMachineFacade; 022import org.andromda.metafacades.uml.StereotypeFacade; 023import org.andromda.metafacades.uml.TaggedValueFacade; 024import org.andromda.metafacades.uml.TemplateParameterFacade; 025import org.andromda.metafacades.uml.TypeMappings; 026 027/** 028 * Represents an EJB association end. 029 * MetafacadeLogic for EJBAssociationEndFacade 030 * 031 * @see EJBAssociationEndFacade 032 */ 033public abstract class EJBAssociationEndFacadeLogic 034 extends MetafacadeBase 035 implements EJBAssociationEndFacade 036{ 037 /** 038 * The underlying UML object 039 * @see Object 040 */ 041 protected Object metaObject; 042 043 /** Create Metafacade implementation instance using the MetafacadeFactory from the context 044 * @param metaObjectIn 045 * @param context 046 */ 047 protected EJBAssociationEndFacadeLogic(Object metaObjectIn, String context) 048 { 049 super(metaObjectIn, getContext(context)); 050 this.superEntityAssociationEnd = 051 (EntityAssociationEnd) 052 MetafacadeFactory.getInstance().createFacadeImpl( 053 "org.andromda.metafacades.uml.EntityAssociationEnd", 054 metaObjectIn, 055 getContext(context)); 056 this.metaObject = metaObjectIn; 057 } 058 059 /** 060 * Gets the context for this metafacade logic instance. 061 * @param context String. Set to EJBAssociationEndFacade if null 062 * @return context String 063 */ 064 private static String getContext(String context) 065 { 066 if (context == null) 067 { 068 context = "org.andromda.cartridges.ejb.metafacades.EJBAssociationEndFacade"; 069 } 070 return context; 071 } 072 073 private EntityAssociationEnd superEntityAssociationEnd; 074 private boolean superEntityAssociationEndInitialized = false; 075 076 /** 077 * Gets the EntityAssociationEnd parent instance. 078 * @return this.superEntityAssociationEnd EntityAssociationEnd 079 */ 080 private EntityAssociationEnd getSuperEntityAssociationEnd() 081 { 082 if (!this.superEntityAssociationEndInitialized) 083 { 084 ((MetafacadeBase)this.superEntityAssociationEnd).setMetafacadeContext(this.getMetafacadeContext()); 085 this.superEntityAssociationEndInitialized = true; 086 } 087 return this.superEntityAssociationEnd; 088 } 089 090 /** Reset context only for non-root metafacades 091 * @param context 092 * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context) 093 */ 094 @Override 095 public void resetMetafacadeContext(String context) 096 { 097 if (!this.contextRoot) // reset context only for non-root metafacades 098 { 099 context = getContext(context); // to have same value as in original constructor call 100 setMetafacadeContext (context); 101 if (this.superEntityAssociationEndInitialized) 102 { 103 ((MetafacadeBase)this.superEntityAssociationEnd).resetMetafacadeContext(context); 104 } 105 } 106 } 107 108 /** 109 * @return boolean true always 110 * @see EJBAssociationEndFacade 111 */ 112 public boolean isEJBAssociationEndFacadeMetaType() 113 { 114 return true; 115 } 116 117 // --------------- attributes --------------------- 118 119 /** 120 * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationEndFacade#getRelationType() 121 * @return String 122 */ 123 protected abstract String handleGetRelationType(); 124 125 private String __relationType1a; 126 private boolean __relationType1aSet = false; 127 128 /** 129 * The target type for a relation. If the relation target has a multiplicity of 0..1 or 1, this 130 * is the fully qualified type name of the target. If it has a multiplicity of >1, this is the 131 * string 'Collection' 132 * @return (String)handleGetRelationType() 133 */ 134 public final String getRelationType() 135 { 136 String relationType1a = this.__relationType1a; 137 if (!this.__relationType1aSet) 138 { 139 // relationType has no pre constraints 140 relationType1a = handleGetRelationType(); 141 // relationType has no post constraints 142 this.__relationType1a = relationType1a; 143 if (isMetafacadePropertyCachingEnabled()) 144 { 145 this.__relationType1aSet = true; 146 } 147 } 148 return relationType1a; 149 } 150 151 /** 152 * @return true 153 * @see EntityAssociationEnd 154 */ 155 public boolean isEntityAssociationEndMetaType() 156 { 157 return true; 158 } 159 160 /** 161 * @return true 162 * @see AssociationEndFacade 163 */ 164 public boolean isAssociationEndFacadeMetaType() 165 { 166 return true; 167 } 168 169 /** 170 * @return true 171 * @see ModelElementFacade 172 */ 173 public boolean isModelElementFacadeMetaType() 174 { 175 return true; 176 } 177 178 // ----------- delegates to EntityAssociationEnd ------------ 179 /** 180 * A name suitable for use when adding new elements to this association end in programming code. 181 * @see AssociationEndFacade#getAdderName() 182 */ 183 public String getAdderName() 184 { 185 return this.getSuperEntityAssociationEnd().getAdderName(); 186 } 187 188 /** 189 * Returns the value of the 'Aggregation' attribute (none, shared, composite). The default value 190 * is "none". The literals are from the enumeration org.eclipse.uml2.uml.AggregationKind. 191 * Specifies the kind of aggregation that applies to the Property. 192 * @see AssociationEndFacade#getAggregationKind() 193 */ 194 public String getAggregationKind() 195 { 196 return this.getSuperEntityAssociationEnd().getAggregationKind(); 197 } 198 199 /** 200 * The association owning this association end. 201 * @see AssociationEndFacade#getAssociation() 202 */ 203 public AssociationFacade getAssociation() 204 { 205 return this.getSuperEntityAssociationEnd().getAssociation(); 206 } 207 208 /** 209 * UML2: Returns the value of the 'Default' attribute. Specifies a String that represents a 210 * value to be used when no argument is supplied for the Property. A String that is evaluated to 211 * give a default value for the Property when an object of the owning Classifier is 212 * instantiated. Can be something like: new ValueObject(values); 213 * @see AssociationEndFacade#getDefault() 214 */ 215 public String getDefault() 216 { 217 return this.getSuperEntityAssociationEnd().getDefault(); 218 } 219 220 /** 221 * A name suitable for use when accessing this association end in programming code. 222 * @see AssociationEndFacade#getGetterName() 223 */ 224 public String getGetterName() 225 { 226 return this.getSuperEntityAssociationEnd().getGetterName(); 227 } 228 229 /** 230 * The name of the type that is returned on the accessor and mutator operations, determined in 231 * part by the multiplicity. 232 * @see AssociationEndFacade#getGetterSetterTypeName() 233 */ 234 public String getGetterSetterTypeName() 235 { 236 return this.getSuperEntityAssociationEnd().getGetterSetterTypeName(); 237 } 238 239 /** 240 * the lower value for the multiplicity 241 * -only applicable for UML2 242 * @see AssociationEndFacade#getLower() 243 */ 244 public int getLower() 245 { 246 return this.getSuperEntityAssociationEnd().getLower(); 247 } 248 249 /** 250 * The other association end owned by this end's association. 251 * @see AssociationEndFacade#getOtherEnd() 252 */ 253 public AssociationEndFacade getOtherEnd() 254 { 255 return this.getSuperEntityAssociationEnd().getOtherEnd(); 256 } 257 258 /** 259 * A name suitable for use when removing element from this association end in programming code. 260 * @see AssociationEndFacade#getRemoverName() 261 */ 262 public String getRemoverName() 263 { 264 return this.getSuperEntityAssociationEnd().getRemoverName(); 265 } 266 267 /** 268 * A name suitable for use when accessing this association end in programming code. 269 * @see AssociationEndFacade#getSetterName() 270 */ 271 public String getSetterName() 272 { 273 return this.getSuperEntityAssociationEnd().getSetterName(); 274 } 275 276 /** 277 * The classifier attached to this association end. 278 * @see AssociationEndFacade#getType() 279 */ 280 public ClassifierFacade getType() 281 { 282 return this.getSuperEntityAssociationEnd().getType(); 283 } 284 285 /** 286 * the upper value for the multiplicity (will be -1 for *) 287 * -only applicable for UML2 288 * @see AssociationEndFacade#getUpper() 289 */ 290 public int getUpper() 291 { 292 return this.getSuperEntityAssociationEnd().getUpper(); 293 } 294 295 /** 296 * True if this association end represents an aggregation relationship. 297 * @see AssociationEndFacade#isAggregation() 298 */ 299 public boolean isAggregation() 300 { 301 return this.getSuperEntityAssociationEnd().isAggregation(); 302 } 303 304 /** 305 * Is true if update of one side of the association should also update the other side. false if 306 * not. 307 * @see AssociationEndFacade#isBidirectional() 308 */ 309 public boolean isBidirectional() 310 { 311 return this.getSuperEntityAssociationEnd().isBidirectional(); 312 } 313 314 /** 315 * Returns whether or not (true/false) this association end is the child end of the assocation 316 * (i.e. the other end's aggregation is composition). 317 * @see AssociationEndFacade#isChild() 318 */ 319 public boolean isChild() 320 { 321 return this.getSuperEntityAssociationEnd().isChild(); 322 } 323 324 /** 325 * True if this association end represents a composition relationship. 326 * @see AssociationEndFacade#isComposition() 327 */ 328 public boolean isComposition() 329 { 330 return this.getSuperEntityAssociationEnd().isComposition(); 331 } 332 333 /** 334 * If the association end is derived (its value is computed). UML2 only. UML14 always returns 335 * false. Default=false. 336 * @see AssociationEndFacade#isDerived() 337 */ 338 public boolean isDerived() 339 { 340 return this.getSuperEntityAssociationEnd().isDerived(); 341 } 342 343 /** 344 * IsLeaf property in the association end property. If true, attribute is final, cannot be 345 * extended or implemented by a descendant. Default=false. 346 * @see AssociationEndFacade#isLeaf() 347 */ 348 public boolean isLeaf() 349 { 350 return this.getSuperEntityAssociationEnd().isLeaf(); 351 } 352 353 /** 354 * True if this association end's multiplicity is greater than one. 355 * @see AssociationEndFacade#isMany() 356 */ 357 public boolean isMany() 358 { 359 return this.getSuperEntityAssociationEnd().isMany(); 360 } 361 362 /** 363 * True if this association end's and the other end's multiplicities are both many. 364 * @see AssociationEndFacade#isMany2Many() 365 */ 366 public boolean isMany2Many() 367 { 368 return this.getSuperEntityAssociationEnd().isMany2Many(); 369 } 370 371 /** 372 * True if this association end's multiplicity is many while the other end's is one. 373 * @see AssociationEndFacade#isMany2One() 374 */ 375 public boolean isMany2One() 376 { 377 return this.getSuperEntityAssociationEnd().isMany2One(); 378 } 379 380 /** 381 * True if it is possible to navigate from the other end to this association end . 382 * @see AssociationEndFacade#isNavigable() 383 */ 384 public boolean isNavigable() 385 { 386 return this.getSuperEntityAssociationEnd().isNavigable(); 387 } 388 389 /** 390 * True if this association end's multiplicity is one while the other end's is many. 391 * @see AssociationEndFacade#isOne2Many() 392 */ 393 public boolean isOne2Many() 394 { 395 return this.getSuperEntityAssociationEnd().isOne2Many(); 396 } 397 398 /** 399 * True if this association end's and the other end's multiplicities are both one. 400 * @see AssociationEndFacade#isOne2One() 401 */ 402 public boolean isOne2One() 403 { 404 return this.getSuperEntityAssociationEnd().isOne2One(); 405 } 406 407 /** 408 * Indicates whether or not the association ends are ordered (if multiplicity is greater than 409 * 1). 410 * @see AssociationEndFacade#isOrdered() 411 */ 412 public boolean isOrdered() 413 { 414 return this.getSuperEntityAssociationEnd().isOrdered(); 415 } 416 417 /** 418 * True if the association end cannot be changed. 419 * @see AssociationEndFacade#isReadOnly() 420 */ 421 public boolean isReadOnly() 422 { 423 return this.getSuperEntityAssociationEnd().isReadOnly(); 424 } 425 426 /** 427 * True if this association end's multiplicity is strictly greater than zero. 428 * @see AssociationEndFacade#isRequired() 429 */ 430 public boolean isRequired() 431 { 432 return this.getSuperEntityAssociationEnd().isRequired(); 433 } 434 435 /** 436 * Indicates if this associationEnd is 'static', meaning it has a classifier scope. 437 * @see AssociationEndFacade#isStatic() 438 */ 439 public boolean isStatic() 440 { 441 return this.getSuperEntityAssociationEnd().isStatic(); 442 } 443 444 /** 445 * UML2: If the association attribute is unique within the Collection type. UML14 always returns 446 * false. Unique+Ordered determines the implementation Collection type. Default=false. 447 * @see AssociationEndFacade#isUnique() 448 */ 449 public boolean isUnique() 450 { 451 return this.getSuperEntityAssociationEnd().isUnique(); 452 } 453 454 /** 455 * The name of the index to create on a column that persists the foreign key attribute. 456 * @see EntityAssociationEnd#getColumnIndex() 457 */ 458 public String getColumnIndex() 459 { 460 return this.getSuperEntityAssociationEnd().getColumnIndex(); 461 } 462 463 /** 464 * The name of the column that makes up the foreign key. 465 * @see EntityAssociationEnd#getColumnName() 466 */ 467 public String getColumnName() 468 { 469 return this.getSuperEntityAssociationEnd().getColumnName(); 470 } 471 472 /** 473 * The name of the foreign key constraint to use for databases. 474 * @see EntityAssociationEnd#getForeignKeyConstraintName() 475 */ 476 public String getForeignKeyConstraintName() 477 { 478 return this.getSuperEntityAssociationEnd().getForeignKeyConstraintName(); 479 } 480 481 /** 482 * The current foreign key suffix specified for this entity association end facade. 483 * @see EntityAssociationEnd#getForeignKeySuffix() 484 */ 485 public String getForeignKeySuffix() 486 { 487 return this.getSuperEntityAssociationEnd().getForeignKeySuffix(); 488 } 489 490 /** 491 * The SQL type for this the foreign key column of this association end. 492 * @see EntityAssociationEnd#getSqlType() 493 */ 494 public String getSqlType() 495 { 496 return this.getSuperEntityAssociationEnd().getSqlType(); 497 } 498 499 /** 500 * The name of the unique-key that this unique association end belongs 501 * @see EntityAssociationEnd#getUniqueGroup() 502 */ 503 public String getUniqueGroup() 504 { 505 return this.getSuperEntityAssociationEnd().getUniqueGroup(); 506 } 507 508 /** 509 * Indicates whether or not a foreign identifier should be used for the entity that owns this 510 * association end. This would only make sense in the case of a child in a one-to-one 511 * parent-child association. If this flag is true, then the identifier of this entity should 512 * also be used as the foreign key to the related parent entity. 513 * @see EntityAssociationEnd#isForeignIdentifier() 514 */ 515 public boolean isForeignIdentifier() 516 { 517 return this.getSuperEntityAssociationEnd().isForeignIdentifier(); 518 } 519 520 /** 521 * True if this association is an identifier for its entity. 522 * @see EntityAssociationEnd#isIdentifier() 523 */ 524 public boolean isIdentifier() 525 { 526 return this.getSuperEntityAssociationEnd().isIdentifier(); 527 } 528 529 /** 530 * True if the associationEnd is marked with identifiers stereotype, false otherwise. 531 * @see EntityAssociationEnd#isIdentifiersPresent() 532 */ 533 public boolean isIdentifiersPresent() 534 { 535 return this.getSuperEntityAssociationEnd().isIdentifiersPresent(); 536 } 537 538 /** 539 * Indicates this association end should be ignored by the persistence layer. 540 * @see EntityAssociationEnd#isTransient() 541 */ 542 public boolean isTransient() 543 { 544 return this.getSuperEntityAssociationEnd().isTransient(); 545 } 546 547 /** 548 * Copies all tagged values from the given ModelElementFacade to this model element facade. 549 * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element) 550 */ 551 public void copyTaggedValues(ModelElementFacade element) 552 { 553 this.getSuperEntityAssociationEnd().copyTaggedValues(element); 554 } 555 556 /** 557 * Finds the tagged value with the specified 'tagName'. In case there are more values the first 558 * one found will be returned. 559 * @see ModelElementFacade#findTaggedValue(String tagName) 560 */ 561 public Object findTaggedValue(String tagName) 562 { 563 return this.getSuperEntityAssociationEnd().findTaggedValue(tagName); 564 } 565 566 /** 567 * Returns all the values for the tagged value with the specified name. The returned collection 568 * will contains only String instances, or will be empty. Never null. 569 * @see ModelElementFacade#findTaggedValues(String tagName) 570 */ 571 public Collection<Object> findTaggedValues(String tagName) 572 { 573 return this.getSuperEntityAssociationEnd().findTaggedValues(tagName); 574 } 575 576 /** 577 * Returns the fully qualified name of the model element. The fully qualified name includes 578 * complete package qualified name of the underlying model element. The templates parameter will 579 * be replaced by the correct one given the binding relation of the parameter to this element. 580 * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement) 581 */ 582 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement) 583 { 584 return this.getSuperEntityAssociationEnd().getBindedFullyQualifiedName(bindedElement); 585 } 586 587 /** 588 * Gets all constraints belonging to the model element. 589 * @see ModelElementFacade#getConstraints() 590 */ 591 public Collection<ConstraintFacade> getConstraints() 592 { 593 return this.getSuperEntityAssociationEnd().getConstraints(); 594 } 595 596 /** 597 * Returns the constraints of the argument kind that have been placed onto this model. Typical 598 * kinds are "inv", "pre" and "post". Other kinds are possible. 599 * @see ModelElementFacade#getConstraints(String kind) 600 */ 601 public Collection<ConstraintFacade> getConstraints(String kind) 602 { 603 return this.getSuperEntityAssociationEnd().getConstraints(kind); 604 } 605 606 /** 607 * Gets the documentation for the model element, The indent argument is prefixed to each line. 608 * By default this method wraps lines after 64 characters. 609 * This method is equivalent to <code>getDocumentation(indent, 64)</code>. 610 * @see ModelElementFacade#getDocumentation(String indent) 611 */ 612 public String getDocumentation(String indent) 613 { 614 return this.getSuperEntityAssociationEnd().getDocumentation(indent); 615 } 616 617 /** 618 * This method returns the documentation for this model element, with the lines wrapped after 619 * the specified number of characters, values of less than 1 will indicate no line wrapping is 620 * required. By default paragraphs are returned as HTML. 621 * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>. 622 * @see ModelElementFacade#getDocumentation(String indent, int lineLength) 623 */ 624 public String getDocumentation(String indent, int lineLength) 625 { 626 return this.getSuperEntityAssociationEnd().getDocumentation(indent, lineLength); 627 } 628 629 /** 630 * This method returns the documentation for this model element, with the lines wrapped after 631 * the specified number of characters, values of less than 1 will indicate no line wrapping is 632 * required. HTML style determines if HTML Escaping is applied. 633 * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle) 634 */ 635 public String getDocumentation(String indent, int lineLength, boolean htmlStyle) 636 { 637 return this.getSuperEntityAssociationEnd().getDocumentation(indent, lineLength, htmlStyle); 638 } 639 640 /** 641 * The fully qualified name of this model element. 642 * @see ModelElementFacade#getFullyQualifiedName() 643 */ 644 public String getFullyQualifiedName() 645 { 646 return this.getSuperEntityAssociationEnd().getFullyQualifiedName(); 647 } 648 649 /** 650 * Returns the fully qualified name of the model element. The fully qualified name includes 651 * complete package qualified name of the underlying model element. If modelName is true, then 652 * the original name of the model element (the name contained within the model) will be the name 653 * returned, otherwise a name from a language mapping will be returned. 654 * @see ModelElementFacade#getFullyQualifiedName(boolean modelName) 655 */ 656 public String getFullyQualifiedName(boolean modelName) 657 { 658 return this.getSuperEntityAssociationEnd().getFullyQualifiedName(modelName); 659 } 660 661 /** 662 * Returns the fully qualified name as a path, the returned value always starts with out a slash 663 * '/'. 664 * @see ModelElementFacade#getFullyQualifiedNamePath() 665 */ 666 public String getFullyQualifiedNamePath() 667 { 668 return this.getSuperEntityAssociationEnd().getFullyQualifiedNamePath(); 669 } 670 671 /** 672 * Gets the unique identifier of the underlying model element. 673 * @see ModelElementFacade#getId() 674 */ 675 public String getId() 676 { 677 return this.getSuperEntityAssociationEnd().getId(); 678 } 679 680 /** 681 * UML2: Retrieves the keywords for this element. Used to modify implementation properties which 682 * are not represented by other properties, i.e. native, transient, volatile, synchronized, 683 * (added annotations) override, deprecated. Can also be used to suppress compiler warnings: 684 * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require 685 * JDK5 compiler level. 686 * @see ModelElementFacade#getKeywords() 687 */ 688 public Collection<String> getKeywords() 689 { 690 return this.getSuperEntityAssociationEnd().getKeywords(); 691 } 692 693 /** 694 * UML2: Retrieves a localized label for this named element. 695 * @see ModelElementFacade#getLabel() 696 */ 697 public String getLabel() 698 { 699 return this.getSuperEntityAssociationEnd().getLabel(); 700 } 701 702 /** 703 * The language mappings that have been set for this model element. 704 * @see ModelElementFacade#getLanguageMappings() 705 */ 706 public TypeMappings getLanguageMappings() 707 { 708 return this.getSuperEntityAssociationEnd().getLanguageMappings(); 709 } 710 711 /** 712 * Return the model containing this model element (multiple models may be loaded and processed 713 * at the same time). 714 * @see ModelElementFacade#getModel() 715 */ 716 public ModelFacade getModel() 717 { 718 return this.getSuperEntityAssociationEnd().getModel(); 719 } 720 721 /** 722 * The name of the model element. 723 * @see ModelElementFacade#getName() 724 */ 725 public String getName() 726 { 727 return this.getSuperEntityAssociationEnd().getName(); 728 } 729 730 /** 731 * Gets the package to which this model element belongs. 732 * @see ModelElementFacade#getPackage() 733 */ 734 public ModelElementFacade getPackage() 735 { 736 return this.getSuperEntityAssociationEnd().getPackage(); 737 } 738 739 /** 740 * The name of this model element's package. 741 * @see ModelElementFacade#getPackageName() 742 */ 743 public String getPackageName() 744 { 745 return this.getSuperEntityAssociationEnd().getPackageName(); 746 } 747 748 /** 749 * Gets the package name (optionally providing the ability to retrieve the model name and not 750 * the mapped name). 751 * @see ModelElementFacade#getPackageName(boolean modelName) 752 */ 753 public String getPackageName(boolean modelName) 754 { 755 return this.getSuperEntityAssociationEnd().getPackageName(modelName); 756 } 757 758 /** 759 * Returns the package as a path, the returned value always starts with out a slash '/'. 760 * @see ModelElementFacade#getPackagePath() 761 */ 762 public String getPackagePath() 763 { 764 return this.getSuperEntityAssociationEnd().getPackagePath(); 765 } 766 767 /** 768 * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the 769 * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from 770 * the names of the containing namespaces starting at the root of the hierarchy and ending with 771 * the name of the NamedElement itself. 772 * @see ModelElementFacade#getQualifiedName() 773 */ 774 public String getQualifiedName() 775 { 776 return this.getSuperEntityAssociationEnd().getQualifiedName(); 777 } 778 779 /** 780 * Gets the root package for the model element. 781 * @see ModelElementFacade#getRootPackage() 782 */ 783 public PackageFacade getRootPackage() 784 { 785 return this.getSuperEntityAssociationEnd().getRootPackage(); 786 } 787 788 /** 789 * Gets the dependencies for which this model element is the source. 790 * @see ModelElementFacade#getSourceDependencies() 791 */ 792 public Collection<DependencyFacade> getSourceDependencies() 793 { 794 return this.getSuperEntityAssociationEnd().getSourceDependencies(); 795 } 796 797 /** 798 * If this model element is the context of an activity graph, this represents that activity 799 * graph. 800 * @see ModelElementFacade#getStateMachineContext() 801 */ 802 public StateMachineFacade getStateMachineContext() 803 { 804 return this.getSuperEntityAssociationEnd().getStateMachineContext(); 805 } 806 807 /** 808 * The collection of ALL stereotype names for this model element. 809 * @see ModelElementFacade#getStereotypeNames() 810 */ 811 public Collection<String> getStereotypeNames() 812 { 813 return this.getSuperEntityAssociationEnd().getStereotypeNames(); 814 } 815 816 /** 817 * Gets all stereotypes for this model element. 818 * @see ModelElementFacade#getStereotypes() 819 */ 820 public Collection<StereotypeFacade> getStereotypes() 821 { 822 return this.getSuperEntityAssociationEnd().getStereotypes(); 823 } 824 825 /** 826 * Return the TaggedValues associated with this model element, under all stereotypes. 827 * @see ModelElementFacade#getTaggedValues() 828 */ 829 public Collection<TaggedValueFacade> getTaggedValues() 830 { 831 return this.getSuperEntityAssociationEnd().getTaggedValues(); 832 } 833 834 /** 835 * Gets the dependencies for which this model element is the target. 836 * @see ModelElementFacade#getTargetDependencies() 837 */ 838 public Collection<DependencyFacade> getTargetDependencies() 839 { 840 return this.getSuperEntityAssociationEnd().getTargetDependencies(); 841 } 842 843 /** 844 * Get the template parameter for this model element having the parameterName 845 * @see ModelElementFacade#getTemplateParameter(String parameterName) 846 */ 847 public Object getTemplateParameter(String parameterName) 848 { 849 return this.getSuperEntityAssociationEnd().getTemplateParameter(parameterName); 850 } 851 852 /** 853 * Get the template parameters for this model element 854 * @see ModelElementFacade#getTemplateParameters() 855 */ 856 public Collection<TemplateParameterFacade> getTemplateParameters() 857 { 858 return this.getSuperEntityAssociationEnd().getTemplateParameters(); 859 } 860 861 /** 862 * The visibility (i.e. public, private, protected or package) of the model element, will 863 * attempt a lookup for these values in the language mappings (if any). 864 * @see ModelElementFacade#getVisibility() 865 */ 866 public String getVisibility() 867 { 868 return this.getSuperEntityAssociationEnd().getVisibility(); 869 } 870 871 /** 872 * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance 873 * is taken into account when searching for the stereotype), false otherwise. 874 * @see ModelElementFacade#hasExactStereotype(String stereotypeName) 875 */ 876 public boolean hasExactStereotype(String stereotypeName) 877 { 878 return this.getSuperEntityAssociationEnd().hasExactStereotype(stereotypeName); 879 } 880 881 /** 882 * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma, 883 * pipe, semicolon, or << >> 884 * @see ModelElementFacade#hasKeyword(String keywordName) 885 */ 886 public boolean hasKeyword(String keywordName) 887 { 888 return this.getSuperEntityAssociationEnd().hasKeyword(keywordName); 889 } 890 891 /** 892 * Returns true if the model element has the specified stereotype. If the stereotype itself 893 * does not match, then a search will be made up the stereotype inheritance hierarchy, and if 894 * one of the stereotype's ancestors has a matching name this method will return true, false 895 * otherwise. 896 * For example, if we have a certain stereotype called <<exception>> and a model element has a 897 * stereotype called <<applicationException>> which extends <<exception>>, when calling this 898 * method with 'stereotypeName' defined as 'exception' the method would return true since 899 * <<applicationException>> inherits from <<exception>>. If you want to check if the model 900 * element has the exact stereotype, then use the method 'hasExactStereotype' instead. 901 * @see ModelElementFacade#hasStereotype(String stereotypeName) 902 */ 903 public boolean hasStereotype(String stereotypeName) 904 { 905 return this.getSuperEntityAssociationEnd().hasStereotype(stereotypeName); 906 } 907 908 /** 909 * True if there are target dependencies from this element that are instances of BindingFacade. 910 * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies. 911 * @see ModelElementFacade#isBindingDependenciesPresent() 912 */ 913 public boolean isBindingDependenciesPresent() 914 { 915 return this.getSuperEntityAssociationEnd().isBindingDependenciesPresent(); 916 } 917 918 /** 919 * Indicates if any constraints are present on this model element. 920 * @see ModelElementFacade#isConstraintsPresent() 921 */ 922 public boolean isConstraintsPresent() 923 { 924 return this.getSuperEntityAssociationEnd().isConstraintsPresent(); 925 } 926 927 /** 928 * Indicates if any documentation is present on this model element. 929 * @see ModelElementFacade#isDocumentationPresent() 930 */ 931 public boolean isDocumentationPresent() 932 { 933 return this.getSuperEntityAssociationEnd().isDocumentationPresent(); 934 } 935 936 /** 937 * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript. 938 * @see ModelElementFacade#isReservedWord() 939 */ 940 public boolean isReservedWord() 941 { 942 return this.getSuperEntityAssociationEnd().isReservedWord(); 943 } 944 945 /** 946 * True is there are template parameters on this model element. For UML2, applies to Class, 947 * Operation, Property, and Parameter. 948 * @see ModelElementFacade#isTemplateParametersPresent() 949 */ 950 public boolean isTemplateParametersPresent() 951 { 952 return this.getSuperEntityAssociationEnd().isTemplateParametersPresent(); 953 } 954 955 /** 956 * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++, 957 * JavaScript. Contains no spaces, special characters etc. Constraint always applied on 958 * Enumerations and Interfaces, optionally applies on other model elements. 959 * @see ModelElementFacade#isValidIdentifierName() 960 */ 961 public boolean isValidIdentifierName() 962 { 963 return this.getSuperEntityAssociationEnd().isValidIdentifierName(); 964 } 965 966 /** 967 * Searches for the constraint with the specified 'name' on this model element, and if found 968 * translates it using the specified 'translation' from a translation library discovered by the 969 * framework. 970 * @see ModelElementFacade#translateConstraint(String name, String translation) 971 */ 972 public String translateConstraint(String name, String translation) 973 { 974 return this.getSuperEntityAssociationEnd().translateConstraint(name, translation); 975 } 976 977 /** 978 * Translates all constraints belonging to this model element with the given 'translation'. 979 * @see ModelElementFacade#translateConstraints(String translation) 980 */ 981 public String[] translateConstraints(String translation) 982 { 983 return this.getSuperEntityAssociationEnd().translateConstraints(translation); 984 } 985 986 /** 987 * Translates the constraints of the specified 'kind' belonging to this model element. 988 * @see ModelElementFacade#translateConstraints(String kind, String translation) 989 */ 990 public String[] translateConstraints(String kind, String translation) 991 { 992 return this.getSuperEntityAssociationEnd().translateConstraints(kind, translation); 993 } 994 995 /** 996 * @see org.andromda.core.metafacade.MetafacadeBase#initialize() 997 */ 998 @Override 999 public void initialize() 1000 { 1001 this.getSuperEntityAssociationEnd().initialize(); 1002 } 1003 1004 /** 1005 * @return Object getSuperEntityAssociationEnd().getValidationOwner() 1006 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner() 1007 */ 1008 @Override 1009 public Object getValidationOwner() 1010 { 1011 Object owner = this.getSuperEntityAssociationEnd().getValidationOwner(); 1012 return owner; 1013 } 1014 1015 /** 1016 * @return String getSuperEntityAssociationEnd().getValidationName() 1017 * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName() 1018 */ 1019 @Override 1020 public String getValidationName() 1021 { 1022 String name = this.getSuperEntityAssociationEnd().getValidationName(); 1023 return name; 1024 } 1025 1026 /** 1027 * @param validationMessages Collection<ModelValidationMessage> 1028 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages) 1029 */ 1030 @Override 1031 public void validateInvariants(Collection<ModelValidationMessage> validationMessages) 1032 { 1033 this.getSuperEntityAssociationEnd().validateInvariants(validationMessages); 1034 } 1035 1036 /** 1037 * The property that stores the name of the metafacade. 1038 */ 1039 private static final String NAME_PROPERTY = "name"; 1040 private static final String FQNAME_PROPERTY = "fullyQualifiedName"; 1041 1042 /** 1043 * @see Object#toString() 1044 */ 1045 @Override 1046 public String toString() 1047 { 1048 final StringBuilder toString = new StringBuilder(this.getClass().getName()); 1049 toString.append("["); 1050 try 1051 { 1052 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY)); 1053 } 1054 catch (final Throwable tryAgain) 1055 { 1056 try 1057 { 1058 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY)); 1059 } 1060 catch (final Throwable ignore) 1061 { 1062 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property 1063 } 1064 } 1065 toString.append("]"); 1066 return toString.toString(); 1067 } 1068}