01: package org.andromda.cartridges.hibernate.metafacades;
02:
03: import org.andromda.cartridges.hibernate.HibernateProfile;
04: import org.apache.commons.lang.StringUtils;
05:
06: /**
07: * MetafacadeLogic implementation for
08: * org.andromda.cartridges.hibernate.metafacades.HibernateServiceOperation.
09: *
10: * @see org.andromda.cartridges.hibernate.metafacades.HibernateServiceOperation
11: */
12: public class HibernateServiceOperationLogicImpl extends
13: HibernateServiceOperationLogic {
14: public HibernateServiceOperationLogicImpl(Object metaObject,
15: String context) {
16: super (metaObject, context);
17: }
18:
19: /**
20: * Stores the default transaction type for service operations.
21: */
22: private static final String SERVICE_OPERATION_TRANSACTION_TYPE = "serviceOperationTransactionType";
23:
24: /**
25: * @see org.andromda.metafacades.uml.ServiceOperationFacade#getTransactionType()
26: */
27: public String handleGetTransactionType() {
28: String transactionType = (String) this
29: .findTaggedValue(HibernateProfile.TAGGEDVALUE_EJB_TRANSACTION_TYPE);
30: if (StringUtils.isBlank(transactionType)) {
31: transactionType = String
32: .valueOf(this
33: .getConfiguredProperty(SERVICE_OPERATION_TRANSACTION_TYPE));
34: }
35: return transactionType;
36: }
37: }
|