/** * Creates the AggregationManager. */ public AggregationManager(MondrianServer server) { if (properties.EnableCacheHitCounters.get()) { LOGGER.error( "Property " + properties.EnableCacheHitCounters.getPath() + " is obsolete; ignored."); } this.cacheMgr = new SegmentCacheManager(server); }
/** * Returns whether the use of a <code>MemoryMonitor</code> is enabled. * * @return <code>true</code> if enabled and <code>false</code> otherwise. */ protected boolean enabled() { return MondrianProperties.instance().MemoryMonitor.get(); }
/** * Creates a SqlQuery using a given dialect and inheriting the formatting * preferences from {@link MondrianProperties#GenerateFormattedSql} * property. * * @param dialect Dialect */ public SqlQuery(Dialect dialect) { this( dialect, MondrianProperties.instance().GenerateFormattedSql.get()); }
/** * Generates a normalized form of a name, for use as a key into a map. * Returns the upper case name if * {@link MondrianProperties#CaseSensitive} is true, the name unchanged * otherwise. */ public static String normalizeName(String s) { return MondrianProperties.instance().CaseSensitive.get() ? s : s.toUpperCase(); }
/** * Compares two names. * Takes into account the {@link MondrianProperties#CaseSensitive case * sensitive option}. * Names must not be null. */ public static int compareName(String s, String t) { boolean caseSensitive = MondrianProperties.instance().CaseSensitive.get(); return caseSensitive ? s.compareTo(t) : s.compareToIgnoreCase(t); }
boolean isCacheDisabled() { return MondrianProperties.instance().DisableCaching.get(); }
/** * Returns whether two names are equal. * Takes into account the * {@link MondrianProperties#CaseSensitive case sensitive option}. * Names may be null. */ public static boolean equalName(String s, String t) { if (s == null) { return t == null; } boolean caseSensitive = MondrianProperties.instance().CaseSensitive.get(); return caseSensitive ? s.equals(t) : s.equalsIgnoreCase(t); }
private boolean shouldExpandNonEmpty(Exp exp) { return MondrianProperties.instance().ExpandNonNative.get() // && !MondrianProperties.instance().EnableNativeCrossJoin.get() || isCheapSet(exp); }
public boolean put(SegmentHeader header, SegmentBody body) { if (MondrianProperties.instance().DisableCaching.get()) { return true; } for (SegmentCacheWorker worker : workers) { worker.put(header, body); } return true; }
public RolapNativeTopCount() { super.setEnabled( MondrianProperties.instance().EnableNativeTopCount.get()); }
final boolean shouldUseGroupingFunction() { return MondrianProperties.instance().EnableGroupingSets.get() && dialect.supportsGroupingSets(); }
public RolapNativeCrossJoin() { super.setEnabled( MondrianProperties.instance().EnableNativeCrossJoin.get()); }
/** * Returns whether to avoid a test because the memory monitor may cause it * to fail. * * <p>Some tests fail if memory monitor is switched on, and Access and * Derby tend to use a lot of memory because they are embedded. * * @param dialect Dialect * @return Whether to avoid a test */ public static boolean avoidMemoryOverflow(Dialect dialect) { return dialect.getDatabaseProduct() == Dialect.DatabaseProduct.ACCESS && MondrianProperties.instance().MemoryMonitor.get(); }
public boolean mightReturnNullForUnrelatedDimension() { if (!MondrianProperties.instance() .IgnoreMeasureForNonJoiningDimension.get()) { return false; } RolapCube virtualCube = getCube(); return virtualCube.isVirtual(); }
private static String getHierarchyName(Hierarchy hierarchy) { String hierarchyName = hierarchy.getName(); if (MondrianProperties.instance().SsasCompatibleNaming.get() && !hierarchyName.equals(hierarchy.getDimension().getName())) { hierarchyName = hierarchy.getDimension().getName() + "." + hierarchyName; } return hierarchyName; }
/** * Initializes this object, loading all aggregate tables and associating * them with {@link RolapStar}s. * This method should only be called once. */ public void initialize() { if (MondrianProperties.instance().UseAggregates.get()) { try { loadRolapStarAggregates(); } catch (SQLException ex) { throw mres.AggLoadingError.ex(ex); } } printResults(); }
/** * Returns a measure of the IO cost of querying this table. It can be * either the row count or the row count times the size of a row. * If the property {@link MondrianProperties#ChooseAggregateByVolume} * is true, then volume is returned, otherwise row count. */ public long getSize() { return MondrianProperties.instance().ChooseAggregateByVolume.get() ? getFactTable().getVolume() : getFactTable().getNumberOfRows(); }
static Object properties(Member member, String s) { boolean matchCase = MondrianProperties.instance().CaseSensitive.get(); Object o = member.getPropertyValue(s, matchCase); if (o == null) { if (!Util.isValidProperty(s, member.getLevel())) { throw new MondrianEvaluationException( "Property '" + s + "' is not valid for member '" + member + "'"); } } return o; }
SqlMemberSource(RolapHierarchy hierarchy) { this.hierarchy = hierarchy; this.dataSource = hierarchy.getRolapSchema().getInternalConnection().getDataSource(); assignOrderKeys = MondrianProperties.instance().CompareSiblingsByOrderKey.get(); valuePool = ValuePoolFactoryFactory.getValuePoolFactory().create(this); }
private static Id hierarchyId(Level level) { Id id = new Id(q(level.getDimension().getName())); if (MondrianProperties.instance().SsasCompatibleNaming.get()) { id = id.append(q(level.getHierarchy().getName())); } return id; }