Package org.olap4j.type

Examples of org.olap4j.type.MemberType


    public <T> T accept(ParseTreeVisitor<T> visitor) {
        return visitor.visit(this);
    }

    public Type getType() {
        return new MemberType(
            member.getDimension(),
            member.getHierarchy(),
            member.getLevel(),
            member);
    }
View Full Code Here


        // Describe the parameters.
        OlapParameterMetaData parameterMetaData =
            statement.getParameterMetaData();

        // Locate the member "[Store].[USA].[WA].[Seattle]".
        MemberType type =
            (MemberType) parameterMetaData.getParameterOlapType(1);
        Dimension dimension = type.getDimension();
        assert dimension.getName().equals("Store");
        Member allStores =
            dimension.getDefaultHierarchy().getRootMembers().get(0);
        Member memberUsa = allStores.getChildMembers().get("USA");
        Member memberWa = memberUsa.getChildMembers().get("WA");
View Full Code Here

        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);
View Full Code Here

    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);
View Full Code Here

TOP

Related Classes of org.olap4j.type.MemberType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.