public class HSQLDatabase extends AbstractJDBCDatabase
JDBC.QueryExecutor, JDBC.TemplateSdxObject.ConfigurationNode| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
DATABASE_DIR_NAME |
protected java.lang.String |
dbDirPath |
protected HSQLDB |
hsqldb |
_searchModes, COLUMN_PARAM_INDEX_FIELD_ID, COLUMN_PARAM_INDEX_FIELD_PROPERTY_NAME, COLUMN_PARAM_INDEX_FIELD_PROPERTY_VALUE, FIELD_ID, FIELD_PROPERTY_NAME, FIELD_PROPERTY_VALUEATTRIBUTE_DSI, dbSelector, dsi_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitializedCLASS_NAME_SUFFIX, DATABASE_DIR_PATH, PACKAGE_QUALNAME, SEARCH_MODE_AND, SEARCH_MODE_NOT, SEARCH_MODE_ORDEFAULT_ENCODINGALL_SAVE_ATTRIB, PATH_ATTRIB, SAVE_DIRECTORY_PARAM| Constructor and Description |
|---|
HSQLDatabase() |
| Modifier and Type | Method and Description |
|---|---|
void |
backup(SaveParameters save_config)
Save the database
|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration) |
protected void |
finalize() |
protected java.lang.String |
getAlterTableNameQuery(java.lang.String oldName) |
DatabaseConnection |
getConnection() |
java.lang.String |
getDatabaseDirectoryName()
If the database is a directory based file system implemenation like lucene
this method should return a valid name for a directory which may be created to house
the database, or in the case of hsql it will return a valid table name
|
protected java.lang.String |
getEntriesWithLimitQuery(long offset,
long number)
Implementation of statement with a limit parameter
|
protected java.lang.String |
getOptimizeQuery() |
protected java.lang.String |
getTableCreationQuery()
Returns an SQL query that could create the table.
|
protected java.lang.String |
getTableName()
Returns a table name used to store the repository's data.
|
void |
init()
Initializes the database.
|
protected boolean |
initToSax()
Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML
|
protected void |
initVolatileObjectsToSax()
Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML
Some objects need to be refresh each time a toSAX is called
|
void |
optimize()
Utility method for database maintenance,
normally used to optimize indices of Lucene based repositories
It is the responsibility of the Repository to ensure that
unnecessary optimizations are not performed when this method
is called.
|
void |
releaseConnection(DatabaseConnection conn) |
void |
restore(SaveParameters save_config)
Restore the database
|
java.lang.String[] |
search(org.apache.avalon.framework.parameters.Parameters params,
int mode) |
addProperty, createIndicies, delete, delete, empty, entityExists, getAllEntitiesQuery, getClassNameSuffix, getCreateIndiciesQuery, getDeleteAllQuery, getEntities, getEntities, getEntity, getEntity, getEntityDeleteQuery, getEntityGetQuery, getEntityIds, getProperties, getPropertyAddQuery, getPropertyRemoveQueryWithId, getPropertyRemoveQueryWithoutId, getPropertyValue, getPropertyValues, getWildcardSearchToken, removeProperty, removeProperty, save, search, searchWithParams, size, updategetDataSourceComponent, releaseDataSourceComponent, servicecreateTable, handleUnsupportedTokensconfigureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResourcesclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId, setIdgetDescription, setDescriptiongetEncoding, setEncodinggetLocale, getXmlLang, setLocale, setXmlLangprotected java.lang.String dbDirPath
protected HSQLDB hsqldb
protected java.lang.String DATABASE_DIR_NAME
public java.lang.String getDatabaseDirectoryName()
Databasepublic void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractJDBCDatabaseorg.apache.avalon.framework.configuration.ConfigurationExceptionpublic DatabaseConnection getConnection() throws SDXException
getConnection in interface DatabasegetConnection in class AbstractJDBCDatabaseSDXExceptionpublic void releaseConnection(DatabaseConnection conn) throws SDXException
releaseConnection in interface DatabasereleaseConnection in class AbstractJDBCDatabaseSDXExceptionprotected java.lang.String getOptimizeQuery()
public void optimize()
throws SDXException
DatabaseSDXExceptionpublic void init()
throws SDXException
init in interface Databaseinit in class AbstractJDBCDatabaseSDXExceptionprotected java.lang.String getTableCreationQuery()
JDBCThis query should not have any parameter.
getTableCreationQuery in class AbstractJDBCDatabaseprotected java.lang.String getTableName()
JDBCgetTableName in class JDBCprotected java.lang.String getAlterTableNameQuery(java.lang.String oldName)
protected void finalize()
throws java.lang.Throwable
finalize in class DataSourceComponentBackedjava.lang.Throwablepublic java.lang.String[] search(org.apache.avalon.framework.parameters.Parameters params,
int mode)
throws SDXException
search in interface Databasesearch in class AbstractJDBCDatabaseSDXExceptionprotected boolean initToSax()
AbstractSdxObjectinitToSax in class AbstractSdxObjectprotected void initVolatileObjectsToSax()
initVolatileObjectsToSax in class JDBCpublic void backup(SaveParameters save_config) throws SDXException
backup in interface Saveablebackup in class AbstractJDBCDatabaseSDXExceptionSaveable.backup(fr.gouv.culture.sdx.utils.save.SaveParameters)protected java.lang.String getEntriesWithLimitQuery(long offset,
long number)
AbstractJDBCDatabasegetEntriesWithLimitQuery in class AbstractJDBCDatabaseHSQL implementation
SELECT LIMIT >offset< >number<
DISTINCT * FROM >table_name<);public void restore(SaveParameters save_config) throws SDXException
restore in interface Saveablerestore in class AbstractJDBCDatabaseSDXExceptionSaveable.restore(fr.gouv.culture.sdx.utils.save.SaveParameters)Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.