public class DatabaseAdaptor extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
_blobType |
protected String |
_longType |
Constructor and Description |
---|
DatabaseAdaptor() |
Modifier and Type | Method and Description |
---|---|
void |
adaptTo(DatabaseMetaData dbMeta) |
String |
convertIdentifier(String identifier)
Convert a camel case identifier into either upper or lower
depending on the way the db stores identifiers.
|
InputStream |
getBlobInputStream(ResultSet result,
String columnName) |
String |
getBlobType() |
protected Connection |
getConnection()
Get a connection from the driver or datasource.
|
String |
getConnectionUrl() |
DataSource |
getDatasource() |
String |
getDatasourceName() |
String |
getDBName() |
Driver |
getDriver() |
String |
getDriverClassName() |
String |
getLongType() |
void |
initialize() |
boolean |
isEmptyStringNull() |
boolean |
isRowIdReserved()
rowId is a reserved word for Oracle, so change the name of this column
|
void |
setBlobType(String blobType) |
void |
setDatasource(DataSource ds) |
void |
setDatasourceName(String jndi) |
void |
setDriverInfo(Driver driverClass,
String connectionUrl)
Configure jdbc connection information via a jdbc Driver
|
void |
setDriverInfo(String driverClassName,
String connectionUrl)
Configure jdbc connection information via a jdbc Driver
|
void |
setLongType(String longType) |
String |
toString() |
public void adaptTo(DatabaseMetaData dbMeta) throws SQLException
SQLException
public void setBlobType(String blobType)
public String getBlobType()
public void setLongType(String longType)
public String getLongType()
public String convertIdentifier(String identifier)
identifier
- the raw identifierpublic String getDBName()
public InputStream getBlobInputStream(ResultSet result, String columnName) throws SQLException
SQLException
public boolean isEmptyStringNull()
public boolean isRowIdReserved()
public void setDriverInfo(String driverClassName, String connectionUrl)
driverClassName
- the driver classnameconnectionUrl
- the driver connection urlpublic void setDriverInfo(Driver driverClass, String connectionUrl)
driverClass
- the driver classconnectionUrl
- the driver connection urlpublic void setDatasource(DataSource ds)
public void setDatasourceName(String jndi)
public String getDatasourceName()
public DataSource getDatasource()
public String getDriverClassName()
public Driver getDriver()
public String getConnectionUrl()
protected Connection getConnection() throws SQLException
SQLException
- if unable to get the connectionpublic String toString()
toString
in class Object
Object.toString()
Copyright © 1995–2017 Webtide. All rights reserved.