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