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