View Javadoc
1   package org.andromda.cartridges.hibernate.metafacades;
2   
3   import org.andromda.cartridges.hibernate.HibernateProfile;
4   import org.apache.commons.lang.StringUtils;
5   
6   /**
7    * MetafacadeLogic implementation for
8    * org.andromda.cartridges.hibernate.metafacades.HibernateServiceOperation.
9    *
10   * @see org.andromda.cartridges.hibernate.metafacades.HibernateServiceOperation
11   */
12  public class HibernateServiceOperationLogicImpl
13      extends HibernateServiceOperationLogic
14  {
15      private static final long serialVersionUID = 34L;
16      /**
17       * @param metaObject
18       * @param context
19       */
20      public HibernateServiceOperationLogicImpl(
21          Object metaObject,
22          String context)
23      {
24          super(metaObject, context);
25      }
26  
27      /**
28       * Stores the default transaction type for service operations.
29       */
30      private static final String SERVICE_OPERATION_TRANSACTION_TYPE = "serviceOperationTransactionType";
31  
32      /**
33       * @see org.andromda.cartridges.hibernate.metafacades.HibernateServiceOperationLogic#handleGetTransactionType()
34       * @see org.andromda.cartridges.hibernate.metafacades.HibernateServiceOperation#getTransactionType()
35       */
36      public String handleGetTransactionType()
37      {
38          String transactionType = (String)this.findTaggedValue(HibernateProfile.TAGGEDVALUE_EJB_TRANSACTION_TYPE);
39          if (StringUtils.isBlank(transactionType))
40          {
41              transactionType = String.valueOf(this.getConfiguredProperty(SERVICE_OPERATION_TRANSACTION_TYPE));
42          }
43          return transactionType;
44      }
45  }