fr.gouv.culture.sdx.repository
Class ORACLERepository
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.repository.AbstractDataSourceComponentBackedRepository
fr.gouv.culture.sdx.repository.JDBCRepository
fr.gouv.culture.sdx.repository.ORACLERepository
- All Implemented Interfaces:
- Repository, 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 ORACLERepository
- extends JDBCRepository
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 repository |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Configures this repository. |
protected java.lang.String |
getEntriesWithLimitQuery(long offset,
long number)
Implementation of statement with a limit parameter
No limit there, implementation is done in the subclasses. |
protected java.lang.String |
getTableCreationQuery()
Returns an SQL query that could create the table. |
void |
init()
Initialise l'entrepot. |
void |
restore(SaveParameters save_config)
Restore the repository |
Methods inherited from class fr.gouv.culture.sdx.repository.JDBCRepository |
add, delete, empty, get, getConnection, getDeleteAllQuery, getDocumentAddQuery, getDocumentDeleteQuery, initToSax, initVolatileObjectsToSax, lists, openStream, releaseConnection, size, toSAX |
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 |
ORACLERepository
public ORACLERepository()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Description copied from class:
JDBCRepository
- Configures this repository.
In addition to the parameters needed in the base configuration handled by the parent class,
the following parameter is required: data source _identifier (dsi), the value of the "name"
attribute of the "jdbc" subElement for the "datasources" element in cocoon.xconf
(user must create this information in cocoon.xconf)
- Specified by:
configure
in interface org.apache.avalon.framework.configuration.Configurable
- Overrides:
configure
in class JDBCRepository
- Parameters:
configuration
- The configuration for this repository (based on a xml file).
Sample configuration entry:
<sdx:repository sdx:type = "JDBC" sdx:id = "myRepoId" dsi = "datasource _identifier from cocoon.xconf"/>
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
getTableCreationQuery
protected java.lang.String getTableCreationQuery()
- Returns an SQL query that could create the table.
This query should not have any parameter.
- Overrides:
getTableCreationQuery
in class JDBCRepository
- Returns:
- The query.
getEntriesWithLimitQuery
protected java.lang.String getEntriesWithLimitQuery(long offset,
long number)
- Description copied from class:
JDBCRepository
- Implementation of statement with a limit parameter
No limit there, implementation is done in the subclasses.
- Overrides:
getEntriesWithLimitQuery
in class JDBCRepository
- Returns:
- the query
- See Also:
ORACLE implementation
SELECT * FROM >table_name< LIMIT >offset<,>number< ;
backup
public void backup(SaveParameters save_config)
throws SDXException
- Save the repository
- Specified by:
backup
in interface Saveable
- Overrides:
backup
in class JDBCRepository
- Throws:
SDXException
- See Also:
Saveable.backup(fr.gouv.culture.sdx.utils.save.SaveParameters)
init
public void init()
throws SDXException
- Initialise l'entrepot. Si la table n'existe pas, elle est creee.
On surcharge cette methode car Oracle reagit bizarrement au
DatabaseMetaData. On fait simplement une requete.
- Specified by:
init
in interface Repository
- Overrides:
init
in class JDBCRepository
- Throws:
SDXException
restore
public void restore(SaveParameters save_config)
throws SDXException
- Restore the repository
- Specified by:
restore
in interface Saveable
- Overrides:
restore
in class JDBCRepository
- 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.