public class SaffronProperties extends Properties
getIntProperty(java.lang.String) and getBooleanProperty(java.lang.String) are convenience
methods.
It is a singleton, accessed via the instance() method. It is
populated from System properties if saffron is invoked via a
main() method, from a javax.servlet.ServletContext if
saffron is invoked from a servlet, and so forth. If there is a file called
"saffron.properties" in the current directory, it is read too.
Every property used in saffron code must have a member in this class. The
member must be public and final, and be of type
Property or some subtype. The javadoc
comment must describe the name of the property (for example,
"net.sf.saffron.connection.PoolSize") and the default value, if any.
Developers, please make sure that this remains so!
| Modifier and Type | Field and Description |
|---|---|
org.eigenbase.util.property.BooleanProperty |
allowInfiniteCostConverters
The boolean property "saffron.opt.allowInfiniteCostConverters" determines
whether the optimizer will consider adding converters of infinite cost in
order to convert a relational expression from one calling convention to
another.
|
org.eigenbase.util.property.StringProperty |
defaultCharset
The string property "saffron.default.charset" is the name of the default
character set.
|
org.eigenbase.util.property.StringProperty |
defaultCollation
The string property "saffron.default.collation.name" is the name of the
default collation.
|
org.eigenbase.util.property.StringProperty |
defaultCollationStrength
The string property "saffron.default.collation.strength" is the strength
of the default collation.
|
org.eigenbase.util.property.StringProperty |
defaultNationalCharset
The string property "saffron.default.nationalcharset" is the name of the
default national character set which is used with the N'string' construct
which may or may not be different from the
defaultCharset. |
defaults| Modifier and Type | Method and Description |
|---|---|
boolean |
getBooleanProperty(String key)
Retrieves a boolean property.
|
boolean |
getBooleanProperty(String key,
boolean defaultValue)
Retrieves a boolean property, or a default value if the property does not
exist.
|
int |
getIntProperty(String key)
Retrieves an integer property.
|
static SaffronProperties |
instance()
Retrieves the singleton instance of
SaffronProperties. |
void |
loadSaffronProperties(Properties source)
Adds all saffron-related properties found in the source list.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamespublic final org.eigenbase.util.property.BooleanProperty allowInfiniteCostConverters
true.public final org.eigenbase.util.property.StringProperty defaultCharset
SqlValidator.public final org.eigenbase.util.property.StringProperty defaultNationalCharset
defaultCharset. The
default is "ISO-8859-1". It is used in
SqlLiteral.SqlLiteral(java.lang.Object, org.apache.calcite.sql.type.SqlTypeName, org.apache.calcite.sql.parser.SqlParserPos)public final org.eigenbase.util.property.StringProperty defaultCollation
SqlCollation and
SqlLiteral.SqlLiteral(java.lang.Object, org.apache.calcite.sql.type.SqlTypeName, org.apache.calcite.sql.parser.SqlParserPos)public final org.eigenbase.util.property.StringProperty defaultCollationStrength
SqlCollation and
SqlLiteral.SqlLiteral(java.lang.Object, org.apache.calcite.sql.type.SqlTypeName, org.apache.calcite.sql.parser.SqlParserPos)public static SaffronProperties instance()
SaffronProperties.public void loadSaffronProperties(Properties source)
source - a Properties listpublic boolean getBooleanProperty(String key)
true if the property
exists, and its value is 1, true or
yes; returns false otherwise.public boolean getBooleanProperty(String key, boolean defaultValue)
true if the property exists, and its value is
1, true or yes; the default value
if it does not exist; false otherwise.public int getIntProperty(String key)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.