本文整理汇总了Java中mondrian.rolap.RolapStar.Table方法的典型用法代码示例。如果您正苦于以下问题:Java RolapStar.Table方法的具体用法?Java RolapStar.Table怎么用?Java RolapStar.Table使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mondrian.rolap.RolapStar
的用法示例。
在下文中一共展示了RolapStar.Table方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: extraPredicates
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
/**
* Adds predicates not associated with columns.
*
* @param sqlQuery Query
*/
protected void extraPredicates(SqlQuery sqlQuery) {
List<StarPredicate> predicateList = getPredicateList();
for (StarPredicate predicate : predicateList) {
for (RolapStar.Column column
: predicate.getConstrainedColumnList())
{
final RolapStar.Table table = column.getTable();
table.addToFrom(sqlQuery, false, true);
}
StringBuilder buf = new StringBuilder();
predicate.toSql(sqlQuery, buf);
final String where = buf.toString();
if (!where.equals("true")) {
sqlQuery.addWhere(where);
}
}
}
示例2: lookupInChildren
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected RolapStar.Column lookupInChildren(
final RolapStar.Table table,
final String factColumnName)
{
// This can happen if we are looking at a collapsed dimension
// table, and the collapsed dimension in question in the
// fact table is a snowflake (not just a star), so we
// must look deeper...
for (RolapStar.Table child : table.getChildren()) {
RolapStar.Column rc = child.lookupColumn(factColumnName);
if (rc != null) {
return rc;
} else {
rc = lookupInChildren(child, factColumnName);
if (rc != null) {
return rc;
}
}
}
return null;
}
示例3: MondrianSchema
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public MondrianSchema(RolapConnection conn, RolapCube cube) {
this.connection = conn;
this.cube = cube;
RolapStar star = cube.getStar();
dialect = new MondrianDialect(star.getSqlQueryDialect());
final RolapStar.Table factTable = star.getFactTable();
final Locus locus =
new Locus(
new Execution(conn.getInternalStatement(),0),
"MondrianSchema.init",
"while loading the MondrianSchema into the Aggregation Designer.");
Locus.push(locus);
try {
doTable(null, factTable);
doCube(cube);
} finally {
Locus.pop(locus);
}
}
示例4: getFactTable
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected RolapStar.Table getFactTable() {
return star.getFactTable();
}
示例5: getTable
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected JdbcSchema.Table getTable(JdbcSchema db, RolapStar.Table rt) {
JdbcSchema.Table jt = getTable(db, rt.getAlias());
return (jt == null)
? getTable(db, rt.getTableName())
: jt;
}
示例6: nonDistinctGenerateSql
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected void nonDistinctGenerateSql(SqlQuery sqlQuery)
{
// add constraining dimensions
RolapStar.Column[] columns = getColumns();
int arity = columns.length;
if (countOnly) {
sqlQuery.addSelect("count(*)");
}
for (int i = 0; i < arity; i++) {
RolapStar.Column column = columns[i];
RolapStar.Table table = column.getTable();
if (table.isFunky()) {
// this is a funky dimension -- ignore for now
continue;
}
table.addToFrom(sqlQuery, false, true);
String expr = column.generateExprString(sqlQuery);
StarColumnPredicate predicate = getColumnPredicate(i);
final String where = RolapStar.Column.createInExpr(
expr,
predicate,
column.getDatatype(),
sqlQuery);
if (!where.equals("true")) {
sqlQuery.addWhere(where);
}
if (countOnly) {
continue;
}
// some DB2 (AS400) versions throw an error, if a column alias is
// there and *not* used in a subsequent order by/group by
final Dialect dialect = sqlQuery.getDialect();
final String alias;
final Dialect.DatabaseProduct databaseProduct =
dialect.getDatabaseProduct();
if (databaseProduct == Dialect.DatabaseProduct.DB2_AS400) {
alias = sqlQuery.addSelect(expr, null);
} else {
alias = sqlQuery.addSelect(expr, getColumnAlias(i));
}
if (isAggregate()) {
sqlQuery.addGroupBy(expr, alias);
}
// Add ORDER BY clause to make the results deterministic.
// Derby has a bug with ORDER BY, so ignore it.
if (isOrdered()) {
sqlQuery.addOrderBy(expr, true, false, false);
}
}
// Add compound member predicates
extraPredicates(sqlQuery);
// add measures
if (!countOnly) {
for (int i = 0, count = getMeasureCount(); i < count; i++) {
addMeasure(i, sqlQuery);
}
}
}
示例7: MondrianTable
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public MondrianTable(MondrianTable parent, RolapStar.Table table) {
this.parent = parent;
this.table = table;
}
示例8: getStarTable
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public RolapStar.Table getStarTable() {
return table;
}