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


Java Property类代码示例

本文整理汇总了Java中org.eigenbase.util.property.Property的典型用法代码示例。如果您正苦于以下问题:Java Property类的具体用法?Java Property怎么用?Java Property使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getParameter

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public Parameter getParameter(String name) {
    // Scan through schema parameters.
    for (RolapSchemaParameter parameter : schema.parameterList) {
        if (Util.equalName(parameter.getName(), name)) {
            return parameter;
        }
    }

    // Scan through mondrian properties.
    List<Property> propertyList =
        MondrianProperties.instance().getPropertyList();
    for (Property property : propertyList) {
        if (property.getPath().equals(name)) {
            return new SystemPropertyParameter(name, false);
        }
    }

    return null;
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:20,代码来源:RolapSchemaReader.java

示例2: getParameter

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public Parameter getParameter(String name) {
    // Scan through schema parameters.
    for (RolapSchemaParameter parameter : schema.parameterList) {
        if (Util.equalName(parameter.getName(), name)) {
            return parameter;
        }
    }

    // Scan through mondrian and system properties.
    List<Property> propertyList =
        MondrianProperties.instance().getPropertyList();
    for (Property property : propertyList) {
        if (property.getPath().equals(name)) {
            return new SystemPropertyParameter(name, false);
        }
    }
    if (System.getProperty(name) != null) {
        return new SystemPropertyParameter(name, true);
    }

    return null;
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:23,代码来源:RolapSchemaReader.java

示例3: execute

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public void execute(Property property, String value) {
    disableCaching = property.booleanValue();
    // must flush all caches
    if (disableCaching) {
        // REVIEW: could replace following code with call to
        // CacheControl.flush(CellRegion)
        for (Iterator<RolapSchema> itSchemas =
            RolapSchema.getRolapSchemas();
             itSchemas.hasNext();)
        {
            RolapSchema schema1 = itSchemas.next();
            for (RolapStar star : schema1.getStars()) {
                star.clearCachedAggregations(true);
            }
        }
    }
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:18,代码来源:RolapStar.java

示例4: getPropertyValue

import org.eigenbase.util.property.Property; //导入依赖的package包/类
/**
 * Returns the value of a property, or null if it is not set.
 */
private static String getPropertyValue(String propertyName) {
    final Property property = PropertyInfo.lookupProperty(
        MondrianProperties.instance(),
        propertyName);
    return property.isSet()
        ? property.getString()
        : null;
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:12,代码来源:CmdRunner.java

示例5: setProperty

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public static boolean setProperty(String name, String value) {
    final Property property = PropertyInfo.lookupProperty(
        MondrianProperties.instance(),
        name);
    String oldValue = property.getString();
    if (! Util.equals(oldValue, value)) {
        property.setString(value);
        return true;
    } else {
        return false;
    }
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:13,代码来源:CmdRunner.java

示例6: execute

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public void execute(Property property, String value) {
    synchronized (DefaultRules.class) {
        DefaultRules oldInstance = DefaultRules.instance;
        DefaultRules.instance = null;

        DefaultRules newInstance = null;
        Exception ex = null;
        try {
            newInstance = DefaultRules.getInstance();
        } catch (Exception e) {
            ex = e;
        }
        if (ex != null) {
            DefaultRules.instance = oldInstance;

            throw new Trigger.VetoRT(ex);

        } else if (newInstance == null) {
            DefaultRules.instance = oldInstance;

            String msg =
                mres.FailedCreateNewDefaultAggregateRules.str(
                    property.getPath(),
                    value);
            throw new Trigger.VetoRT(msg);

        } else {
            instance = newInstance;
        }
    }
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:32,代码来源:DefaultRules.java

示例7: testSystemPropsGet

import org.eigenbase.util.property.Property; //导入依赖的package包/类
/**
 * Tests accessing system properties as parameters in a statement.
 */
public void testSystemPropsGet() {
    final List<Property> propertyList =
        MondrianProperties.instance().getPropertyList();
    for (Property property : propertyList) {
        assertExprReturns(
            "ParamRef("
            + Util.singleQuoteString(property.getPath())
            + ")",
            property.stringValue());
    }
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:15,代码来源:ParameterTest.java

示例8: testSystemPropsSet

import org.eigenbase.util.property.Property; //导入依赖的package包/类
/**
 * Tests setting system properties.
 */
public void testSystemPropsSet() {
    final List<Property> propertyList =
        MondrianProperties.instance().getPropertyList();
    for (Property property : propertyList) {
        final String propName = property.getPath();
        assertSetPropertyFails(propName, "System");
    }
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:12,代码来源:ParameterTest.java

示例9: execute

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public void execute( Runnable runnable ) {
  Map<Property, String> oldValues = set( properties );
  try {
    runnable.run();
  } finally {
    set( oldValues );
  }
}
 
开发者ID:pentaho,项目名称:mondrian-tck,代码行数:9,代码来源:PropertyContext.java

示例10: set

import org.eigenbase.util.property.Property; //导入依赖的package包/类
private Map<Property, String> set( final Map<Property, String> newValues ) {
  Map<Property, String> oldValues = new HashMap<>();
  for ( Property property : newValues.keySet() ) {
    oldValues.put( property, property.getString() );
    property.setString( newValues.get( property ) );
  }
  return oldValues;
}
 
开发者ID:pentaho,项目名称:mondrian-tck,代码行数:9,代码来源:PropertyContext.java

示例11: setProperty

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public static boolean setProperty(String name, String value) {
    final Property property = PropertyInfo.lookupProperty(
            MondrianProperties.instance(),
            name);
    String oldValue = property.getString();
    if (! Util.equals(oldValue, value)) {
        property.setString(value);
        return true;
    } else {
        return false;
    }
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:13,代码来源:CmdRunner.java

示例12: testSystemPropsGet

import org.eigenbase.util.property.Property; //导入依赖的package包/类
/**
 * Tests accessing system properties as parameters in a statement.
 */
public void testSystemPropsGet() {
    for (Property property
        : MondrianProperties.instance().getPropertyList())
    {
        assertExprReturns(
            "ParamRef("
            + Util.singleQuoteString(property.getPath())
            + ")",
            property.stringValue());
    }
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:15,代码来源:ParameterTest.java

示例13: testSystemPropsSet

import org.eigenbase.util.property.Property; //导入依赖的package包/类
/**
 * Tests setting system properties.
 */
public void testSystemPropsSet() {
    for (Property property
        : MondrianProperties.instance().getPropertyList())
    {
        final String propName = property.getPath();
        assertSetPropertyFails(propName, "System");
    }
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:12,代码来源:ParameterTest.java

示例14: isProperty

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public static boolean isProperty(String propertyName) {
    final Property property = PropertyInfo.lookupProperty(
        MondrianProperties.instance(),
        propertyName);
    return property != null;
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:7,代码来源:CmdRunner.java

示例15: getProperty

import org.eigenbase.util.property.Property; //导入依赖的package包/类
public Property getProperty(int i) {
    return propertyList.get(i);
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:4,代码来源:CmdRunner.java


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