if (parameterType instanceof MemberType)
{
if (parameterValue instanceof String)
{
final MemberType type = (MemberType) parameterType;
final Hierarchy hierarchy = type.getHierarchy();
final Cube cube = statement.getCube();
parameterValue = findMember(hierarchy, cube, String.valueOf(parameterValue));
}
else if (!(parameterValue instanceof Member))
{
throw new ReportDataFactoryException(parameterValue + " is incorrect for type " + parameterType);
}
}
if (parameterType instanceof SetType)
{
if (parameterValue instanceof String)
{
final SetType type = (SetType) parameterType;
final Hierarchy hierarchy = type.getHierarchy();
final Cube cube = statement.getCube();
final String rawString = (String) parameterValue;
final String[] memberStr = rawString.replaceFirst("^ *\\{", "").replaceFirst("} *$", "").split(",");
final List<Member> list = new ArrayList<Member>(memberStr.length);