当前位置: 首页>>代码示例>>Java>>正文


Java Member.getName方法代码示例

本文整理汇总了Java中org.olap4j.metadata.Member.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Member.getName方法的具体用法?Java Member.getName怎么用?Java Member.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.olap4j.metadata.Member的用法示例。


在下文中一共展示了Member.getName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getRootMembers

import org.olap4j.metadata.Member; //导入方法依赖的package包/类
public NamedList<Member> getRootMembers() {
    final MondrianOlap4jConnection olap4jConnection =
        olap4jSchema.olap4jCatalog.olap4jDatabaseMetaData.olap4jConnection;
    final List<mondrian.olap.Member> levelMembers =
        olap4jConnection.connection.getSchemaReader().getLevelMembers(
            hierarchy.getLevels()[0], true);

    return new AbstractNamedList<Member>() {
        protected String getName(Member member) {
            return member.getName();
        }

        public Member get(int index) {
            return olap4jConnection.toOlap4j(levelMembers.get(index));
        }

        public int size() {
            return levelMembers.size();
        }
    };
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:22,代码来源:MondrianOlap4jHierarchy.java

示例2: ExcludeMemberAction

import org.olap4j.metadata.Member; //导入方法依赖的package包/类
public ExcludeMemberAction(WabitSwingSession session, OlapQuery query, Member member, Operator operator) {
    super(session,
            (operator == Operator.CHILDREN) ? 
    		"Exclude Children of Member '" + member.getName() + "'" :
    		"Exclude Member '" + member.getName() + "'",
    		query,
    		member);
    this.operator = operator;
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:10,代码来源:ExcludeMemberAction.java

示例3: next

import org.olap4j.metadata.Member; //导入方法依赖的package包/类
@Override
  public List<?> next() throws TranslatorException {
  	if (!rowPositionIterator.hasNext()) {
  		return null;
  	}
  	Position rowPosition = rowPositionIterator.next();
  	Object[] result = new Object[colWidth];
  	int i = 0;
  	// add in rows axis
List<Member> members = rowPosition.getMembers();
for (Member member:members) {
	String columnName = member.getName();
	result[i++] = columnName;
}

// add col axis
for (Position colPos : columnsAxis) {
	Cell cell = cellSet.getCell(colPos, rowPosition);
	result[i++] = cell.getValue();
}	
if (returnsArray) {
	ArrayList<Object[]> results = new ArrayList<Object[]>(1);
	results.add(result);
	return results;
}
return Arrays.asList(result);
  }
 
开发者ID:kenweezy,项目名称:teiid,代码行数:28,代码来源:OlapQueryExecution.java

示例4: DrillReplaceAction

import org.olap4j.metadata.Member; //导入方法依赖的package包/类
public DrillReplaceAction(WabitSwingSession session, OlapQuery query, Member member) {
    super(session, "Drill Replace on " + member.getName(), query, member);
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:4,代码来源:DrillReplaceAction.java

示例5: populateMember

import org.olap4j.metadata.Member; //导入方法依赖的package包/类
private void populateMember(
    OlapConnection connection,
    Catalog catalog,
    Member member,
    Cube cube,
    String levelListStr,
    List<Row> rows)
    throws SQLException
{
    Boolean visible =
        (Boolean) member.getPropertyValue(
            Property.StandardMemberProperty.$visible);
    if (visible == null) {
        visible = true;
    }
    if (!visible && !XmlaUtil.shouldEmitInvisibleMembers(request)) {
        return;
    }

    //TODO: currently this is always null
    String desc = member.getDescription();
    if (desc == null) {
        desc =
            cube.getName() + " Cube - "
            + member.getName() + " Member";
    }
    final String formatString =
        (String) member.getPropertyValue(
            Property.StandardCellProperty.FORMAT_STRING);

    Row row = new Row();
    row.set(CatalogName.name, catalog.getName());
    row.set(SchemaName.name, cube.getSchema().getName());
    row.set(CubeName.name, cube.getName());
    row.set(MeasureName.name, member.getName());
    row.set(MeasureUniqueName.name, member.getUniqueName());
    row.set(MeasureCaption.name, member.getCaption());
    //row.set(MeasureGuid.name, "");

    final XmlaHandler.XmlaExtra extra = getExtra(connection);
    row.set(MeasureAggregator.name, extra.getMeasureAggregator(member));

    // DATA_TYPE DBType best guess is string
    XmlaConstants.DBType dbType = XmlaConstants.DBType.WSTR;
    String datatype = (String)
        member.getPropertyValue(Property.StandardCellProperty.DATATYPE);
    if (datatype != null) {
        if (datatype.equals("Integer")) {
            dbType = XmlaConstants.DBType.I4;
        } else if (datatype.equals("Numeric")) {
            dbType = XmlaConstants.DBType.R8;
        } else {
            dbType = XmlaConstants.DBType.WSTR;
        }
    }
    row.set(DataType.name, dbType.xmlaOrdinal());
    row.set(MeasureIsVisible.name, visible);

    if (levelListStr != null) {
        row.set(LevelsList.name, levelListStr);
    }

    row.set(Description.name, desc);
    row.set(FormatString.name, formatString);
    addRow(row, rows);
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:67,代码来源:RowsetDefinition.java

示例6: populateMember

import org.olap4j.metadata.Member; //导入方法依赖的package包/类
private void populateMember(OlapConnection connection, Catalog catalog, Member member, Cube cube, String levelListStr, List<Row> rows) throws SQLException {
   Boolean visible = (Boolean) member.getPropertyValue(Property.StandardMemberProperty.$visible);
   if (visible == null) {
      visible = true;
   }
   if (!visible && !XmlaUtil.shouldEmitInvisibleMembers(request)) {
      return;
   }

   String desc = member.getDescription();
   if (desc == null) {
      desc = cube.getName() + " Cube - " + member.getName() + " Member";
   }
   String formatString = (String) member.getPropertyValue(Property.StandardCellProperty.FORMAT_STRING);
   if (formatString == null)
      formatString = "#.#";

   Row row = new Row();
   row.set(CatalogName.name, catalog.getName());
   row.set(CubeName.name, cube.getName());
   row.set(MeasureName.name, member.getName());
   row.set(MeasureUniqueName.name, member.getUniqueName());
   row.set(MeasureUnqualifiedCaption.name, member.getUniqueName());

   row.set(MeasureCaption.name, member.getCaption());
   // row.set(MeasureGuid.name, "");

   final CustomXmlaHandler.XmlaExtra extra = getExtra(connection);
   row.set(MeasureAggregator.name, extra.getMeasureAggregator(member));

   // DATA_TYPE DBType best guess is string
   XmlaConstants.DBType dbType = XmlaConstants.DBType.WSTR;
   String datatype = (String) member.getPropertyValue(Property.StandardCellProperty.DATATYPE);
   String precision = "16";
   if (datatype != null) {
      if (datatype.equals("Integer")) {
         dbType = XmlaConstants.DBType.I4;
         precision = "10";
      } else if (datatype.equals("Numeric")) {
         dbType = XmlaConstants.DBType.R8;
         precision = "16";
      } else {
         dbType = XmlaConstants.DBType.WSTR;
         precision = null;
      }
   }
   row.set(DataType.name, dbType.xmlaOrdinal());
   row.set(NumericPrecision.name, precision);
   row.set(NumericScale.name, -1);
   row.set(MeasureIsVisible.name, true);
   row.set(MeasureNameSql.name, member.getName());
   // row.set(MeasureGroupName.name, member.getCaption());
   // row.set(MeasureGroupName.name, "");
   row.set(Description.name, desc);
   row.set(MeasureDisplayFolder.name, "");
   row.set(FormatString.name, formatString);
   addRow(row, rows);
}
 
开发者ID:OpenlinkFinancial,项目名称:MXMLABridge,代码行数:59,代码来源:RowsetDefinition.java

示例7: DrillUpAction

import org.olap4j.metadata.Member; //导入方法依赖的package包/类
/**
 * @param query
 *            The query whose selection will be modified
 * @param member
 *            The member whose ancestor Members will be added to the query
 *            selection
 * @param targetAncestor
 *            The ancestor Member of member that will be set as the root
 *            selection in member's hierarchy
 */
public DrillUpAction(WabitSwingSession session, OlapQuery query, Member member, Member targetAncestor) {
       super(session, "Drill up to '" + targetAncestor.getName() + "'", query, member);
       this.targetAncestor = targetAncestor;
   }
 
开发者ID:SQLPower,项目名称:wabit,代码行数:15,代码来源:DrillUpAction.java


注:本文中的org.olap4j.metadata.Member.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。