1 28 package net.sf.jasperreports.olap.mondrian; 29 30 import java.util.HashMap ; 31 import java.util.Map ; 32 33 import mondrian.olap.Member; 34 35 36 40 public class JRMondrianFactory 41 { 42 43 private final Map members; 44 45 public JRMondrianFactory() 46 { 47 members = new HashMap (); 48 } 49 50 public JRMondrianMember createMember(Member member) 51 { 52 JRMondrianMember mondrianMember; 53 if (member == null) 54 { 55 mondrianMember = null; 56 } 57 else 58 { 59 String key = member.getUniqueName(); 60 mondrianMember = (JRMondrianMember) members.get(key); 61 if (mondrianMember == null) 62 { 63 mondrianMember = new JRMondrianMember(member, this); 64 members.put(key, mondrianMember); 65 } 66 } 67 return mondrianMember; 68 } 69 70 } 71 | Popular Tags |