|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.wrappers.AutoMedWrapper
uk.ac.ic.doc.automed.wrappers.SQLWrapper
public class SQLWrapper
An AutoMed high wrapper for connecting to SQL databases that have a JBDC driver. Note that specific lower level wrapper must be instantiated in order to use a particular database.
| Field Summary | |
|---|---|
protected java.sql.Connection |
con
|
static java.lang.String |
OPTION_SCHEMA_NAME
An option key setting, the value of which should be the SQL schema which is the only one to be mapped in this wrapping |
| Fields inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper |
|---|
am, awf, debug, driver, emptyKeyProtection, emptyKeys, optionKeyProtection, optionKeys, password, protocol, s, url, username |
| Constructor Summary | |
|---|---|
SQLWrapper()
|
|
SQLWrapper(AccessMethod am,
java.lang.String password)
|
|
| Method Summary | |
|---|---|
protected void |
connect()
Connect to a JDBC database in the standard way. |
java.lang.String |
escapedSQLID(java.lang.Object o)
Perform what escaping is necessary on SQL table names and column names. |
ASG |
executeIQL(ASG q)
Execute an IQL query on the datasource. |
AutoMedResult |
executeLocalQuery(AutoMedQuery q)
Execute a query in the datasource's native query language, and obtain a result in an AutoMedResult class |
SQLResult |
executeSQLQuery(SQLQuery q)
Execute a query on the data source, returning the result in the standard format for instances of SQL queries. |
protected AutoMedWrapperFactory |
getDefaultWrapperFactory()
Return the default AutoMedWrapperFactory that is used to
generate Schema instances from information in a data sources |
java.lang.String |
getProtocolName()
The name of the Protocol in the repository used to represent
JDBC connections. |
QueryParser |
getQueryParser(ASG query)
Return a parser that will accept queries for the wrapper. |
void |
getSODefinition(QuerySubGoal qsg)
Implement AutoMedWrapper abstract method This method should never be executed because the calling method should already know that the transformation leading to the schema object represented by qsg variable belongs to a source schema. |
| Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper |
|---|
atDebugLevel, cacheWrapper, deleteIQL, executeIQL, getAccessMethod, getAutoMedWrapper, getAutoMedWrapper, getAutoMedWrapperFactory, getDrivers, getOption, getOptionKeyProtection, getOptionKeys, getProtocol, getQueryCache, getQueryCache, getSchema, getSchema, getSODefinition, insertIQL, newAutoMedSchema, newAutoMedWrapper, newAutoMedWrapper, newAutoMedWrapper, registerWrapper, selectNewAutoMedWrapper, selectNewAutoMedWrapper, setDebugLevel, setOption, updateCache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.sql.Connection con
public static final java.lang.String OPTION_SCHEMA_NAME
| Constructor Detail |
|---|
public SQLWrapper()
public SQLWrapper(AccessMethod am,
java.lang.String password)
throws DataSourceException
DataSourceException| Method Detail |
|---|
public java.lang.String getProtocolName()
Protocol in the repository used to represent
JDBC connections.
getProtocolName in class AutoMedWrapperpublic java.lang.String escapedSQLID(java.lang.Object o)
public ASG executeIQL(ASG q)
throws DataSourceException,
NotFoundException
AutoMedWrapper
executeIQL in class AutoMedWrapperq - An IQL query held in an ASG which complies with
the limitations of what this wrapper is able to process
ASG containing the results of the query
DataSourceException
NotFoundException
public AutoMedResult executeLocalQuery(AutoMedQuery q)
throws DataSourceException
AutoMedWrapper
executeLocalQuery in class AutoMedWrapperDataSourceException
protected void connect()
throws DataSourceException
connect in class AutoMedWrapperDataSourceException - if unable to connect to the data source
public SQLResult executeSQLQuery(SQLQuery q)
throws DataSourceException
DataSourceExceptionpublic QueryParser getQueryParser(ASG query)
AutoMedWrapperSchemes, which accepts only single
schemes, with no other IQL operators supported. The SimpleComp
parser will allow simple list comprehensions to be passed to the
wrapper.
getQueryParser in class AutoMedWrapperprotected AutoMedWrapperFactory getDefaultWrapperFactory()
AutoMedWrapperAutoMedWrapperFactory that is used to
generate Schema instances from information in a data sources
getDefaultWrapperFactory in class AutoMedWrapper
public void getSODefinition(QuerySubGoal qsg)
throws DataSourceException
getSODefinition in class AutoMedWrapperDataSourceException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||