public class DatabaseConfig
extends java.lang.Object
implements java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
private long |
deactivateIfNotUsedSec
Deactivate period for non-permanent db in seconds, -1 means 'never'
|
private Settings |
ormSettings
Hibernate configuration properties
|
private java.lang.String |
schema
Database schema name
|
private boolean |
useJavaUDFs
Flag indicating that Java UDFs should be used
|
Constructor and Description |
---|
DatabaseConfig()
Default constructor
|
DatabaseConfig(Settings ormSettings,
java.lang.String schema)
Constructor which stores ORM settings and schema name.
|
DatabaseConfig(Settings ormSettings,
java.lang.String schema,
long deactivateIfNotUsedSec,
boolean useJavaUDFs)
Constructor which stores ORM settings and schema name.
|
Modifier and Type | Method and Description |
---|---|
long |
getDeactivateIfNotUsedSec()
Get deactivate period in seconds.
|
Settings |
getOrmSettings()
Get the properties needed by Hibernate to create a session factory.
|
java.lang.String |
getSchema()
Get the database schema name.
|
boolean |
isUseJavaUDFs()
Check if Java UDFs should be used.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
private Settings ormSettings
private java.lang.String schema
private long deactivateIfNotUsedSec
private boolean useJavaUDFs
public DatabaseConfig()
public DatabaseConfig(Settings ormSettings, java.lang.String schema, long deactivateIfNotUsedSec, boolean useJavaUDFs)
ormSettings
- ORM configuration settings.schema
- Schema name.deactivateIfNotUsedSec
- Deactivate period for database.useJavaUDFs
- Flag indicating that Java UDFs should be usedpublic DatabaseConfig(Settings ormSettings, java.lang.String schema)
ormSettings
- ORM configuration settings.schema
- Schema name.public long getDeactivateIfNotUsedSec()
public boolean isUseJavaUDFs()
true
if Java UDFs should be used.public Settings getOrmSettings()
public java.lang.String getSchema()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- Input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If payload can't be instantiated.