本文整理汇总了Java中org.olap4j.metadata.Level.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Level.getName方法的具体用法?Java Level.getName怎么用?Java Level.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.olap4j.metadata.Level
的用法示例。
在下文中一共展示了Level.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: outputProperty
import org.olap4j.metadata.Level; //导入方法依赖的package包/类
private void outputProperty(Property property, Catalog catalog, Cube cube, Level level, List<Row> rows) {
Hierarchy hierarchy = level.getHierarchy();
Dimension dimension = hierarchy.getDimension();
String propertyName = property.getName();
Row row = new Row();
row.set(CatalogName.name, catalog.getName());
row.set(CubeName.name, cube.getName());
row.set(DimensionUniqueName.name, dimension.getUniqueName());
row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
row.set(LevelUniqueName.name, level.getUniqueName());
row.set(PropertyName.name, propertyName);
row.set(PropertyCaption.name, property.getCaption());
// Only member properties now
row.set(PropertyType.name, 1);
row.set(PropertyContentType.name, Property.ContentType.REGULAR.xmlaOrdinal());
XmlaConstants.DBType dbType = getDBTypeFromProperty(property);
row.set(DataType.name, 0);
row.set(PropertyOrigin.name, 1);
String desc = cube.getName() + " Cube - " + getHierarchyName(hierarchy) + " Hierarchy - " + level.getName() + " Level - " + property.getName() + " Property";
row.set(Description.name, desc);
row.set(PropertyCardinality.name, "MANY");
row.set(PropertyAttributeHierarchyName.name, propertyName);
//row.set(PropertyVisibility.name, 1);
row.set(PropertyIsVisible.name, true);
addRow(row, rows);
}
示例2: outputLevel
import org.olap4j.metadata.Level; //导入方法依赖的package包/类
/**
* Outputs a level.
*
* @param catalog Catalog name
* @param cube Cube definition
* @param hierarchy Hierarchy
* @param level Level
* @param rows List of rows to output to
* @return whether the level is visible
* @throws XmlaException If error occurs
*/
protected boolean outputLevel(
OlapConnection connection,
Catalog catalog,
Cube cube,
Hierarchy hierarchy,
Level level,
List<Row> rows)
throws XmlaException, SQLException
{
final XmlaHandler.XmlaExtra extra = getExtra(connection);
String desc = level.getDescription();
if (desc == null) {
desc =
cube.getName() + " Cube - "
+ getHierarchyName(hierarchy) + " Hierarchy - "
+ level.getName() + " Level";
}
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(
DimensionUniqueName.name,
hierarchy.getDimension().getUniqueName());
row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
row.set(LevelName.name, level.getName());
row.set(LevelUniqueName.name, level.getUniqueName());
//row.set(LevelGuid.name, "");
row.set(LevelCaption.name, level.getCaption());
// see notes on this #getDepth()
row.set(LevelNumber.name, level.getDepth());
// Get level cardinality
// According to microsoft this is:
// "The number of members in the level."
int n = extra.getLevelCardinality(level);
row.set(LevelCardinality.name, n);
row.set(LevelType.name, getLevelType(level));
// TODO: most of the time this is correct
row.set(CustomRollupSettings.name, 0);
int uniqueSettings = 0;
if (level.getLevelType() == Level.Type.ALL) {
uniqueSettings |= 2;
}
if (extra.isLevelUnique(level)) {
uniqueSettings |= 1;
}
row.set(LevelUniqueSettings.name, uniqueSettings);
row.set(LevelIsVisible.name, level.isVisible());
row.set(Description.name, desc);
addRow(row, rows);
return true;
}
示例3: outputProperty
import org.olap4j.metadata.Level; //导入方法依赖的package包/类
private void outputProperty(
Property property,
Catalog catalog,
Cube cube,
Level level,
List<Row> rows)
{
Hierarchy hierarchy = level.getHierarchy();
Dimension dimension = hierarchy.getDimension();
String propertyName = property.getName();
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(DimensionUniqueName.name, dimension.getUniqueName());
row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
row.set(LevelUniqueName.name, level.getUniqueName());
//TODO: what is the correct value here
//row.set(MemberUniqueName.name, "");
row.set(PropertyName.name, propertyName);
// Only member properties now
row.set(
PropertyType.name,
Property.TypeFlag.MEMBER.xmlaOrdinal());
row.set(
PropertyContentType.name,
Property.ContentType.REGULAR.xmlaOrdinal());
row.set(PropertyCaption.name, property.getCaption());
XmlaConstants.DBType dbType = getDBTypeFromProperty(property);
row.set(DataType.name, dbType.xmlaOrdinal());
String desc =
cube.getName() + " Cube - "
+ getHierarchyName(hierarchy) + " Hierarchy - "
+ level.getName() + " Level - "
+ property.getName() + " Property";
row.set(Description.name, desc);
addRow(row, rows);
}
示例4: outputLevel
import org.olap4j.metadata.Level; //导入方法依赖的package包/类
/**
* Outputs a level.
*
* @param catalog
* Catalog name
* @param cube
* Cube definition
* @param hierarchy
* Hierarchy
* @param level
* Level
* @param rows
* List of rows to output to
* @return whether the level is visible
* @throws XmlaException
* If error occurs
*/
protected boolean outputLevel(OlapConnection connection, Catalog catalog, Cube cube, Hierarchy hierarchy, Level level, List<Row> rows) throws XmlaException, SQLException {
final CustomXmlaHandler.XmlaExtra extra = getExtra(connection);
String desc = level.getDescription();
if (desc == null) {
desc = cube.getName() + " Cube - " + getHierarchyName(hierarchy) + " Hierarchy - " + level.getName() + " Level";
}
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(DimensionUniqueName.name, hierarchy.getDimension().getUniqueName());
row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
row.set(LevelName.name, level.getName());
row.set(LevelUniqueName.name, level.getUniqueName());
row.set(LevelCaption.name, level.getCaption());
row.set(LevelNumber.name, level.getDepth());
// Get level cardinality
// According to microsoft this is:
// "The number of members in the level."
int n = extra.getLevelCardinality(level);
row.set(LevelCardinality.name, n);
row.set(LevelType.name, getLevelType(level));
row.set(CustomRollupSettings.name, 0);
int uniqueSettings = 0;
if (level.getLevelType() == Level.Type.ALL) {
uniqueSettings |= 2;
}
if (extra.isLevelUnique(level)) {
uniqueSettings |= 1;
}
row.set(LevelUniqueSettings.name, uniqueSettings);
row.set(LevelIsVisible.name, level.isVisible());
row.set(LevelOrderingProperty.name, level.getName());
row.set(Description.name, desc);
row.set(LevelDbtype.name, 3);
row.set(LevelKeyCardinality.name, 1);
row.set(LevelOrigin.name, 2);
if(!level.getName().equalsIgnoreCase("(All)")){
String tmpName = level.getUniqueName();
String str = tmpName.substring(1);
tmpName = "[$".concat(str);
row.set(LevelNameSqlColumnName.name, "NAME("+tmpName+")");
row.set(LevelKeySqlColumnName.name, "KEY(" + tmpName+")");
row.set(LevelUniqueNameSqlColumnName.name, "(UNIQUENAME(" +tmpName + ")");
row.set(LevelAttributeHierarchyName.name, level.getName());
}
addRow(row, rows);
return true;
}