View Javadoc
1   package org.andromda.metafacades.uml14;
2   
3   import org.andromda.metafacades.uml.AttributeFacade;
4   import org.andromda.metafacades.uml.ClassifierFacade;
5   import org.andromda.metafacades.uml.EntityAttribute;
6   import org.andromda.metafacades.uml.ManageableEntity;
7   
8   /**
9    * MetafacadeLogic implementation for org.andromda.metafacades.uml.ManageableEntityAssociationEnd.
10   *
11   * @see org.andromda.metafacades.uml.ManageableEntityAssociationEnd
12   * @author Bob Fields
13   */
14  public class ManageableEntityAssociationEndLogicImpl
15      extends ManageableEntityAssociationEndLogic
16  {
17      private static final long serialVersionUID = -4698233249137350091L;
18  
19      /**
20       * @param metaObject
21       * @param context
22       */
23      public ManageableEntityAssociationEndLogicImpl(Object metaObject, String context)
24      {
25          super(metaObject, context);
26      }
27  
28      /**
29       * @see org.andromda.metafacades.uml.ManageableEntityAssociationEnd#getManageableIdentifier()
30       */
31      @Override
32      protected EntityAttribute handleGetManageableIdentifier()
33      {
34          AttributeFacade 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 (EntityAttribute)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  }