www.element4solution.com

e4s.db
Class E4DBSettings

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.util.E4Settings
          extended by e4s.db.E4DBSettings

public class E4DBSettings
extends E4Settings

System parameter definition for database functionality. Contains source path of the data dictionary (where the generated java files to be stored), path where the XML metadata information can be found, JDBC driver and connection string.

Since:
JDK 1.4

Nested Class Summary
 
Nested classes/interfaces inherited from class e4s.util.E4Settings
E4Settings.DATATYPE_DEF
 
Field Summary
static java.lang.String DICT_CHECK_CONSISTENCY
           
static java.lang.String DICT_CHECK_CONSISTENCY_CORRECTION_TABLES
           
static java.lang.String DICT_CHECK_CONSISTENCY_CORRECTION_TABLES_IDX
           
static java.lang.String DICT_CHECK_CONSISTENCY_EXCEPTION
           
static java.lang.String DICT_CHECK_CONSISTENCY_NONE
           
static java.lang.String DICT_COPYRIGHT
           
static java.lang.String DICT_DEFINITION_PATH
           
static java.lang.String DICT_NEW_ROWS
           
static java.lang.String DICT_PLUGINS
           
static java.lang.String DICT_SOURCE_PATH
           
static java.lang.String DICT_SQL_PASSWORD
           
static java.lang.String DICT_SYSTEM_MODE
           
static java.lang.String JDBC_CONNECTION
           
static java.lang.String JDBC_CONNECTION_POOL
           
static java.lang.String JDBC_DBTYPE
           
static java.lang.String JDBC_DRIVER
           
static java.lang.String JDBC_LOG
           
static java.lang.String LOGGING_MODE
           
static java.lang.String LOGGING_PATH
           
static java.lang.String MONITOR_ENABLED
           
static java.lang.String PACKAGE
           
 
Fields inherited from class e4s.util.E4Settings
_DATATYPE_BOOLEAN, _DATATYPE_NUMBER, _DATATYPE_PASSWORD, _DATATYPE_SELECTION, _DATATYPE_STRING, INCLUDE_CHAR, SERVLET_WEB_XML_PARAMETER_PROPERTIES
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
E4DBSettings()
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
static boolean consistencyCheckCorrectionIndexes()
           
static boolean consistencyCheckCorrectionTables()
           
static boolean consistencyCheckException()
           
static void defineDatatypes()
           
static java.lang.String getCopyright()
          Get the copyright remark for the Java class generation.
static int getDatabaseType()
          Get the database type.
static java.lang.String getDictDefinitionPath()
          Get the XML definition path.
static int getDictNewRows()
          Get the number of blank rows added while editing existing tables.
static java.lang.String getDictPackage()
          Get the package for generation of Java source files for database access.
static java.lang.String getDictSourcePath()
          Get the path for generating Java source files for database access.
static java.lang.String getDictSQLPassword()
          The SQL module requires an additional password.
static boolean getDictSystemMode()
          The system mode indicates, that data dictionary editing is valid for the e4s core development.
static java.lang.String getJdbcConnection()
          Get the JDBC connection string.
static java.lang.String getJdbcConnection(boolean exc_not_found)
          Get the JDBC connection string.
static int getJdbcConnectionPoolSize()
           
static java.lang.String getJdbcDriver()
          Get the JDBC driver.
static java.lang.String getJdbcDriver(boolean exc_not_found)
          Get the JDBC driver.
static java.lang.String getJdbcLogfile()
          Get the path for JDBC SQL logging.
static java.lang.String getLoggingMode()
          Get the mode for SQL logging.
static java.lang.String getLoggingPath()
          Get the path for SQL logging.
static boolean getMonitorEnabled()
          Get the status of the SQL Monitor.
static java.lang.String getPluginDefinitions()
          Get a string (comma seperated list of class names) of dictionary plugins defined by DICT_PLUGINS.
static boolean getPoolingEnabled(java.lang.String driver_name)
          Get the JDBC connection mode.
static void setJdbcLogfile(java.lang.String file)
          Get the path for JDBC SQL logging.
static void setMonitorEnabled(boolean enabled)
           
static void validate(HTML html)
           
 
Methods inherited from class e4s.util.E4Settings
defineDatatype, defineDatatype, defineDatatype, defineDatatype, defineDatatype, defineDatatype, definePropertyFile, getAppCoreLanguage, getDatatype, getDefaultAlias, getDocBase, getErrorMailto, getForceUploadLowercase, getHtmlStrict, getHttpAddr, getHttpRoot, getLoginPath, getMaxUploadSize, getMenuStyle, getPredefinedKeys, getProperties, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyBool, getPropertyFile, getPropertyInt, getPropertyLong, getServer, getSysLogFilePath, getSysTempPath, getSysTraceLogPath, preventBackButton, preventRightClick, propertyNames, readIniFile, reloadFile, removeProperty, setHttpAddr, setProperty, setProperty, setProperty
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, toString, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DICT_SOURCE_PATH

public static final java.lang.String DICT_SOURCE_PATH
See Also:
Constant Field Values

DICT_DEFINITION_PATH

public static final java.lang.String DICT_DEFINITION_PATH
See Also:
Constant Field Values

PACKAGE

public static final java.lang.String PACKAGE
See Also:
Constant Field Values

DICT_PLUGINS

public static final java.lang.String DICT_PLUGINS
See Also:
Constant Field Values

DICT_NEW_ROWS

public static final java.lang.String DICT_NEW_ROWS
See Also:
Constant Field Values

JDBC_LOG

public static final java.lang.String JDBC_LOG
See Also:
Constant Field Values

JDBC_DRIVER

public static final java.lang.String JDBC_DRIVER
See Also:
Constant Field Values

JDBC_CONNECTION

public static final java.lang.String JDBC_CONNECTION
See Also:
Constant Field Values

JDBC_CONNECTION_POOL

public static final java.lang.String JDBC_CONNECTION_POOL
See Also:
Constant Field Values

JDBC_DBTYPE

public static final java.lang.String JDBC_DBTYPE
See Also:
Constant Field Values

LOGGING_PATH

public static final java.lang.String LOGGING_PATH
See Also:
Constant Field Values

LOGGING_MODE

public static final java.lang.String LOGGING_MODE
See Also:
Constant Field Values

DICT_SYSTEM_MODE

public static final java.lang.String DICT_SYSTEM_MODE
See Also:
Constant Field Values

DICT_SQL_PASSWORD

public static final java.lang.String DICT_SQL_PASSWORD
See Also:
Constant Field Values

MONITOR_ENABLED

public static final java.lang.String MONITOR_ENABLED
See Also:
Constant Field Values

DICT_CHECK_CONSISTENCY

public static final java.lang.String DICT_CHECK_CONSISTENCY
See Also:
Constant Field Values

DICT_CHECK_CONSISTENCY_EXCEPTION

public static final java.lang.String DICT_CHECK_CONSISTENCY_EXCEPTION
See Also:
Constant Field Values

DICT_CHECK_CONSISTENCY_CORRECTION_TABLES

public static final java.lang.String DICT_CHECK_CONSISTENCY_CORRECTION_TABLES
See Also:
Constant Field Values

DICT_CHECK_CONSISTENCY_CORRECTION_TABLES_IDX

public static final java.lang.String DICT_CHECK_CONSISTENCY_CORRECTION_TABLES_IDX
See Also:
Constant Field Values

DICT_CHECK_CONSISTENCY_NONE

public static final java.lang.String DICT_CHECK_CONSISTENCY_NONE
See Also:
Constant Field Values

DICT_COPYRIGHT

public static final java.lang.String DICT_COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

E4DBSettings

public E4DBSettings()
Method Detail

getDictSourcePath

public static java.lang.String getDictSourcePath()
Get the path for generating Java source files for database access. This value might be equal, not necessary, to the XML definition path.

Returns:
the source path, e.g. "c:\mysource\tabledef\".
See Also:
getDictDefinitionPath()

getLoggingPath

public static java.lang.String getLoggingPath()
Get the path for SQL logging.

Returns:
the path for the SQL logfiles
See Also:
getLoggingMode(), LOGGING_PATH

getCopyright

public static java.lang.String getCopyright()
Get the copyright remark for the Java class generation.

Returns:
the copyright string
See Also:
DICT_COPYRIGHT

getJdbcLogfile

public static java.lang.String getJdbcLogfile()
Get the path for JDBC SQL logging.

Returns:
the file for the JDBC SQL logfiles
See Also:
JDBC_LOG

setJdbcLogfile

public static void setJdbcLogfile(java.lang.String file)
Get the path for JDBC SQL logging.

Parameters:
file - define the JDBC logfile
See Also:
JDBC_LOG

getLoggingMode

public static java.lang.String getLoggingMode()
Get the mode for SQL logging.

Returns:
the mode for the SQL logfiles. This is a String, if it contains 'R' then reading SQL statements are logged, if it contains an 'W' then writing SQL statements are logged.
See Also:
getLoggingPath(), LOGGING_MODE

getMonitorEnabled

public static boolean getMonitorEnabled()
Get the status of the SQL Monitor.

Returns:
true means enabled
See Also:
MONITOR_ENABLED, setMonitorEnabled(boolean), e4s.db.E4DBConnectionDefault#enableMONITOR, e4s.db.E4DBConnectionDefault#getMONITOR, E4ModuleSystem.sqlMonitor

setMonitorEnabled

public static void setMonitorEnabled(boolean enabled)

getPoolingEnabled

public static boolean getPoolingEnabled(java.lang.String driver_name)
Get the JDBC connection mode.

Returns:
true means pooling, false means no-pooling
See Also:
E4DBConnectionDefault.connectionIsPooled()

getJdbcDriver

public static java.lang.String getJdbcDriver(boolean exc_not_found)
                                      throws java.lang.Exception
Get the JDBC driver.

Parameters:
exc_not_found - throw an exception if not found
Returns:
the JDBC driver name as string, e.g. "com.inet.pool.PoolDriver"
Throws:
java.lang.Exception
See Also:
getJdbcConnection(), E4DBConnection_Intf

getJdbcDriver

public static java.lang.String getJdbcDriver()
Get the JDBC driver.

Returns:
the JDBC driver name as string, e.g. "com.inet.pool.PoolDriver"
See Also:
getJdbcConnection(), E4DBConnection_Intf

getJdbcConnection

public static java.lang.String getJdbcConnection(boolean exc_not_found)
                                          throws java.lang.Exception
Get the JDBC connection string.

Parameters:
exc_not_found - throw an exception if not found
Returns:
the JDBC connection string, e.g. "jdbc:inetdae7:localhost:1433?database=.."
Throws:
java.lang.Exception
See Also:
getJdbcDriver(), E4DBConnection_Intf

getJdbcConnection

public static java.lang.String getJdbcConnection()
Get the JDBC connection string.

Returns:
the JDBC connection string, e.g. "jdbc:inetdae7:localhost:1433?database=.."
See Also:
getJdbcDriver(), E4DBConnection_Intf

getDictSystemMode

public static boolean getDictSystemMode()
The system mode indicates, that data dictionary editing is valid for the e4s core development. It is recommended, to set this value to false (0)!

See Also:
DICT_SYSTEM_MODE

getDictSQLPassword

public static java.lang.String getDictSQLPassword()
The SQL module requires an additional password.

See Also:
DICT_SQL_PASSWORD

getDictPackage

public static java.lang.String getDictPackage()
Get the package for generation of Java source files for database access.

Returns:
the package, e.g. "tabledef".
See Also:
E4DBGeneratedClass.getPackage(boolean), E4DBGeneratedClass.getPackage(boolean)

getDatabaseType

public static int getDatabaseType()
                           throws java.lang.Exception
Get the database type.

Returns:
E4DBConnectionDefault._DB_TYPE_SQL_SERVER or simliar.
Throws:
java.lang.Exception
See Also:
E4DBConnectionDefault.setDatabaseType(int), E4DBConnectionDefault.getDatabaseType(), E4ModuleEditingHandling02.getConnection()

getDictNewRows

public static int getDictNewRows()
Get the number of blank rows added while editing existing tables.

Returns:
the number of rows, a value between 1 and 20
See Also:
DICT_NEW_ROWS

getDictDefinitionPath

public static java.lang.String getDictDefinitionPath()
Get the XML definition path.

Returns:
the XML definition path, e.g. "c:\mysource\tabledef\".

consistencyCheckException

public static boolean consistencyCheckException()

consistencyCheckCorrectionTables

public static boolean consistencyCheckCorrectionTables()

consistencyCheckCorrectionIndexes

public static boolean consistencyCheckCorrectionIndexes()

validate

public static void validate(HTML html)

defineDatatypes

public static void defineDatatypes()

getPluginDefinitions

public static java.lang.String getPluginDefinitions()
Get a string (comma seperated list of class names) of dictionary plugins defined by DICT_PLUGINS.

See Also:
AEP_DictionaryPlugIn

getJdbcConnectionPoolSize

public static int getJdbcConnectionPoolSize()

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com