1 package org.andromda.cartridges.spring.metafacades;
2
3 import org.andromda.metafacades.uml.ClassifierFacade;
4 import org.andromda.utils.StringUtilsHelper;
5
6
7
8
9
10
11 public class SpringManageableEntityAssociationEndLogicImpl
12 extends SpringManageableEntityAssociationEndLogic
13 {
14 private static final long serialVersionUID = 34L;
15
16
17
18
19
20
21 public SpringManageableEntityAssociationEndLogicImpl (Object metaObject, String context)
22 {
23 super (metaObject, context);
24 }
25
26
27
28
29
30 protected String handleGetDaoName()
31 {
32 return StringUtilsHelper.lowerCamelCaseName(this.getName()) + "Dao";
33 }
34
35
36
37
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
55
56
57 protected String handleGetDaoGetterName()
58 {
59 return this.getGetterName() + "Dao";
60 }
61
62
63
64
65
66 protected String handleGetDaoSetterName()
67 {
68 return this.getSetterName() + "Dao";
69 }
70
71 }