本文整理汇总了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;
}
示例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;
}
示例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);
}
}
}
}
示例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;
}
示例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;
}
}
示例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;
}
}
}
示例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());
}
}
示例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");
}
}
示例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 );
}
}
示例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;
}
示例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;
}
}
示例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());
}
}
示例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");
}
}
示例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;
}
示例15: getProperty
import org.eigenbase.util.property.Property; //导入依赖的package包/类
public Property getProperty(int i) {
return propertyList.get(i);
}