001package org.andromda.cartridges.spring.metafacades; 002 003import org.andromda.metafacades.uml.ClassifierFacade; 004import org.andromda.utils.StringUtilsHelper; 005 006/** 007 * MetafacadeLogic implementation for org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd. 008 * 009 * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd 010 */ 011public class SpringManageableEntityAssociationEndLogicImpl 012 extends SpringManageableEntityAssociationEndLogic 013{ 014 private static final long serialVersionUID = 34L; 015 /** 016 * Public constructor for SpringManageableEntityAssociationEndLogicImpl 017 * @param metaObject 018 * @param context 019 * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd 020 */ 021 public SpringManageableEntityAssociationEndLogicImpl (Object metaObject, String context) 022 { 023 super (metaObject, context); 024 } 025 026 /** 027 * @return StringUtilsHelper.lowerCamelCaseName(this.getName()) + "Dao" 028 * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd#getDaoName() 029 */ 030 protected String handleGetDaoName() 031 { 032 return StringUtilsHelper.lowerCamelCaseName(this.getName()) + "Dao"; 033 } 034 035 /** 036 * @return getType().getBeanName(false) 037 * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd#getDaoReferenceName() 038 */ 039 protected String handleGetDaoReferenceName() 040 { 041 String referenceName = null; 042 043 final ClassifierFacade type = this.getType(); 044 if (type instanceof SpringEntity) 045 { 046 final SpringEntity entity = (SpringEntity)type; 047 referenceName = entity.getBeanName(false); 048 } 049 050 return referenceName; 051 } 052 053 /** 054 * @return getGetterName() + "Dao" 055 * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd#getDaoGetterName() 056 */ 057 protected String handleGetDaoGetterName() 058 { 059 return this.getGetterName() + "Dao"; 060 } 061 062 /** 063 * @return getSetterName() + "Dao" 064 * @see org.andromda.cartridges.spring.metafacades.SpringManageableEntityAssociationEnd#getDaoSetterName() 065 */ 066 protected String handleGetDaoSetterName() 067 { 068 return this.getSetterName() + "Dao"; 069 } 070 071}