fr.gouv.culture.sdx.utils.database
Class POSTGRESQLDatabase
java.lang.Object
fr.gouv.culture.sdx.utils.AbstractSdxObject
fr.gouv.culture.sdx.utils.rdbms.JDBC
fr.gouv.culture.sdx.utils.rdbms.DataSourceComponentBacked
fr.gouv.culture.sdx.utils.database.AbstractJDBCDatabase
fr.gouv.culture.sdx.utils.database.JDBCDatabase
fr.gouv.culture.sdx.utils.database.POSTGRESQLDatabase
- All Implemented Interfaces:
- Database, Describable, Encodable, Identifiable, Localizable, Saveable, SdxObject, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.excalibur.xml.sax.XMLizable
public class POSTGRESQLDatabase
- extends JDBCDatabase
Created by gVim
User: Pierre Dittgen
Date: 2 nov 2004
Field Summary |
protected java.lang.String |
FIELD_KEY
|
Fields inherited from class fr.gouv.culture.sdx.utils.rdbms.JDBC |
tableName |
Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject |
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized |
Method Summary |
void |
backup(SaveParameters save_config)
Save the database |
protected java.lang.String |
getCreateIndiciesQuery(java.lang.String fieldName)
Overloaded from AbstractJDBCDatabase |
protected java.lang.String |
getEntriesWithLimitQuery(long offset,
long number)
Implementation of statement with a limit parameter |
protected java.lang.String |
getTableCreationQuery()
Returns an SQL query that could create the table. |
protected boolean |
initToSax()
Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML |
void |
restore(SaveParameters save_config)
Restore the database |
Methods inherited from class fr.gouv.culture.sdx.utils.database.AbstractJDBCDatabase |
addProperty, configure, createIndicies, delete, delete, empty, entityExists, getAllEntitiesQuery, getClassNameSuffix, getConnection, getDeleteAllQuery, getEntities, getEntities, getEntity, getEntity, getEntityDeleteQuery, getEntityGetQuery, getEntityIds, getProperties, getPropertyAddQuery, getPropertyRemoveQueryWithId, getPropertyRemoveQueryWithoutId, getPropertyValue, getPropertyValues, getWildcardSearchToken, init, releaseConnection, removeProperty, removeProperty, save, search, search, searchWithParams, size, update |
Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject |
configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject |
getLog |
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
enableLogging |
Methods inherited from interface org.apache.avalon.framework.context.Contextualizable |
contextualize |
Methods inherited from interface org.apache.avalon.framework.service.Serviceable |
service |
Methods inherited from interface org.apache.excalibur.xml.sax.XMLizable |
toSAX |
FIELD_KEY
protected final java.lang.String FIELD_KEY
- See Also:
- Constant Field Values
POSTGRESQLDatabase
public POSTGRESQLDatabase()
getTableCreationQuery
protected java.lang.String getTableCreationQuery()
- Description copied from class:
JDBC
- Returns an SQL query that could create the table.
This query should not have any parameter.
- Overrides:
getTableCreationQuery
in class AbstractJDBCDatabase
- Returns:
- The query.
see subclasses for implementation
initToSax
protected boolean initToSax()
- Description copied from class:
AbstractSdxObject
- Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML
- Overrides:
initToSax
in class JDBCDatabase
backup
public void backup(SaveParameters save_config)
throws SDXException
- Save the database
- Specified by:
backup
in interface Saveable
- Overrides:
backup
in class AbstractJDBCDatabase
- Throws:
SDXException
- See Also:
Saveable.backup(fr.gouv.culture.sdx.utils.save.SaveParameters)
getCreateIndiciesQuery
protected java.lang.String getCreateIndiciesQuery(java.lang.String fieldName)
- Overloaded from AbstractJDBCDatabase
- Overrides:
getCreateIndiciesQuery
in class AbstractJDBCDatabase
getEntriesWithLimitQuery
protected java.lang.String getEntriesWithLimitQuery(long offset,
long number)
- Description copied from class:
AbstractJDBCDatabase
- Implementation of statement with a limit parameter
- Overrides:
getEntriesWithLimitQuery
in class JDBCDatabase
- Returns:
- the query
- See Also:
POSTGRESQL implementation
SELECT * FROM >table_name< LIMIT >number< OFFSET >offset< ;
restore
public void restore(SaveParameters save_config)
throws SDXException
- Restore the database
- Specified by:
restore
in interface Saveable
- Overrides:
restore
in class AbstractJDBCDatabase
- Throws:
SDXException
- See Also:
Saveable.restore(fr.gouv.culture.sdx.utils.save.SaveParameters)
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.