View Javadoc
1 /* 2 Bloof - visualize the evolution of your software project 3 Copyright ( C ) 2003 Lukasz Pekacki <lukasz@pekacki.de> 4 http://bloof.sf.net/ 5 6 This program is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License along with 15 this program; if not, write to the Free Software Foundation, Inc., 16 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 18 $RCSfile: DefaultDbAccess.java,v $ 19 Created on $Date: 2003/08/18 11:10:39 $ 20 */ 21 package net.sf.bloof.db; 22 23 /*** 24 * General class that implements the DbAccess interface. Should fit 25 * for most databases 26 * @author Lukasz Pekacki <pekacki@users.sourceforge.net> 27 * @version $Id: DefaultDbAccess.java,v 1.7 2003/08/18 11:10:39 pekacki Exp $ 28 */ 29 public class DefaultDbAccess implements DbAccess { 30 31 /*** 32 * Constructs a DefaultDbAccess object 33 * @param aName name of the access method 34 * @param aLogin of the user 35 * @param aPassword of the user 36 * @param aDbUrl url of the database 37 */ 38 public DefaultDbAccess(String aName, String aLogin, String aPassword, String aDbUrl) { 39 this.mName = aName; 40 this.mLogin = aLogin; 41 this.mPassword = aPassword; 42 this.mDbUrl = aDbUrl; 43 } 44 45 /*** 46 * @see net.sf.bloof.db.DbAccess#getDatabaseUrl( ) 47 */ 48 public String getDatabaseUrl() { 49 return mDbUrl; 50 } 51 52 /*** 53 * @see net.sf.bloof.db.DbAccess#getLogin( ) 54 */ 55 public String getLogin() { 56 return mLogin; 57 } 58 59 /*** 60 * @see net.sf.bloof.db.DbAccess#getPassword( ) 61 */ 62 public String getPassword() { 63 return mPassword; 64 } 65 /*** 66 * @see net.sf.bloof.db.DbAccess#setDatabaseUrl( String ) 67 */ 68 public void setDatabaseUrl(String aNewUrl) { 69 mDbUrl = aNewUrl; 70 } 71 /*** 72 * @see java.lang.Object#toString( ) 73 */ 74 public String toString() { 75 return mName; 76 } 77 78 /*** 79 * @see java.lang.Object#equals(java.lang.Object) 80 */ 81 public boolean equals(Object aDatabaseAccess) { 82 DbAccess other = (DbAccess) aDatabaseAccess; 83 return (other.getDatabaseUrl().equalsIgnoreCase(mDbUrl)); 84 } 85 86 /*** 87 * @see java.lang.Object#hashCode() 88 */ 89 public int hashCode() { 90 return mDbUrl.hashCode(); 91 } 92 93 private String mDbUrl; 94 private String mLogin; 95 private String mName; 96 private String mPassword; 97 }

This page was automatically generated by Maven