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