View Javadoc
1   package org.andromda.cartridges.ejb.metafacades;
2   
3   import org.andromda.cartridges.ejb.EJBProfile;
4   
5   /**
6    * MetafacadeLogic implementation for org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade.
7    *
8    * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade
9    */
10  public class EJBAssociationFacadeLogicImpl
11          extends EJBAssociationFacadeLogic
12  {
13      private static final long serialVersionUID = 34L;
14      // ---------------- constructor -------------------------------
15  
16      /**
17       * @param metaObject
18       * @param context
19       */
20      public EJBAssociationFacadeLogicImpl(Object metaObject, String context)
21      {
22          super(metaObject, context);
23      }
24  
25      // --------------- attributes ---------------------
26      /**
27       * @return findTaggedValue(EJBProfile.TAGGEDVALUE_EJB_TRANSACTION_TYPE)
28       * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacade#getTransactionType()
29       */
30      protected String handleGetTransactionType()
31      {
32          return (String)this.findTaggedValue(EJBProfile.TAGGEDVALUE_EJB_TRANSACTION_TYPE);
33      }
34  
35      /**
36       * @return tableName
37       * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationFacadeLogic#getTableName()
38       */
39      public String getTableName()
40      {
41          String tableName = super.getTableName();
42          if (getName().toLowerCase().startsWith(tableName.toLowerCase()))
43          {
44              tableName = getRelationName().replaceAll("-", "_").toUpperCase();
45          }
46          return tableName;
47      }
48  }