View Javadoc
1   package org.andromda.metafacades.emf.uml22;
2   
3   import org.andromda.metafacades.uml.ClassifierFacade;
4   import org.andromda.metafacades.uml.ManageableEntity;
5   import org.andromda.metafacades.uml.ManageableEntityAttribute;
6   
7   /**
8    * MetafacadeLogic implementation for
9    * org.andromda.metafacades.uml.ManageableEntityAssociationEnd.
10   *
11   * @see org.andromda.metafacades.uml.ManageableEntityAssociationEnd
12   */
13  public class ManageableEntityAssociationEndLogicImpl
14      extends ManageableEntityAssociationEndLogic
15  {
16      private static final long serialVersionUID = 34L;
17      /**
18       * @param metaObject
19       * @param context
20       */
21      public ManageableEntityAssociationEndLogicImpl(
22          final Object metaObject,
23          final String context)
24      {
25          super(metaObject, context);
26      }
27  
28      /**
29       * @see org.andromda.metafacades.uml.ManageableEntityAssociationEnd#getManageableIdentifier()
30       */
31      @Override
32      protected ManageableEntityAttribute handleGetManageableIdentifier()
33      {
34          ManageableEntityAttribute manageableIdentifier = null;
35  
36          final ClassifierFacade classifierFacade = this.getType();
37          if (classifierFacade instanceof ManageableEntity)
38          {
39              final ManageableEntity entity = (ManageableEntity)classifierFacade;
40              manageableIdentifier = entity.getManageableIdentifier();
41          }
42  
43          return manageableIdentifier;
44      }
45  
46      /**
47       * @see org.andromda.metafacades.uml.ManageableEntityAssociationEnd#isDisplay()
48       */
49      @Override
50      protected boolean handleIsDisplay()
51      {
52          // we always display association ends
53          return true;
54      }
55  }