Package org.eigenbase.util.property

Examples of org.eigenbase.util.property.StringProperty


     *
     * @return data source resolver
     */
    private static synchronized DataSourceResolver getDataSourceResolver() {
        if (dataSourceResolver == null) {
            final StringProperty property =
                MondrianProperties.instance().DataSourceResolverClass;
            final String className =
                property.get(
                    JndiDataSourceResolver.class.getName());
            try {
                final Class<?> clazz;
                clazz = Class.forName(className);
                if (!DataSourceResolver.class.isAssignableFrom(clazz)) {
                    throw Util.newInternal(
                        "Plugin class specified by property "
                        + property.getPath() + " must implement "
                        + DataSourceResolver.class.getName());
                }
                dataSourceResolver = (DataSourceResolver) clazz.newInstance();
            } catch (ClassNotFoundException e) {
                throw Util.newInternal(
View Full Code Here


        // No i18n for log message, but yes for excn
        String alertMsg =
            "Unable to use native SQL evaluation for '" + functionName
            + "'; reason:  " + reason;

        StringProperty alertProperty =
            MondrianProperties.instance().AlertNativeEvaluationUnsupported;
        String alertValue = alertProperty.get();

        if (alertValue.equalsIgnoreCase(
            org.apache.log4j.Level.WARN.toString()))
        {
            LOGGER.warn(alertMsg);
View Full Code Here

     * This method is allowed to return null.
     *
     * @return <code>null</code> or a class name
     */
    protected String getClassName(final Properties props) {
        final StringProperty stringProp = getStringProperty();
        final String className = stringProp.get();
        return (className != null)
                ? className
                : (props == null)
                    ? null : props.getProperty(stringProp.getPath());
    }
View Full Code Here

     *
     * @return data source resolver
     */
    private static synchronized DataSourceResolver getDataSourceResolver() {
        if (dataSourceResolver == null) {
            final StringProperty property =
                MondrianProperties.instance().DataSourceResolverClass;
            final String className =
                property.get(
                    JndiDataSourceResolver.class.getName());
            try {
                dataSourceResolver =
                    ClassResolver.INSTANCE.instantiateSafe(className);
            } catch (ClassCastException e) {
                throw Util.newInternal(
                    e,
                    "Plugin class specified by property "
                    + property.getPath()
                    + " must implement "
                    + DataSourceResolver.class.getName());
            }
        }
        return dataSourceResolver;
View Full Code Here

            // Hits same Infobright bug as NamedSetTest.testNamedSetOnMember.
            return;
        }
        final BooleanProperty enableProperty =
            MondrianProperties.instance().EnableNativeCrossJoin;
        final StringProperty alertProperty =
            MondrianProperties.instance().AlertNativeEvaluationUnsupported;
        if (!enableProperty.get()) {
            // When native cross joins are explicitly disabled, no alerts
            // are supposed to be raised.
            return;
View Full Code Here

        // No i18n for log message, but yes for excn
        String alertMsg =
            "Unable to use native SQL evaluation for '" + functionName
            + "'; reason:  " + reason;

        StringProperty alertProperty =
            MondrianProperties.instance().AlertNativeEvaluationUnsupported;
        String alertValue = alertProperty.get();

        if (alertValue.equalsIgnoreCase(
                org.apache.log4j.Level.WARN.toString()))
        {
            LOGGER.warn(alertMsg);
View Full Code Here

     * This method is allowed to return null.
     *
     * @return <code>null</code> or a class name
     */
    protected String getClassName(final Properties props) {
        final StringProperty stringProp = getStringProperty();
        final String className = stringProp.get();
        return (className != null)
            ? className
            : (props == null)
            ? null : props.getProperty(stringProp.getPath());
    }
View Full Code Here

            getTestContext().getDialect().getDatabaseProduct().name();
        final String dialectClassName =
            getTestContext().getDialect().getClass().getName();

        propSaver.set(
            new StringProperty(
                MondrianProperties.instance(),
                MondrianProperties.instance().StatisticsProviders.getPath()
                + "."
                + product,
                null),
View Full Code Here

TOP

Related Classes of org.eigenbase.util.property.StringProperty

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.