1 package org.andromda.cartridges.ejb.metafacades;
2
3 import org.andromda.cartridges.ejb.EJBGlobals;
4 import org.andromda.cartridges.ejb.EJBProfile;
5 import org.apache.commons.lang.StringUtils;
6
7
8
9
10
11
12 public class EJBOperationFacadeLogicImpl
13 extends EJBOperationFacadeLogic
14 {
15 private static final long serialVersionUID = 34L;
16
17
18
19
20
21
22 public EJBOperationFacadeLogicImpl(Object metaObject, String context)
23 {
24 super(metaObject, context);
25 }
26
27
28
29
30
31 protected String handleGetTransactionType()
32 {
33 String transactionType = (String)this.findTaggedValue(EJBProfile.TAGGEDVALUE_EJB_TRANSACTION_TYPE, true);
34 if (StringUtils.isBlank(transactionType))
35 {
36 transactionType = String.valueOf(this.getConfiguredProperty(EJBGlobals.TRANSACTION_TYPE));
37 }
38 if (StringUtils.isBlank(transactionType))
39 {
40 transactionType = "Required";
41 }
42 return transactionType;
43 }
44
45
46
47
48
49 protected boolean handleIsBusinessOperation()
50 {
51 return !this.hasStereotype(EJBProfile.STEREOTYPE_CREATE_METHOD) &&
52 !this.hasStereotype(EJBProfile.STEREOTYPE_FINDER_METHOD) &&
53 !this.hasStereotype(EJBProfile.STEREOTYPE_SELECT_METHOD);
54 }
55
56
57
58
59
60 protected boolean handleIsSelectMethod()
61 {
62 return this.hasStereotype(EJBProfile.STEREOTYPE_SELECT_METHOD);
63 }
64 }