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