|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary<K,V> java.util.Hashtable<Object,Object> java.util.Properties org.eigenbase.util.SaffronProperties
public class SaffronProperties
Provides an environment for debugging information, et cetera, used by saffron.
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!
Field Summary | |
---|---|
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. |
StringProperty |
classDir
The string property "saffron.class.dir" is the path of the directory to compile classes to. |
IntegerProperty |
debugLevel
The integer property "saffron.debug.level" determines how much debugging information is printed. |
StringProperty |
debugOut
The string property "saffron.debug.out" is the name of the file to send debugging information to. |
StringProperty |
defaultCharset
The string property "saffron.default.charset" is the name of the default character set. |
StringProperty |
defaultCollation
The string property "saffron.default.collation.name" is the name of the default collation. |
StringProperty |
defaultCollationStrength
The string property "saffron.default.collation.strength" is the strength of the default collation. |
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 . |
BooleanProperty |
generateCalcProgramComments
The boolean property "saffron.calc.comments.generate" determines if to generate comments in calculator programs in order to make debugging easier. |
StringProperty |
javaCompilerArgs
The string property "saffron.java.compiler.args" is the argument string for the java compiler . |
StringProperty |
javaCompilerClass
The string property "saffron.java.compiler.class" is the name of the Java compiler to use. |
StringProperty |
javaDir
The string property "saffron.java.dir" is the directory to generate temporary java files to. |
StringProperty |
packageName
The string property "saffron.package.name" is the package in which to include temporary classes. |
BooleanProperty |
printBeforeCompile
The boolean property "saffron.Statement.printBeforeCompile" controls whether Statement prints the statement before
compiling it. |
private static SaffronProperties |
properties
The singleton properties object. |
BooleanProperty |
stupid
The boolean property "saffron.stupid" determines whether to optimize variable assignments. |
StringProperty |
testClass
The string property "saffron.test.Class" is used by FarragoTestCase to filter tests. |
BooleanProperty |
testEverything
The string property "saffron.test.everything" is used by FarragoTestCase to filter tests. |
StringProperty |
testJdbcDrivers
The string property "saffron.test.jdbc.drivers" is a comma-separated list of class names to be used as JDBC drivers. |
StringProperty |
testJdbcUrl
The string property "saffron.test.jdbc.url" is the URL of the JDBC database which contains the EMP and DEPT tables used for testing. |
StringProperty |
testName
The string property "saffron.test.Name" is used by FarragoTestCase to filter tests. |
StringProperty |
testSuite
The string property "saffron.test.Suite" is used by FarragoTestCase to filter tests. |
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
private |
SaffronProperties()
This constructor is private; please use instance() to create a
SaffronProperties . |
Method Summary | |
---|---|
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. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static SaffronProperties properties
public final StringProperty classDir
public final BooleanProperty printBeforeCompile
Statement
prints the statement before
compiling it.
public final StringProperty javaCompilerClass
JavaCompiler
. The default value is
"JP.ac.tsukuba.openjava.SunJavaCompiler".
public final StringProperty packageName
public final StringProperty javaDir
the class root
.
public final StringProperty javaCompilerArgs
java compiler
. JavaCompilerArgs.setString(java.lang.String)
describes how these
arguments are interpreted.
public final BooleanProperty stupid
public final IntegerProperty debugLevel
public final StringProperty debugOut
"out"
(the default), means send to
System.out
; "err"
means send to System.err
.
public final StringProperty testName
FarragoTestCase
to filter tests.
public final StringProperty testClass
FarragoTestCase
to filter tests.
public final StringProperty testSuite
FarragoTestCase
to filter tests.
public final BooleanProperty testEverything
FarragoTestCase
to filter tests.
public final StringProperty testJdbcUrl
public final StringProperty testJdbcDrivers
public final BooleanProperty allowInfiniteCostConverters
true
.
public final StringProperty defaultCharset
SqlValidator
.
public final StringProperty defaultNationalCharset
defaultCharset
. The
default is "ISO-8859-1". It is used in SqlLiteral.SqlLiteral(java.lang.Object, org.eigenbase.sql.type.SqlTypeName, org.eigenbase.sql.parser.SqlParserPos)
public final StringProperty defaultCollation
SqlCollation
and SqlLiteral.SqlLiteral(java.lang.Object, org.eigenbase.sql.type.SqlTypeName, org.eigenbase.sql.parser.SqlParserPos)
public final StringProperty defaultCollationStrength
SqlCollation
and SqlLiteral.SqlLiteral(java.lang.Object, org.eigenbase.sql.type.SqlTypeName, org.eigenbase.sql.parser.SqlParserPos)
public final BooleanProperty generateCalcProgramComments
SqlCollation
and SqlLiteral.SqlLiteral(java.lang.Object, org.eigenbase.sql.type.SqlTypeName, org.eigenbase.sql.parser.SqlParserPos)
Constructor Detail |
---|
private SaffronProperties()
instance()
to create a
SaffronProperties
.
Method Detail |
---|
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |