org.rimudb.configuration
Class DatabaseConfiguration

java.lang.Object
  extended by org.rimudb.configuration.DatabaseConfiguration

public class DatabaseConfiguration
extends java.lang.Object


Field Summary
static int BATCH_DELETE
           
static int BATCH_INSERT
           
static int LOG_NONE
           
static int LOG_SQL_ONLY
           
static int LOG_STATISTICS
           
 
Constructor Summary
DatabaseConfiguration()
           
 
Method Summary
 void addCacheSize(java.lang.String className, int size)
           
 DatabaseConfiguration copy()
           
 int getCacheSize(java.lang.String className)
           
 java.lang.String getConfigurationFilename()
           
 java.lang.String getDatabaseHost()
          Return the host name from the JDBC URL if one is present.
 java.lang.String getDatabaseID()
           
 java.lang.String getGroup()
           
 java.lang.String getJdbcSubProtocol()
          Return the JDBC sub-protocol.
 int getLoggingThreshold()
           
 int getLoggingType()
          Return the logging type.
 IPoolConfiguration getPoolConfiguration()
           
 int getResolveTableNameFrequency()
           
 TableConfiguration getTableConfiguration(java.lang.Class<? extends DataObject> dataObjectClass)
           
 TableConfiguration[] getTableConfigurations()
           
 boolean isVerifyingColumnLength()
           
 void setConfigurationFilename(java.lang.String configurationFilename)
           
 void setDatabaseID(java.lang.String databaseID)
           
 void setGroup(java.lang.String group)
           
 void setLoggingThreshold(int loggingThreshold)
           
 void setLoggingType(int loggingType)
           
 void setPoolConfiguration(IPoolConfiguration poolConfiguration)
           
 void setResolveTableNameFrequency(int resolveTableNameFrequency)
           
 void setTableConfigurations(TableConfiguration[] tableConfigurations)
           
 void setVerifyingColumnLength(boolean verifyingColumnLength)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BATCH_INSERT

public static final int BATCH_INSERT
See Also:
Constant Field Values

BATCH_DELETE

public static final int BATCH_DELETE
See Also:
Constant Field Values

LOG_NONE

public static final int LOG_NONE
See Also:
Constant Field Values

LOG_SQL_ONLY

public static final int LOG_SQL_ONLY
See Also:
Constant Field Values

LOG_STATISTICS

public static final int LOG_STATISTICS
See Also:
Constant Field Values
Constructor Detail

DatabaseConfiguration

public DatabaseConfiguration()
Method Detail

getGroup

public java.lang.String getGroup()

setGroup

public void setGroup(java.lang.String group)

addCacheSize

public void addCacheSize(java.lang.String className,
                         int size)

getCacheSize

public int getCacheSize(java.lang.String className)

setDatabaseID

public void setDatabaseID(java.lang.String databaseID)

getDatabaseID

public java.lang.String getDatabaseID()

setTableConfigurations

public void setTableConfigurations(TableConfiguration[] tableConfigurations)

getTableConfigurations

public TableConfiguration[] getTableConfigurations()

getTableConfiguration

public TableConfiguration getTableConfiguration(java.lang.Class<? extends DataObject> dataObjectClass)

setLoggingType

public void setLoggingType(int loggingType)
Parameters:
loggingType - the loggingType to set. This value can be any of the following: LOG_NONE, LOG_SQL_ONLY, LOG_STATISTICS.

getLoggingType

public int getLoggingType()
Return the logging type. This value can be any of the following: LOG_NONE, LOG_SQL_ONLY, LOG_STATISTICS.

Returns:
the loggingType

setLoggingThreshold

public void setLoggingThreshold(int loggingThreshold)
Parameters:
loggingThreshold - the loggingThreshold to set

getLoggingThreshold

public int getLoggingThreshold()
Returns:
the loggingThreshold

setResolveTableNameFrequency

public void setResolveTableNameFrequency(int resolveTableNameFrequency)
Parameters:
resolveTableNameFrequency - the resolveTableNameFrequency to set

getResolveTableNameFrequency

public int getResolveTableNameFrequency()
Returns:
the resolveTableNameFrequency

copy

public DatabaseConfiguration copy()

setVerifyingColumnLength

public void setVerifyingColumnLength(boolean verifyingColumnLength)
Parameters:
verifyingColumnLength - the verifyingColumnLength to set

isVerifyingColumnLength

public boolean isVerifyingColumnLength()
Returns:
the verifyingColumnLength

getPoolConfiguration

public IPoolConfiguration getPoolConfiguration()

setPoolConfiguration

public void setPoolConfiguration(IPoolConfiguration poolConfiguration)

setConfigurationFilename

public void setConfigurationFilename(java.lang.String configurationFilename)

getConfigurationFilename

public java.lang.String getConfigurationFilename()

getDatabaseHost

public java.lang.String getDatabaseHost()
                                 throws java.net.URISyntaxException
Return the host name from the JDBC URL if one is present.

Returns:
The host name
Throws:
java.net.URISyntaxException

getJdbcSubProtocol

public java.lang.String getJdbcSubProtocol()
Return the JDBC sub-protocol. i.e. in the URL 'jdbc:mysql://localhost/dbname' the value 'mysql:' is returned.

Returns:
The sub-protocol


Copyright © 2008-2011 Simon Ritchie. All Rights Reserved.