mondrian.rolap
Class RolapMember.DefaultPropertyValueMapFactory

java.lang.Object
  extended by mondrian.rolap.RolapMember.DefaultPropertyValueMapFactory
All Implemented Interfaces:
RolapMember.PropertyValueMapFactory
Enclosing class:
RolapMember

public static final class RolapMember.DefaultPropertyValueMapFactory
extends Object
implements RolapMember.PropertyValueMapFactory

Default RolapMember.PropertyValueMapFactory implementation, used if MondrianProperties.PropertyValueMapFactoryClass is not set.


Constructor Summary
RolapMember.DefaultPropertyValueMapFactory()
           
 
Method Summary
 Map<String,Object> create(Member member)
          Create a new Map to be used for storing property string/value pairs for the specified Member.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RolapMember.DefaultPropertyValueMapFactory

public RolapMember.DefaultPropertyValueMapFactory()
Method Detail

create

public Map<String,Object> create(Member member)

Create a new Map to be used for storing property string/value pairs for the specified Member.

This factory creates an Flat3Map if it appears that the provided member has less than 3 properties, and a HashMap if it appears that it has more than 3.

Guessing the number of properties can be tricky since some subclasses of Member

have additional properties that aren't explicitly declared. The most common offenders are the (@link mondrian.olap.Measure} implementations, which often have 4 or more undeclared properties, so if the member is a measure, the factory will create a HashMap.

Specified by:
create in interface RolapMember.PropertyValueMapFactory
Parameters:
member -
Returns:
the Map instance to store property/value pairs

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads