fr.gouv.culture.sdx.utils.rdbms
Class JDBC
java.lang.Object
fr.gouv.culture.sdx.utils.AbstractSdxObject
fr.gouv.culture.sdx.utils.rdbms.JDBC
- All Implemented Interfaces:
- Describable, Encodable, Identifiable, Localizable, 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
- Direct Known Subclasses:
- DataSourceComponentBacked
public abstract class JDBC
- extends AbstractSdxObject
Abstract class defining some useful methods for database
manipulation
Field Summary |
protected java.lang.String |
tableName
|
Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject |
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized |
Constructor Summary |
JDBC()
|
Method Summary |
protected void |
createTable(java.sql.Connection conn)
Creates the table. |
protected abstract 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. |
protected java.lang.String |
handleUnsupportedTokens(java.lang.String name)
Should return a string after scanning
and handling any unsupported characters
an _identifier (i.e.table name, column name, etc.) |
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 |
Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject |
configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getClassNameSuffix, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, initToSax, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tableName
protected java.lang.String tableName
JDBC
public JDBC()
getTableName
protected java.lang.String getTableName()
- Returns a table name used to store the repository's data.
- Returns:
- The table name should be appropriately escaped for table building.
getTableCreationQuery
protected abstract java.lang.String getTableCreationQuery()
- Returns an SQL query that could create the table.
This query should not have any parameter.
- Returns:
- The query.
see subclasses for implementation
createTable
protected void createTable(java.sql.Connection conn)
throws SDXException
- Creates the table.
- Throws:
SDXException
handleUnsupportedTokens
protected java.lang.String handleUnsupportedTokens(java.lang.String name)
- Should return a string after scanning
and handling any unsupported characters
an _identifier (i.e.table name, column name, etc.)
- Parameters:
name
- The name to prepare for use
- Returns:
initVolatileObjectsToSax
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
- Specified by:
initVolatileObjectsToSax
in class AbstractSdxObject
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.