View Javadoc
1   // license-header java merge-point
2   //
3   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4   //
5   package org.andromda.cartridges.ejb3.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.EnumerationFacade;
16  import org.andromda.metafacades.uml.ManageableEntityAttribute;
17  import org.andromda.metafacades.uml.ModelElementFacade;
18  import org.andromda.metafacades.uml.ModelFacade;
19  import org.andromda.metafacades.uml.PackageFacade;
20  import org.andromda.metafacades.uml.StateMachineFacade;
21  import org.andromda.metafacades.uml.StereotypeFacade;
22  import org.andromda.metafacades.uml.TaggedValueFacade;
23  import org.andromda.metafacades.uml.TemplateParameterFacade;
24  import org.andromda.metafacades.uml.TypeMappings;
25  
26  /**
27   * TODO: Model Documentation for
28   * org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityAttributeFacade
29   * MetafacadeLogic for EJB3ManageableEntityAttributeFacade
30   *
31   * @see EJB3ManageableEntityAttributeFacade
32   */
33  public abstract class EJB3ManageableEntityAttributeFacadeLogic
34      extends MetafacadeBase
35      implements EJB3ManageableEntityAttributeFacade
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 EJB3ManageableEntityAttributeFacadeLogic(Object metaObjectIn, String context)
48      {
49          super(metaObjectIn, getContext(context));
50          this.superEJB3EntityAttributeFacade =
51             (EJB3EntityAttributeFacade)
52              MetafacadeFactory.getInstance().createFacadeImpl(
53                      "org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacade",
54                      metaObjectIn,
55                      getContext(context));
56          this.superManageableEntityAttribute =
57             (ManageableEntityAttribute)
58              MetafacadeFactory.getInstance().createFacadeImpl(
59                      "org.andromda.metafacades.uml.ManageableEntityAttribute",
60                      metaObjectIn,
61                      getContext(context));
62          this.metaObject = metaObjectIn;
63      }
64  
65      /**
66       * Gets the context for this metafacade logic instance.
67       * @param context String. Set to EJB3ManageableEntityAttributeFacade if null
68       * @return context String
69       */
70      private static String getContext(String context)
71      {
72          if (context == null)
73          {
74              context = "org.andromda.cartridges.ejb3.metafacades.EJB3ManageableEntityAttributeFacade";
75          }
76          return context;
77      }
78  
79      private EJB3EntityAttributeFacade superEJB3EntityAttributeFacade;
80      private boolean superEJB3EntityAttributeFacadeInitialized = false;
81  
82      /**
83       * Gets the EJB3EntityAttributeFacade parent instance.
84       * @return this.superEJB3EntityAttributeFacade EJB3EntityAttributeFacade
85       */
86      protected EJB3EntityAttributeFacade getSuperEJB3EntityAttributeFacade()
87      {
88          if (!this.superEJB3EntityAttributeFacadeInitialized)
89          {
90              ((MetafacadeBase)this.superEJB3EntityAttributeFacade).setMetafacadeContext(this.getMetafacadeContext());
91              this.superEJB3EntityAttributeFacadeInitialized = true;
92          }
93          return this.superEJB3EntityAttributeFacade;
94      }
95  
96      private ManageableEntityAttribute superManageableEntityAttribute;
97      private boolean superManageableEntityAttributeInitialized = false;
98  
99      /**
100      * Gets the ManageableEntityAttribute parent instance.
101      * @return this.superManageableEntityAttribute ManageableEntityAttribute
102      */
103     protected ManageableEntityAttribute getSuperManageableEntityAttribute()
104     {
105         if (!this.superManageableEntityAttributeInitialized)
106         {
107             ((MetafacadeBase)this.superManageableEntityAttribute).setMetafacadeContext(this.getMetafacadeContext());
108             this.superManageableEntityAttributeInitialized = true;
109         }
110         return this.superManageableEntityAttribute;
111     }
112 
113     /** Reset context only for non-root metafacades
114      * @param context
115      * @see org.andromda.core.metafacade.MetafacadeBase#resetMetafacadeContext(String context)
116      */
117     @Override
118     public void resetMetafacadeContext(String context)
119     {
120         if (!this.contextRoot) // reset context only for non-root metafacades
121         {
122             context = getContext(context);  // to have same value as in original constructor call
123             setMetafacadeContext (context);
124             if (this.superEJB3EntityAttributeFacadeInitialized)
125             {
126                 ((MetafacadeBase)this.superEJB3EntityAttributeFacade).resetMetafacadeContext(context);
127             }
128             if (this.superManageableEntityAttributeInitialized)
129             {
130                 ((MetafacadeBase)this.superManageableEntityAttribute).resetMetafacadeContext(context);
131             }
132         }
133     }
134 
135     /**
136      * @return boolean true always
137      * @see EJB3ManageableEntityAttributeFacade
138      */
139     public boolean isEJB3ManageableEntityAttributeFacadeMetaType()
140     {
141         return true;
142     }
143 
144     /**
145      * @return true
146      * @see EJB3EntityAttributeFacade
147      */
148     public boolean isEJB3EntityAttributeFacadeMetaType()
149     {
150         return true;
151     }
152 
153     /**
154      * @return true
155      * @see ManageableEntityAttribute
156      */
157     public boolean isManageableEntityAttributeMetaType()
158     {
159         return true;
160     }
161 
162     /**
163      * @return true
164      * @see org.andromda.metafacades.uml.EntityAttribute
165      */
166     public boolean isEntityAttributeMetaType()
167     {
168         return true;
169     }
170 
171     /**
172      * @return true
173      * @see org.andromda.metafacades.uml.AttributeFacade
174      */
175     public boolean isAttributeFacadeMetaType()
176     {
177         return true;
178     }
179 
180     /**
181      * @return true
182      * @see ModelElementFacade
183      */
184     public boolean isModelElementFacadeMetaType()
185     {
186         return true;
187     }
188 
189     // ----------- delegates to EJB3EntityAttributeFacade ------------
190     /**
191      * Defines the column definition DDL used when creating table schema - use to override default
192      * container DDL.  This is automatically defined if the attribute type is an enumeration.
193      * @see EJB3EntityAttributeFacade#getColumnDefinition()
194      */
195     public String getColumnDefinition()
196     {
197         return this.getSuperEJB3EntityAttributeFacade().getColumnDefinition();
198     }
199 
200     /**
201      * Set the column precision value.  Only applies to double and float columns.
202      * ie Use for setting dollar precision.
203      * @see EJB3EntityAttributeFacade#getColumnPrecision()
204      */
205     public String getColumnPrecision()
206     {
207         return this.getSuperEJB3EntityAttributeFacade().getColumnPrecision();
208     }
209 
210     /**
211      * Column scale use denotes the decimal precision.
212      * ie Use to set the 2 digit cent scale.
213      * @see EJB3EntityAttributeFacade#getColumnScale()
214      */
215     public String getColumnScale()
216     {
217         return this.getSuperEJB3EntityAttributeFacade().getColumnScale();
218     }
219 
220     /**
221      * Returns the persistent property/field enumeration type.  Will return either ORDINAL for enums
222      * mapped as an integer or STRING for enums mapped as a string.  If not specified on an
223      * enumerated type, then the ORDINAL type is assumed
224      * @see EJB3EntityAttributeFacade#getEnumerationType()
225      */
226     public String getEnumerationType()
227     {
228         return this.getSuperEJB3EntityAttributeFacade().getEnumerationType();
229     }
230 
231     /**
232      * Gets the fetch type for this attribute.  Default fetch type for attribute is EAGER.
233      * This will return either EAGER or LAZY.
234      * @see EJB3EntityAttributeFacade#getFetchType()
235      */
236     public String getFetchType()
237     {
238         return this.getSuperEJB3EntityAttributeFacade().getFetchType();
239     }
240 
241     /**
242      * Returns the amount to increment the generator value when allocating id numbers.
243      * @see EJB3EntityAttributeFacade#getGeneratorAllocationSize()
244      */
245     public int getGeneratorAllocationSize()
246     {
247         return this.getSuperEJB3EntityAttributeFacade().getGeneratorAllocationSize();
248     }
249 
250     /**
251      * Returns the org.hibernate.annotations.GenericGenerator strategy either a predefined Hibernate
252      * strategy or a fully qualified class name.
253      * @see EJB3EntityAttributeFacade#getGeneratorGenericStrategy()
254      */
255     public String getGeneratorGenericStrategy()
256     {
257         return this.getSuperEJB3EntityAttributeFacade().getGeneratorGenericStrategy();
258     }
259 
260     /**
261      * Returns the inital value assigned when allocating ids from the specified generator.
262      * @see EJB3EntityAttributeFacade#getGeneratorInitialValue()
263      */
264     public int getGeneratorInitialValue()
265     {
266         return this.getSuperEJB3EntityAttributeFacade().getGeneratorInitialValue();
267     }
268 
269     /**
270      * Return the name for the generator, if one exists and should exists for SequenceGenerator and
271      * TableGenerator, which can be reference by the id for its generator.
272      * @see EJB3EntityAttributeFacade#getGeneratorName()
273      */
274     public String getGeneratorName()
275     {
276         return this.getSuperEJB3EntityAttributeFacade().getGeneratorName();
277     }
278 
279     /**
280      * Returns the name of the primary key value in the generator table assigned to this set of
281      * generated values.
282      * @see EJB3EntityAttributeFacade#getGeneratorPkColumnValue()
283      */
284     public String getGeneratorPkColumnValue()
285     {
286         return this.getSuperEJB3EntityAttributeFacade().getGeneratorPkColumnValue();
287     }
288 
289     /**
290      * Returns the sequence name or table name for the generator depending on the generator type
291      * specified.
292      * @see EJB3EntityAttributeFacade#getGeneratorSourceName()
293      */
294     public String getGeneratorSourceName()
295     {
296         return this.getSuperEJB3EntityAttributeFacade().getGeneratorSourceName();
297     }
298 
299     /**
300      * Determine the generator type for the Id annotation on the entity attribute - the PK strategy.
301      * If the attribute type is numeric, the default generator type is AUTO.  Otherwise, the
302      * generator type is NONE, ie for String types.
303      * @see EJB3EntityAttributeFacade#getGeneratorType()
304      */
305     public String getGeneratorType()
306     {
307         return this.getSuperEJB3EntityAttributeFacade().getGeneratorType();
308     }
309 
310     /**
311      * Returns the user overridden lob type for this property.  This is set via tagged value
312      * andromda_persistence_lob_type.  Default values are String for Clob and byte[] for Blob.
313      * @see EJB3EntityAttributeFacade#getLobType()
314      */
315     public String getLobType()
316     {
317         return this.getSuperEJB3EntityAttributeFacade().getLobType();
318     }
319 
320     /**
321      * The overridden hibernate type for the annotation on the entity attribute, to manually specify
322      * a type using the @org.hibernate.annotations.Type or in other persistence provider. Generally
323      * used for Boolean types in legacy databases, i.e yes_no, true_false. Could be:The name of a
324      * Hibernate basic type: integer, string, character, date, timestamp, float, binary,
325      * serializable, object, blob etc.; The name of a Java class with a default basic type: int,
326      * float, char, String, java.util.Date, java.lang.Integer, java.sql.Clob etc.; The
327      * name of a serializable Java class; The class name of a custom type:
328      * com.illflow.type.MyCustomType etc.
329      * @see EJB3EntityAttributeFacade#getOverrideType()
330      */
331     public String getOverrideType()
332     {
333         return this.getSuperEJB3EntityAttributeFacade().getOverrideType();
334     }
335 
336     /**
337      * Returns the temporal type value set via tagged value on attribute if one exists.  Expect one
338      * of DATE, TIME, TIMESTAMP or NONE.  This can only be applied to attributes of type
339      * java.util.Date or java.util.Calendar.
340      * @see EJB3EntityAttributeFacade#getTemporalType()
341      */
342     public String getTemporalType()
343     {
344         return this.getSuperEJB3EntityAttributeFacade().getTemporalType();
345     }
346 
347     /**
348      * Whether the column can be nullable.  False for identifier and unique fields.  If
349      * andromda_persistence_column_nullable tag is set, the tagged value is used.  Otherwise,
350      * determine if this attribute is required from the multiplicity set on the attribute.
351      * @see EJB3EntityAttributeFacade#isColumnNullable()
352      */
353     public boolean isColumnNullable()
354     {
355         return this.getSuperEJB3EntityAttributeFacade().isColumnNullable();
356     }
357 
358     /**
359      * Returns true if this attribute's type is an embedded value object.
360      * @see EJB3EntityAttributeFacade#isContainsEmbeddedObject()
361      */
362     public boolean isContainsEmbeddedObject()
363     {
364         return this.getSuperEJB3EntityAttributeFacade().isContainsEmbeddedObject();
365     }
366 
367     /**
368      * Determine if the fetch type for this attribute is eager loading.
369      * @see EJB3EntityAttributeFacade#isEager()
370      */
371     public boolean isEager()
372     {
373         return this.getSuperEJB3EntityAttributeFacade().isEager();
374     }
375 
376     /**
377      * Returns true if an auto generator has been assigned to this attribute, false otherwise.
378      * @see EJB3EntityAttributeFacade#isGeneratorTypeAuto()
379      */
380     public boolean isGeneratorTypeAuto()
381     {
382         return this.getSuperEJB3EntityAttributeFacade().isGeneratorTypeAuto();
383     }
384 
385     /**
386      * Returns true if a generic generator has been assigned to this attribute, false otherwise.
387      * @see EJB3EntityAttributeFacade#isGeneratorTypeGeneric()
388      */
389     public boolean isGeneratorTypeGeneric()
390     {
391         return this.getSuperEJB3EntityAttributeFacade().isGeneratorTypeGeneric();
392     }
393 
394     /**
395      * Returns true if an identity generator has been assigned to this attribute, false otherwise.
396      * @see EJB3EntityAttributeFacade#isGeneratorTypeIdentity()
397      */
398     public boolean isGeneratorTypeIdentity()
399     {
400         return this.getSuperEJB3EntityAttributeFacade().isGeneratorTypeIdentity();
401     }
402 
403     /**
404      * Returns true no generator has been assigned to this attribute, false otherwise.
405      * @see EJB3EntityAttributeFacade#isGeneratorTypeNone()
406      */
407     public boolean isGeneratorTypeNone()
408     {
409         return this.getSuperEJB3EntityAttributeFacade().isGeneratorTypeNone();
410     }
411 
412     /**
413      * Returns true if a sequence generator has been assigned to this attribute, false otherwise.
414      * @see EJB3EntityAttributeFacade#isGeneratorTypeSequence()
415      */
416     public boolean isGeneratorTypeSequence()
417     {
418         return this.getSuperEJB3EntityAttributeFacade().isGeneratorTypeSequence();
419     }
420 
421     /**
422      * Returns true if a table generator has been assigned to this attribute, false otherwise.
423      * @see EJB3EntityAttributeFacade#isGeneratorTypeTable()
424      */
425     public boolean isGeneratorTypeTable()
426     {
427         return this.getSuperEJB3EntityAttributeFacade().isGeneratorTypeTable();
428     }
429 
430     /**
431      * Specifies whether a mapped column should be included in SQL INSERT statements.
432      * @see EJB3EntityAttributeFacade#isInsertEnabled()
433      */
434     public boolean isInsertEnabled()
435     {
436         return this.getSuperEJB3EntityAttributeFacade().isInsertEnabled();
437     }
438 
439     /**
440      * Determine if the fetch type for this attribute is lazy loading.
441      * @see EJB3EntityAttributeFacade#isLazy()
442      */
443     public boolean isLazy()
444     {
445         return this.getSuperEJB3EntityAttributeFacade().isLazy();
446     }
447 
448     /**
449      * Returns true if the property type is specified as datatype::Blob or datatype::Clob.
450      * LOB type is CLOB for characters or BLOB for binary data.
451      * @see EJB3EntityAttributeFacade#isLob()
452      */
453     public boolean isLob()
454     {
455         return this.getSuperEJB3EntityAttributeFacade().isLob();
456     }
457 
458     /**
459      * Specifies whether a mapped column should be included in SQL UPDATE statements.
460      * @see EJB3EntityAttributeFacade#isUpdateEnabled()
461      */
462     public boolean isUpdateEnabled()
463     {
464         return this.getSuperEJB3EntityAttributeFacade().isUpdateEnabled();
465     }
466 
467     /**
468      * True is this attribute is a version property (optimistic lock value) for this entity class.
469      * @see EJB3EntityAttributeFacade#isVersion()
470      */
471     public boolean isVersion()
472     {
473         return this.getSuperEJB3EntityAttributeFacade().isVersion();
474     }
475 
476     /**
477      * Searches the given feature for the specified tag.
478      * If the follow boolean is set to true then the search will continue from the class attribute
479      * to the class itself and then up the class hierarchy.
480      * @see org.andromda.metafacades.uml.AttributeFacade#findTaggedValue(String name, boolean follow)
481      */
482     public Object findTaggedValue(String name, boolean follow)
483     {
484         return this.getSuperEJB3EntityAttributeFacade().findTaggedValue(name, follow);
485     }
486 
487     /**
488      * The default value of the attribute.  This is the value given if no value is defined.
489      * @see org.andromda.metafacades.uml.AttributeFacade#getDefaultValue()
490      */
491     public String getDefaultValue()
492     {
493         return this.getSuperEJB3EntityAttributeFacade().getDefaultValue();
494     }
495 
496     /**
497      * If the attribute is an enumeration literal this represents the owning enumeration. Can be
498      * empty.
499      * @see org.andromda.metafacades.uml.AttributeFacade#getEnumeration()
500      */
501     public EnumerationFacade getEnumeration()
502     {
503         return this.getSuperEJB3EntityAttributeFacade().getEnumeration();
504     }
505 
506     /**
507      * Returns the enumeration literal parameters defined by tagged value as a comma separated list.
508      * @see org.andromda.metafacades.uml.AttributeFacade#getEnumerationLiteralParameters()
509      */
510     public String getEnumerationLiteralParameters()
511     {
512         return this.getSuperEJB3EntityAttributeFacade().getEnumerationLiteralParameters();
513     }
514 
515     /**
516      * The value for this attribute if it is an enumeration literal, null otherwise. The default
517      * value is returned as a String if it has been specified, if it's not specified this
518      * attribute's name is assumed.
519      * @see org.andromda.metafacades.uml.AttributeFacade#getEnumerationValue()
520      */
521     public String getEnumerationValue()
522     {
523         return this.getSuperEJB3EntityAttributeFacade().getEnumerationValue();
524     }
525 
526     /**
527      * The name of the accessor operation that would retrieve this attribute's value.
528      * @see org.andromda.metafacades.uml.AttributeFacade#getGetterName()
529      */
530     public String getGetterName()
531     {
532         return this.getSuperEJB3EntityAttributeFacade().getGetterName();
533     }
534 
535     /**
536      * The name of the type that is returned on the accessor and mutator operations,  determined in
537      * part by the multiplicity.
538      * @see org.andromda.metafacades.uml.AttributeFacade#getGetterSetterTypeName()
539      */
540     public String getGetterSetterTypeName()
541     {
542         return this.getSuperEJB3EntityAttributeFacade().getGetterSetterTypeName();
543     }
544 
545     /**
546      * the lower value for the multiplicity
547      * -only applicable for UML2
548      * @see org.andromda.metafacades.uml.AttributeFacade#getLower()
549      */
550     public int getLower()
551     {
552         return this.getSuperEJB3EntityAttributeFacade().getLower();
553     }
554 
555     /**
556      * Gets the classifier who is the owner of the attributes.
557      * @see org.andromda.metafacades.uml.AttributeFacade#getOwner()
558      */
559     public ClassifierFacade getOwner()
560     {
561         return this.getSuperEJB3EntityAttributeFacade().getOwner();
562     }
563 
564     /**
565      * The name of the mutator operation that would retrieve this attribute's value.
566      * @see org.andromda.metafacades.uml.AttributeFacade#getSetterName()
567      */
568     public String getSetterName()
569     {
570         return this.getSuperEJB3EntityAttributeFacade().getSetterName();
571     }
572 
573     /**
574      * The classifier owning this attribute.
575      * @see org.andromda.metafacades.uml.AttributeFacade#getType()
576      */
577     public ClassifierFacade getType()
578     {
579         return this.getSuperEJB3EntityAttributeFacade().getType();
580     }
581 
582     /**
583      * the upper value for the multiplicity (will be -1 for *)
584      * -only applicable for UML2
585      * @see org.andromda.metafacades.uml.AttributeFacade#getUpper()
586      */
587     public int getUpper()
588     {
589         return this.getSuperEJB3EntityAttributeFacade().getUpper();
590     }
591 
592     /**
593      * True if this attribute can only be set.
594      * @see org.andromda.metafacades.uml.AttributeFacade#isAddOnly()
595      */
596     public boolean isAddOnly()
597     {
598         return this.getSuperEJB3EntityAttributeFacade().isAddOnly();
599     }
600 
601     /**
602      * True if this attribute can be modified.
603      * @see org.andromda.metafacades.uml.AttributeFacade#isChangeable()
604      */
605     public boolean isChangeable()
606     {
607         return this.getSuperEJB3EntityAttributeFacade().isChangeable();
608     }
609 
610     /**
611      * Indicates if the default value is present.
612      * @see org.andromda.metafacades.uml.AttributeFacade#isDefaultValuePresent()
613      */
614     public boolean isDefaultValuePresent()
615     {
616         return this.getSuperEJB3EntityAttributeFacade().isDefaultValuePresent();
617     }
618 
619     /**
620      * If the attribute is derived (its value is computed). UML2 only. UML14 always returns false.
621      * Default=false.
622      * @see org.andromda.metafacades.uml.AttributeFacade#isDerived()
623      */
624     public boolean isDerived()
625     {
626         return this.getSuperEJB3EntityAttributeFacade().isDerived();
627     }
628 
629     /**
630      * True if this attribute is owned by an enumeration.
631      * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationLiteral()
632      */
633     public boolean isEnumerationLiteral()
634     {
635         return this.getSuperEJB3EntityAttributeFacade().isEnumerationLiteral();
636     }
637 
638     /**
639      * Returns true if enumeration literal parameters exist (defined by tagged value) for the
640      * literal.
641      * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationLiteralParametersExist()
642      */
643     public boolean isEnumerationLiteralParametersExist()
644     {
645         return this.getSuperEJB3EntityAttributeFacade().isEnumerationLiteralParametersExist();
646     }
647 
648     /**
649      * True if this attribute is owned by an enumeration but is defined as a member variable (NOT a
650      * literal).
651      * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationMember()
652      */
653     public boolean isEnumerationMember()
654     {
655         return this.getSuperEJB3EntityAttributeFacade().isEnumerationMember();
656     }
657 
658     /**
659      * IsLeaf property in the operation. If true, operation is final, cannot be extended or
660      * implemented by a descendant.
661      * @see org.andromda.metafacades.uml.AttributeFacade#isLeaf()
662      */
663     public boolean isLeaf()
664     {
665         return this.getSuperEJB3EntityAttributeFacade().isLeaf();
666     }
667 
668     /**
669      * Whether or not this attribute has a multiplicity greater than 1.
670      * @see org.andromda.metafacades.uml.AttributeFacade#isMany()
671      */
672     public boolean isMany()
673     {
674         return this.getSuperEJB3EntityAttributeFacade().isMany();
675     }
676 
677     /**
678      * Indicates whether or not the attributes are ordered (if multiplicity is greater than 1).
679      * @see org.andromda.metafacades.uml.AttributeFacade#isOrdered()
680      */
681     public boolean isOrdered()
682     {
683         return this.getSuperEJB3EntityAttributeFacade().isOrdered();
684     }
685 
686     /**
687      * Whether or not this attribute can be modified.
688      * @see org.andromda.metafacades.uml.AttributeFacade#isReadOnly()
689      */
690     public boolean isReadOnly()
691     {
692         return this.getSuperEJB3EntityAttributeFacade().isReadOnly();
693     }
694 
695     /**
696      * Whether or not the multiplicity of this attribute is 1.
697      * @see org.andromda.metafacades.uml.AttributeFacade#isRequired()
698      */
699     public boolean isRequired()
700     {
701         return this.getSuperEJB3EntityAttributeFacade().isRequired();
702     }
703 
704     /**
705      * Indicates if this attribute is 'static', meaning it has a classifier scope.
706      * @see org.andromda.metafacades.uml.AttributeFacade#isStatic()
707      */
708     public boolean isStatic()
709     {
710         return this.getSuperEJB3EntityAttributeFacade().isStatic();
711     }
712 
713     /**
714      * If the attribute is unique within the Collection type. UML2 only. UML14 always returns false.
715      * Unique+Ordered determines the implementation Collection type. Default=false.
716      * @see org.andromda.metafacades.uml.AttributeFacade#isUnique()
717      */
718     public boolean isUnique()
719     {
720         return this.getSuperEJB3EntityAttributeFacade().isUnique();
721     }
722 
723     /**
724      * The name of the index to create on a column that persists the entity attribute.
725      * @see org.andromda.metafacades.uml.EntityAttribute#getColumnIndex()
726      */
727     public String getColumnIndex()
728     {
729         return this.getSuperEJB3EntityAttributeFacade().getColumnIndex();
730     }
731 
732     /**
733      * The length of the column that persists this entity attribute.
734      * @see org.andromda.metafacades.uml.EntityAttribute#getColumnLength()
735      */
736     public String getColumnLength()
737     {
738         return this.getSuperEJB3EntityAttributeFacade().getColumnLength();
739     }
740 
741     /**
742      * The name of the table column to which this entity is mapped.
743      * @see org.andromda.metafacades.uml.EntityAttribute#getColumnName()
744      */
745     public String getColumnName()
746     {
747         return this.getSuperEJB3EntityAttributeFacade().getColumnName();
748     }
749 
750     /**
751      * The PIM to language specific mappings for JDBC.
752      * @see org.andromda.metafacades.uml.EntityAttribute#getJdbcMappings()
753      */
754     public TypeMappings getJdbcMappings()
755     {
756         return this.getSuperEJB3EntityAttributeFacade().getJdbcMappings();
757     }
758 
759     /**
760      * The JDBC type for this entity attribute.
761      * @see org.andromda.metafacades.uml.EntityAttribute#getJdbcType()
762      */
763     public String getJdbcType()
764     {
765         return this.getSuperEJB3EntityAttributeFacade().getJdbcType();
766     }
767 
768     /**
769      * The SQL mappings (i.e. the mappings which provide PIM to SQL mappings).
770      * @see org.andromda.metafacades.uml.EntityAttribute#getSqlMappings()
771      */
772     public TypeMappings getSqlMappings()
773     {
774         return this.getSuperEJB3EntityAttributeFacade().getSqlMappings();
775     }
776 
777     /**
778      * The SQL type for this attribute.
779      * @see org.andromda.metafacades.uml.EntityAttribute#getSqlType()
780      */
781     public String getSqlType()
782     {
783         return this.getSuperEJB3EntityAttributeFacade().getSqlType();
784     }
785 
786     /**
787      * The name of the unique-key that this unique attribute belongs
788      * @see org.andromda.metafacades.uml.EntityAttribute#getUniqueGroup()
789      */
790     public String getUniqueGroup()
791     {
792         return this.getSuperEJB3EntityAttributeFacade().getUniqueGroup();
793     }
794 
795     /**
796      * True if this attribute is an identifier for its entity.
797      * @see org.andromda.metafacades.uml.EntityAttribute#isIdentifier()
798      */
799     public boolean isIdentifier()
800     {
801         return this.getSuperEJB3EntityAttributeFacade().isIdentifier();
802     }
803 
804     /**
805      * Indicates this attribute should be ignored by the persistence layer.
806      * @see org.andromda.metafacades.uml.EntityAttribute#isTransient()
807      */
808     public boolean isTransient()
809     {
810         return this.getSuperEJB3EntityAttributeFacade().isTransient();
811     }
812 
813     /**
814      * Copies all tagged values from the given ModelElementFacade to this model element facade.
815      * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
816      */
817     public void copyTaggedValues(ModelElementFacade element)
818     {
819         this.getSuperEJB3EntityAttributeFacade().copyTaggedValues(element);
820     }
821 
822     /**
823      * Finds the tagged value with the specified 'tagName'. In case there are more values the first
824      * one found will be returned.
825      * @see ModelElementFacade#findTaggedValue(String tagName)
826      */
827     public Object findTaggedValue(String tagName)
828     {
829         return this.getSuperEJB3EntityAttributeFacade().findTaggedValue(tagName);
830     }
831 
832     /**
833      * Returns all the values for the tagged value with the specified name. The returned collection
834      * will contains only String instances, or will be empty. Never null.
835      * @see ModelElementFacade#findTaggedValues(String tagName)
836      */
837     public Collection<Object> findTaggedValues(String tagName)
838     {
839         return this.getSuperEJB3EntityAttributeFacade().findTaggedValues(tagName);
840     }
841 
842     /**
843      * Returns the fully qualified name of the model element. The fully qualified name includes
844      * complete package qualified name of the underlying model element. The templates parameter will
845      * be replaced by the correct one given the binding relation of the parameter to this element.
846      * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
847      */
848     public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
849     {
850         return this.getSuperEJB3EntityAttributeFacade().getBindedFullyQualifiedName(bindedElement);
851     }
852 
853     /**
854      * Gets all constraints belonging to the model element.
855      * @see ModelElementFacade#getConstraints()
856      */
857     public Collection<ConstraintFacade> getConstraints()
858     {
859         return this.getSuperEJB3EntityAttributeFacade().getConstraints();
860     }
861 
862     /**
863      * Returns the constraints of the argument kind that have been placed onto this model. Typical
864      * kinds are "inv", "pre" and "post". Other kinds are possible.
865      * @see ModelElementFacade#getConstraints(String kind)
866      */
867     public Collection<ConstraintFacade> getConstraints(String kind)
868     {
869         return this.getSuperEJB3EntityAttributeFacade().getConstraints(kind);
870     }
871 
872     /**
873      * Gets the documentation for the model element, The indent argument is prefixed to each line.
874      * By default this method wraps lines after 64 characters.
875      * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
876      * @see ModelElementFacade#getDocumentation(String indent)
877      */
878     public String getDocumentation(String indent)
879     {
880         return this.getSuperEJB3EntityAttributeFacade().getDocumentation(indent);
881     }
882 
883     /**
884      * This method returns the documentation for this model element, with the lines wrapped after
885      * the specified number of characters, values of less than 1 will indicate no line wrapping is
886      * required. By default paragraphs are returned as HTML.
887      * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
888      * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
889      */
890     public String getDocumentation(String indent, int lineLength)
891     {
892         return this.getSuperEJB3EntityAttributeFacade().getDocumentation(indent, lineLength);
893     }
894 
895     /**
896      * This method returns the documentation for this model element, with the lines wrapped after
897      * the specified number of characters, values of less than 1 will indicate no line wrapping is
898      * required. HTML style determines if HTML Escaping is applied.
899      * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
900      */
901     public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
902     {
903         return this.getSuperEJB3EntityAttributeFacade().getDocumentation(indent, lineLength, htmlStyle);
904     }
905 
906     /**
907      * The fully qualified name of this model element.
908      * @see ModelElementFacade#getFullyQualifiedName()
909      */
910     public String getFullyQualifiedName()
911     {
912         return this.getSuperEJB3EntityAttributeFacade().getFullyQualifiedName();
913     }
914 
915     /**
916      * Returns the fully qualified name of the model element. The fully qualified name includes
917      * complete package qualified name of the underlying model element.  If modelName is true, then
918      * the original name of the model element (the name contained within the model) will be the name
919      * returned, otherwise a name from a language mapping will be returned.
920      * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
921      */
922     public String getFullyQualifiedName(boolean modelName)
923     {
924         return this.getSuperEJB3EntityAttributeFacade().getFullyQualifiedName(modelName);
925     }
926 
927     /**
928      * Returns the fully qualified name as a path, the returned value always starts with out a slash
929      * '/'.
930      * @see ModelElementFacade#getFullyQualifiedNamePath()
931      */
932     public String getFullyQualifiedNamePath()
933     {
934         return this.getSuperEJB3EntityAttributeFacade().getFullyQualifiedNamePath();
935     }
936 
937     /**
938      * Gets the unique identifier of the underlying model element.
939      * @see ModelElementFacade#getId()
940      */
941     public String getId()
942     {
943         return this.getSuperEJB3EntityAttributeFacade().getId();
944     }
945 
946     /**
947      * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
948      * are not represented by other properties, i.e. native, transient, volatile, synchronized,
949      * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
950      * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
951      * JDK5 compiler level.
952      * @see ModelElementFacade#getKeywords()
953      */
954     public Collection<String> getKeywords()
955     {
956         return this.getSuperEJB3EntityAttributeFacade().getKeywords();
957     }
958 
959     /**
960      * UML2: Retrieves a localized label for this named element.
961      * @see ModelElementFacade#getLabel()
962      */
963     public String getLabel()
964     {
965         return this.getSuperEJB3EntityAttributeFacade().getLabel();
966     }
967 
968     /**
969      * The language mappings that have been set for this model element.
970      * @see ModelElementFacade#getLanguageMappings()
971      */
972     public TypeMappings getLanguageMappings()
973     {
974         return this.getSuperEJB3EntityAttributeFacade().getLanguageMappings();
975     }
976 
977     /**
978      * Return the model containing this model element (multiple models may be loaded and processed
979      * at the same time).
980      * @see ModelElementFacade#getModel()
981      */
982     public ModelFacade getModel()
983     {
984         return this.getSuperEJB3EntityAttributeFacade().getModel();
985     }
986 
987     /**
988      * The name of the model element.
989      * @see ModelElementFacade#getName()
990      */
991     public String getName()
992     {
993         return this.getSuperEJB3EntityAttributeFacade().getName();
994     }
995 
996     /**
997      * Gets the package to which this model element belongs.
998      * @see ModelElementFacade#getPackage()
999      */
1000     public ModelElementFacade getPackage()
1001     {
1002         return this.getSuperEJB3EntityAttributeFacade().getPackage();
1003     }
1004 
1005     /**
1006      * The name of this model element's package.
1007      * @see ModelElementFacade#getPackageName()
1008      */
1009     public String getPackageName()
1010     {
1011         return this.getSuperEJB3EntityAttributeFacade().getPackageName();
1012     }
1013 
1014     /**
1015      * Gets the package name (optionally providing the ability to retrieve the model name and not
1016      * the mapped name).
1017      * @see ModelElementFacade#getPackageName(boolean modelName)
1018      */
1019     public String getPackageName(boolean modelName)
1020     {
1021         return this.getSuperEJB3EntityAttributeFacade().getPackageName(modelName);
1022     }
1023 
1024     /**
1025      * Returns the package as a path, the returned value always starts with out a slash '/'.
1026      * @see ModelElementFacade#getPackagePath()
1027      */
1028     public String getPackagePath()
1029     {
1030         return this.getSuperEJB3EntityAttributeFacade().getPackagePath();
1031     }
1032 
1033     /**
1034      * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
1035      * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
1036      * the names of the containing namespaces starting at the root of the hierarchy and ending with
1037      * the name of the NamedElement itself.
1038      * @see ModelElementFacade#getQualifiedName()
1039      */
1040     public String getQualifiedName()
1041     {
1042         return this.getSuperEJB3EntityAttributeFacade().getQualifiedName();
1043     }
1044 
1045     /**
1046      * Gets the root package for the model element.
1047      * @see ModelElementFacade#getRootPackage()
1048      */
1049     public PackageFacade getRootPackage()
1050     {
1051         return this.getSuperEJB3EntityAttributeFacade().getRootPackage();
1052     }
1053 
1054     /**
1055      * Gets the dependencies for which this model element is the source.
1056      * @see ModelElementFacade#getSourceDependencies()
1057      */
1058     public Collection<DependencyFacade> getSourceDependencies()
1059     {
1060         return this.getSuperEJB3EntityAttributeFacade().getSourceDependencies();
1061     }
1062 
1063     /**
1064      * If this model element is the context of an activity graph, this represents that activity
1065      * graph.
1066      * @see ModelElementFacade#getStateMachineContext()
1067      */
1068     public StateMachineFacade getStateMachineContext()
1069     {
1070         return this.getSuperEJB3EntityAttributeFacade().getStateMachineContext();
1071     }
1072 
1073     /**
1074      * The collection of ALL stereotype names for this model element.
1075      * @see ModelElementFacade#getStereotypeNames()
1076      */
1077     public Collection<String> getStereotypeNames()
1078     {
1079         return this.getSuperEJB3EntityAttributeFacade().getStereotypeNames();
1080     }
1081 
1082     /**
1083      * Gets all stereotypes for this model element.
1084      * @see ModelElementFacade#getStereotypes()
1085      */
1086     public Collection<StereotypeFacade> getStereotypes()
1087     {
1088         return this.getSuperEJB3EntityAttributeFacade().getStereotypes();
1089     }
1090 
1091     /**
1092      * Return the TaggedValues associated with this model element, under all stereotypes.
1093      * @see ModelElementFacade#getTaggedValues()
1094      */
1095     public Collection<TaggedValueFacade> getTaggedValues()
1096     {
1097         return this.getSuperEJB3EntityAttributeFacade().getTaggedValues();
1098     }
1099 
1100     /**
1101      * Gets the dependencies for which this model element is the target.
1102      * @see ModelElementFacade#getTargetDependencies()
1103      */
1104     public Collection<DependencyFacade> getTargetDependencies()
1105     {
1106         return this.getSuperEJB3EntityAttributeFacade().getTargetDependencies();
1107     }
1108 
1109     /**
1110      * Get the template parameter for this model element having the parameterName
1111      * @see ModelElementFacade#getTemplateParameter(String parameterName)
1112      */
1113     public Object getTemplateParameter(String parameterName)
1114     {
1115         return this.getSuperEJB3EntityAttributeFacade().getTemplateParameter(parameterName);
1116     }
1117 
1118     /**
1119      * Get the template parameters for this model element
1120      * @see ModelElementFacade#getTemplateParameters()
1121      */
1122     public Collection<TemplateParameterFacade> getTemplateParameters()
1123     {
1124         return this.getSuperEJB3EntityAttributeFacade().getTemplateParameters();
1125     }
1126 
1127     /**
1128      * The visibility (i.e. public, private, protected or package) of the model element, will
1129      * attempt a lookup for these values in the language mappings (if any).
1130      * @see ModelElementFacade#getVisibility()
1131      */
1132     public String getVisibility()
1133     {
1134         return this.getSuperEJB3EntityAttributeFacade().getVisibility();
1135     }
1136 
1137     /**
1138      * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
1139      * is taken into account when searching for the stereotype), false otherwise.
1140      * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
1141      */
1142     public boolean hasExactStereotype(String stereotypeName)
1143     {
1144         return this.getSuperEJB3EntityAttributeFacade().hasExactStereotype(stereotypeName);
1145     }
1146 
1147     /**
1148      * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
1149      * pipe, semicolon, or << >>
1150      * @see ModelElementFacade#hasKeyword(String keywordName)
1151      */
1152     public boolean hasKeyword(String keywordName)
1153     {
1154         return this.getSuperEJB3EntityAttributeFacade().hasKeyword(keywordName);
1155     }
1156 
1157     /**
1158      * Returns true if the model element has the specified stereotype.  If the stereotype itself
1159      * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
1160      * one of the stereotype's ancestors has a matching name this method will return true, false
1161      * otherwise.
1162      * For example, if we have a certain stereotype called <<exception>> and a model element has a
1163      * stereotype called <<applicationException>> which extends <<exception>>, when calling this
1164      * method with 'stereotypeName' defined as 'exception' the method would return true since
1165      * <<applicationException>> inherits from <<exception>>.  If you want to check if the model
1166      * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
1167      * @see ModelElementFacade#hasStereotype(String stereotypeName)
1168      */
1169     public boolean hasStereotype(String stereotypeName)
1170     {
1171         return this.getSuperEJB3EntityAttributeFacade().hasStereotype(stereotypeName);
1172     }
1173 
1174     /**
1175      * True if there are target dependencies from this element that are instances of BindingFacade.
1176      * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
1177      * @see ModelElementFacade#isBindingDependenciesPresent()
1178      */
1179     public boolean isBindingDependenciesPresent()
1180     {
1181         return this.getSuperEJB3EntityAttributeFacade().isBindingDependenciesPresent();
1182     }
1183 
1184     /**
1185      * Indicates if any constraints are present on this model element.
1186      * @see ModelElementFacade#isConstraintsPresent()
1187      */
1188     public boolean isConstraintsPresent()
1189     {
1190         return this.getSuperEJB3EntityAttributeFacade().isConstraintsPresent();
1191     }
1192 
1193     /**
1194      * Indicates if any documentation is present on this model element.
1195      * @see ModelElementFacade#isDocumentationPresent()
1196      */
1197     public boolean isDocumentationPresent()
1198     {
1199         return this.getSuperEJB3EntityAttributeFacade().isDocumentationPresent();
1200     }
1201 
1202     /**
1203      * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
1204      * @see ModelElementFacade#isReservedWord()
1205      */
1206     public boolean isReservedWord()
1207     {
1208         return this.getSuperEJB3EntityAttributeFacade().isReservedWord();
1209     }
1210 
1211     /**
1212      * True is there are template parameters on this model element. For UML2, applies to Class,
1213      * Operation, Property, and Parameter.
1214      * @see ModelElementFacade#isTemplateParametersPresent()
1215      */
1216     public boolean isTemplateParametersPresent()
1217     {
1218         return this.getSuperEJB3EntityAttributeFacade().isTemplateParametersPresent();
1219     }
1220 
1221     /**
1222      * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
1223      * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
1224      * Enumerations and Interfaces, optionally applies on other model elements.
1225      * @see ModelElementFacade#isValidIdentifierName()
1226      */
1227     public boolean isValidIdentifierName()
1228     {
1229         return this.getSuperEJB3EntityAttributeFacade().isValidIdentifierName();
1230     }
1231 
1232     /**
1233      * Searches for the constraint with the specified 'name' on this model element, and if found
1234      * translates it using the specified 'translation' from a translation library discovered by the
1235      * framework.
1236      * @see ModelElementFacade#translateConstraint(String name, String translation)
1237      */
1238     public String translateConstraint(String name, String translation)
1239     {
1240         return this.getSuperEJB3EntityAttributeFacade().translateConstraint(name, translation);
1241     }
1242 
1243     /**
1244      * Translates all constraints belonging to this model element with the given 'translation'.
1245      * @see ModelElementFacade#translateConstraints(String translation)
1246      */
1247     public String[] translateConstraints(String translation)
1248     {
1249         return this.getSuperEJB3EntityAttributeFacade().translateConstraints(translation);
1250     }
1251 
1252     /**
1253      * Translates the constraints of the specified 'kind' belonging to this model element.
1254      * @see ModelElementFacade#translateConstraints(String kind, String translation)
1255      */
1256     public String[] translateConstraints(String kind, String translation)
1257     {
1258         return this.getSuperEJB3EntityAttributeFacade().translateConstraints(kind, translation);
1259     }
1260 
1261     // ----------- delegates to ManageableEntityAttribute ------------
1262     /**
1263      * Whether or not this attribute should be displayed.
1264      * @see ManageableEntityAttribute#isDisplay()
1265      */
1266     public boolean isDisplay()
1267     {
1268         return this.getSuperManageableEntityAttribute().isDisplay();
1269     }
1270 
1271     /**
1272      * Whether or not this attribute can be read in a call isolated from the rest (for example when
1273      * downloading binary fields).
1274      * @see ManageableEntityAttribute#isManageableGetterAvailable()
1275      */
1276     public boolean isManageableGetterAvailable()
1277     {
1278         return this.getSuperManageableEntityAttribute().isManageableGetterAvailable();
1279     }
1280 
1281     /**
1282      * @see org.andromda.core.metafacade.MetafacadeBase#initialize()
1283      */
1284     @Override
1285     public void initialize()
1286     {
1287         this.getSuperEJB3EntityAttributeFacade().initialize();
1288         this.getSuperManageableEntityAttribute().initialize();
1289     }
1290 
1291     /**
1292      * @return Object getSuperEJB3EntityAttributeFacade().getValidationOwner()
1293      * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
1294      */
1295     @Override
1296     public Object getValidationOwner()
1297     {
1298         Object owner = this.getSuperEJB3EntityAttributeFacade().getValidationOwner();
1299         if (owner == null)
1300         {
1301             owner = this.getSuperManageableEntityAttribute().getValidationOwner();
1302         }
1303         return owner;
1304     }
1305 
1306     /**
1307      * @return String getSuperEJB3EntityAttributeFacade().getValidationName()
1308      * @see org.andromda.core.metafacade.MetafacadeBase#getValidationName()
1309      */
1310     @Override
1311     public String getValidationName()
1312     {
1313         String name = this.getSuperEJB3EntityAttributeFacade().getValidationName();
1314         if (name == null)
1315         {
1316             name = this.getSuperManageableEntityAttribute().getValidationName();
1317         }
1318         return name;
1319     }
1320 
1321     /**
1322      * @param validationMessages Collection<ModelValidationMessage>
1323      * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(Collection validationMessages)
1324      */
1325     @Override
1326     public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1327     {
1328         this.getSuperEJB3EntityAttributeFacade().validateInvariants(validationMessages);
1329         this.getSuperManageableEntityAttribute().validateInvariants(validationMessages);
1330     }
1331 
1332     /**
1333      * The property that stores the name of the metafacade.
1334      */
1335     private static final String NAME_PROPERTY = "name";
1336     private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1337 
1338     /**
1339      * @see Object#toString()
1340      */
1341     @Override
1342     public String toString()
1343     {
1344         final StringBuilder toString = new StringBuilder(this.getClass().getName());
1345         toString.append("[");
1346         try
1347         {
1348             toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1349         }
1350         catch (final Throwable tryAgain)
1351         {
1352             try
1353             {
1354                 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1355             }
1356             catch (final Throwable ignore)
1357             {
1358                 // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
1359             }
1360         }
1361         toString.append("]");
1362         return toString.toString();
1363     }
1364 }