View Javadoc
1   package org.andromda.cartridges.spring.metafacades;
2   
3   import org.andromda.metafacades.uml.ClassifierFacade;
4   import org.andromda.utils.StringUtilsHelper;
5   
6   /**
7    * MetafacadeLogic implementation for org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd.
8    *
9    * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd
10   */
11  public class SpringManageableEntityAssociationEndLogicImpl
12      extends SpringManageableEntityAssociationEndLogic
13  {
14      private static final long serialVersionUID = 34L;
15      /**
16       * Public constructor for SpringManageableEntityAssociationEndLogicImpl
17       * @param metaObject
18       * @param context
19       * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd
20       */
21      public SpringManageableEntityAssociationEndLogicImpl (Object metaObject, String context)
22      {
23          super (metaObject, context);
24      }
25  
26      /**
27       * @return StringUtilsHelper.lowerCamelCaseName(this.getName()) + "Dao"
28       * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd#getDaoName()
29       */
30      protected String handleGetDaoName()
31      {
32          return StringUtilsHelper.lowerCamelCaseName(this.getName()) + "Dao";
33      }
34  
35      /**
36       * @return getType().getBeanName(false)
37       * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd#getDaoReferenceName()
38       */
39      protected String handleGetDaoReferenceName()
40      {
41          String referenceName = null;
42  
43          final ClassifierFacade type = this.getType();
44          if (type instanceof SpringEntity)
45          {
46              final SpringEntity entity = (SpringEntity)type;
47              referenceName = entity.getBeanName(false);
48          }
49  
50          return referenceName;
51      }
52  
53      /**
54       * @return getGetterName() + "Dao"
55       * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd#getDaoGetterName()
56       */
57      protected String handleGetDaoGetterName()
58      {
59          return this.getGetterName() + "Dao";
60      }
61  
62      /**
63       * @return getSetterName() + "Dao"
64       * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd#getDaoSetterName()
65       */
66      protected String handleGetDaoSetterName()
67      {
68          return this.getSetterName() + "Dao";
69      }
70  
71  }