001package org.andromda.cartridges.ejb.metafacades; 002 003/** 004 * <p> 005 * Represents an EJB association end. </p> Metaclass facade implementation. 006 */ 007public class EJBAssociationEndFacadeLogicImpl 008 extends EJBAssociationEndFacadeLogic 009{ 010 private static final long serialVersionUID = 34L; 011 // ---------------- constructor ------------------------------- 012 013 /** 014 * @param metaObject 015 * @param context 016 */ 017 public EJBAssociationEndFacadeLogicImpl(Object metaObject, String context) 018 { 019 super(metaObject, context); 020 } 021 022 /** 023 * @see org.andromda.cartridges.ejb.metafacades.EJBAssociationEndFacadeLogic#handleGetRelationType() 024 */ 025 public String handleGetRelationType() 026 { 027 String targetType; 028 if (this.isMany2Many() || this.isOne2Many()) 029 { 030 targetType = "java.util.Collection"; 031 } 032 else 033 { 034 targetType = this.getOtherEnd().getType().getFullyQualifiedName(); 035 } 036 return targetType; 037 } 038 039 // ------------- relations ------------------ 040 041}