|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.fluxion.datapublisher.sql.impl.SQLBeanFactory net.sourceforge.fluxion.datapublisher.odbc.impl.ODBCBeanFactory
@ServiceProvider public class ODBCBeanFactory
An implementation of BeanFactory that can generate a bean model for databases which can be accessed via a jdbc-odbc bridge.
Nested Class Summary | |
---|---|
protected static class |
ODBCBeanFactory.DataType
Note oracle seems to have few internal datatypes, but "Oracle Database recognizes the ANSI or IBM datatype name that differs from the Oracle datatype name, records it as the name of the datatype of the column, and then stores the column's data in an Oracle datatype based on the conversions." |
Field Summary |
---|
Fields inherited from class net.sourceforge.fluxion.datapublisher.sql.impl.SQLBeanFactory |
---|
beanConfigs, connection, connectionDetails, filterTables, metaBeans, packageName, usingTableFiltering |
Constructor Summary | |
---|---|
ODBCBeanFactory()
|
Method Summary | |
---|---|
void |
acquireDatasourceConnection(java.util.Map<java.lang.String,java.lang.String> connectionDetails)
Acquire a connection to the underlying datasource. |
boolean |
dbms(java.lang.String dbms)
Determines whether a BeanFactory implementation can generate beans for the given dbms. |
protected java.lang.String |
getJavaType(java.lang.String sqlType)
Get the Java Type that matches the given oracle SQL type |
protected java.lang.Class |
getQueryGeneratorClass()
Return the class that concrete BeanFactory implementations use to the create a query. |
void |
terminateDatasourceConnection()
Close the connection to the underlying datasource. |
Methods inherited from class net.sourceforge.fluxion.datapublisher.sql.impl.SQLBeanFactory |
---|
analyseColumns, analyseKeys, analyseTable, donotUseTableFiltering, generateBeans, getDatasourceConnectionParameters, getPackageName, makeExportedObjectPropertyMethods, makeImportedObjectPropertyMethods, readTableFilterFile, setType, useTableFiltering |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ODBCBeanFactory()
Method Detail |
---|
public boolean dbms(java.lang.String dbms)
BeanFactory
dbms
- the name of the dbms for a service provider, e.g. "mysql"
public void acquireDatasourceConnection(java.util.Map<java.lang.String,java.lang.String> connectionDetails) throws BeanGenerationException
BeanFactory
getDatasourceConnectionParameters().keySet()
to get the
parameters that must be set. Or do a lookup on these key values to get the
default values (e.g. "anonymous" is the default username). This way, those
parameters which have been set can be used, whilst null fields will be
ignored if possible (for example, in the case where password="" in
accessing a public MySql database).
connectionDetails
- a map containing parameters for connection to the
database.
BeanGenerationException
- if the connection could not be acquiredpublic void terminateDatasourceConnection() throws BeanGenerationException
BeanFactory
BeanGenerationException
- if there is a problem closing the
connectionprotected java.lang.Class getQueryGeneratorClass()
SQLBeanFactory
getQueryGeneratorClass
in class SQLBeanFactory
QueryGeneratorClass for BeanFactory
concrete implementationsprotected java.lang.String getJavaType(java.lang.String sqlType) throws BeanGenerationException
getJavaType
in class SQLBeanFactory
sqlType
- the type to match
BeanGenerationException
- if the type submitted could not be matched
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |