|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.ac.ic.doc.automed.reps.AccessMethod
The AccessMethod class describes how a particular database presented
by a Schema can be accessed by an AutoMed application, using
a particular Protocol. This is very experimental at present,
and has only been designed to handle JDBC/ODBC type protocols.
| Method Summary | |
protected static void |
clearAccessMethods()
|
static AccessMethod |
createAccessMethod(Schema schema,
java.lang.String url,
Protocol protocol,
java.lang.String dbDriver,
java.lang.String username)
Creates a new access method. |
static AccessMethod |
getAccessMethod(int amid)
Returns the AccessMethod held with the given identifier in
in the STR. |
java.lang.String |
getDBDriver()
Returns the database driver used for connecting to the database. |
Protocol |
getProtocol()
Returns the Protocol used for connecting to the database. |
Schema |
getSchema()
Returns the schema that represents the database to which the access method connects. |
java.lang.String |
getURL()
Returns the URL of the database to which the access method connects. |
java.lang.String |
getUsername()
Returns the username used for connecting to the database. |
void |
remove()
Remove this AccessMethod from the repository. |
void |
retract()
Remove this AccessMethod, and any other classes that are dependent upon its existance. |
void |
setDBDriver(java.lang.String dbDriver)
Sets the database driver used for connecting to the database. |
void |
setProtocol(Protocol protocol)
Sets the protocol used for connecting to the database. |
void |
setSchema(Schema schema)
Sets the schema that represents the database to which the access method connects. |
void |
setURL(java.lang.String url)
Sets the URL of the database to which the access method connects. |
void |
setUsername(java.lang.String username)
Sets the username used for connecting to the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static AccessMethod createAccessMethod(Schema schema,
java.lang.String url,
Protocol protocol,
java.lang.String dbDriver,
java.lang.String username)
schema - the Schema that represents the database
to which the access method connects.url - the URL of the database the access method connects to.protocol - the Protocol used for the connection.dbDriver - the database driver used for the connection.username - the username for connecting to the database.
public void remove()
throws InconsistentException
InconsistentException
public void retract()
throws InconsistentException
InconsistentException
public static AccessMethod getAccessMethod(int amid)
throws NotFoundException
AccessMethod held with the given identifier in
in the STR.
amid - the access method identifier (AMID) found in the STR.
NotFoundException - is no such AccessMethod existspublic Schema getSchema()
public java.lang.String getURL()
public Protocol getProtocol()
Protocol used for connecting to the database.
Protocol used for connecting to the database.public java.lang.String getDBDriver()
public java.lang.String getUsername()
public void setSchema(Schema schema)
throws STRException,
java.sql.SQLException,
DataSourceRepositoryException,
java.io.IOException
schema - the Schema that represents the database
to which the access method connects.
AutoRepException
STRException
java.sql.SQLException
DataSourceRepositoryException
java.io.IOException
ModelDefinitionsRepositoryException
BadSchemaException
public void setURL(java.lang.String url)
throws STRException,
java.sql.SQLException,
DataSourceRepositoryException,
java.io.IOException
url - the URL of the database to which the access method connects.
AutoRepException
STRException
java.sql.SQLException
DataSourceRepositoryException
java.io.IOException
ModelDefinitionsRepositoryException
public void setProtocol(Protocol protocol)
throws STRException,
java.sql.SQLException,
DataSourceRepositoryException,
java.io.IOException
protocol - the Protocol used for connecting to
the database.
AutoRepException
STRException
java.sql.SQLException
DataSourceRepositoryException
java.io.IOException
ModelDefinitionsRepositoryException
public void setDBDriver(java.lang.String dbDriver)
throws STRException,
java.sql.SQLException,
DataSourceRepositoryException,
java.io.IOException
dbDriver - the database driver used for connecting to the database.
AutoRepException
STRException
java.sql.SQLException
DataSourceRepositoryException
java.io.IOException
ModelDefinitionsRepositoryException
public void setUsername(java.lang.String username)
throws STRException,
java.sql.SQLException,
DataSourceRepositoryException,
java.io.IOException
username - the username used for connecting to the database.
AutoRepException
STRException
java.sql.SQLException
DataSourceRepositoryException
java.io.IOException
ModelDefinitionsRepositoryExceptionprotected static void clearAccessMethods()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||