net.sf.bloof.db
Class DefaultDbAccess

java.lang.Object
  |
  +--net.sf.bloof.db.DefaultDbAccess
All Implemented Interfaces:
DbAccess

public class DefaultDbAccess
extends java.lang.Object
implements DbAccess

General class that implements the DbAccess interface. Should fit for most databases

Version:
$Id: DefaultDbAccess.java,v 1.7 2003/08/18 11:10:39 pekacki Exp $
Author:
Lukasz Pekacki

Constructor Summary
DefaultDbAccess(java.lang.String aName, java.lang.String aLogin, java.lang.String aPassword, java.lang.String aDbUrl)
          Constructs a DefaultDbAccess object
 
Method Summary
 boolean equals(java.lang.Object aDatabaseAccess)
          Returns true if the specified object equals this one
 java.lang.String getDatabaseUrl()
          Returns the url of of the database server, needed by drivermanager for connection to the database
 java.lang.String getLogin()
          Returns the login of the database user
 java.lang.String getPassword()
          Returns the password of the database user
 int hashCode()
           
 void setDatabaseUrl(java.lang.String aNewUrl)
          Method setDataBaseUrl.
 java.lang.String toString()
          Shows the name of the database access.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultDbAccess

public DefaultDbAccess(java.lang.String aName,
                       java.lang.String aLogin,
                       java.lang.String aPassword,
                       java.lang.String aDbUrl)
Constructs a DefaultDbAccess object

Parameters:
aName - name of the access method
aLogin - of the user
aPassword - of the user
aDbUrl - url of the database
Method Detail

getDatabaseUrl

public java.lang.String getDatabaseUrl()
Description copied from interface: DbAccess
Returns the url of of the database server, needed by drivermanager for connection to the database

Specified by:
getDatabaseUrl in interface DbAccess
Returns:
String url of of the database server, needed by drivermanager for connection to the database
See Also:
DbAccess.getDatabaseUrl( )

getLogin

public java.lang.String getLogin()
Description copied from interface: DbAccess
Returns the login of the database user

Specified by:
getLogin in interface DbAccess
Returns:
String login of the database user
See Also:
DbAccess.getLogin( )

getPassword

public java.lang.String getPassword()
Description copied from interface: DbAccess
Returns the password of the database user

Specified by:
getPassword in interface DbAccess
Returns:
String password of the database user
See Also:
DbAccess.getPassword( )

setDatabaseUrl

public void setDatabaseUrl(java.lang.String aNewUrl)
Description copied from interface: DbAccess
Method setDataBaseUrl.

Specified by:
setDatabaseUrl in interface DbAccess
Parameters:
aNewUrl - new Url
See Also:
DbAccess.setDatabaseUrl( String )

toString

public java.lang.String toString()
Description copied from interface: DbAccess
Shows the name of the database access.

Specified by:
toString in interface DbAccess
Overrides:
toString in class java.lang.Object
Returns:
Name of the Database access object
See Also:
Object.toString( )

equals

public boolean equals(java.lang.Object aDatabaseAccess)
Description copied from interface: DbAccess
Returns true if the specified object equals this one

Specified by:
equals in interface DbAccess
Overrides:
equals in class java.lang.Object
Parameters:
aDatabaseAccess - specified object
Returns:
true if the specified object equals this one
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()


Copyright © 2003 bloof@Sourceforge. All Rights Reserved.