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